The internal controller is potted in epoxy. This makes getting the wire out sort of a chore. What seems to work is to heat the epoxy to around 100C (boiling) with a heat gun, torch, or pan of boiling water, then it softens to a 'rubbery' consistency which can be dug out with a small screwdriver. As it cools off, it gets hard again, so several heating cycles may be needed to clear the epoxy from around the wires. Be careful to not overheat it, as you could melt the hall sensor wires or damage the hall sensors. I found it worked well to heat the face of the motor and let the heat transfer through to the epoxy.
There are 3 pairs of wires that go from the stator to the potted controller. The idea is to dig out around where the wires attach to the board and desolder or cut them off with as much length as possible. You also need to keep track of the pairing. They are color coded on most motors.

- BMC epoxy potting.jpg (68.84 KiB) Viewed 3322 times

- BMC phase wires.jpg (75.11 KiB) Viewed 1531 times
The hall sensors are connected by a 5 conductor ribbon cable. This needs to be spliced too. The insulation on the hall wires will melt easily, so be careful when heating. You want to free up as much length as possible to make splicing easier.

- BMC hall wires.jpg (68.11 KiB) Viewed 3321 times
Next, I soldered on extensions for the phase and hall wires and heat shrinked over the connections.

- BMC new wires.jpg (146.47 KiB) Viewed 3302 times