Yer tiz!
This can used for future reference. Copy and print it out if you wish before it disappears into the forum labrynth.
Up-end the machine and release the rear brake noodle from its stirrup, if there isn't enough slack in the cable you will need to release the inner from its clamping bolt.
Next, a little artwork.
Carefully draw a diagram of the positions of the various washers and spacers, this is important to maintain the wheel on frame centre line when re-fitting.
As Kal has already mentioned, it's easier if the two chrome protectors (footplates) are first removed. The carrier may drop down when this is done. Remove the controller housing cover and take out the controller with the cables. Locate the motor connections, a blue and a yellow cable and disconnect. Avoid pulling on the cables themselves, these bullet connectors are sometimes a little tight, I prefer to use two pairs of long-nosed pliers gripping the two brass parts, just inboard of the crimps, and teasing them apart. Don't twist, pull them straight out
After cutting the cable ties it may be neccessary to draw the cable through the square hole in the drop-out.
Undo the cable side wheel nut, it's 18 mm A/F. This will also release the propstand. This, together with the cable grommet, the wheel nut and any washers outboard of the drop-out should then be passed along the cable and out of the way. Undo the driveside wheel nut.
The chain!.
The original chain is continous. As the wheel slides rearward out of the drop-outs, it can passed around the axle. Personally, I prefer to have a snap on link and remove the chain completely, saves dinging the paintwork!.
If working on the wheel flat on the floor, do so with the cable side uppermost for obvious reasons.
When refitting the wheel there's a couple of things to watch out for. The hut on the motor axle (cable side) which is inboard of the drop-out must not be tightened with a spanner. Doing so will pre-load the wheel bearings in the motor, finger tight will do. Remember to pass the chain around the axle as it enters the drop-out. It's important, when threading the various parts back along the cable, to make sure the relationship of the lugged torque washer and the cable slot in the axle are correct. The slot should be facing forward to allow a natural exit for the cable along the chainstay. A spanner can be used on the axle flats to make this so. The torque washer lug should be facing rearward and engage with the drop-out slot behind the axle. Ensure the axle is fully forward in the slot on both sides and tighten both wheel nuts.
Thread the cable grommet into position. The cable is then threaded through the square hole in the drop out and secured to the first cable tie anchor. As Flecc has already pointed out, it should be loose enough to wriggle with your fingers but no more. Contrary to your belief, providing the wheel nut is firmly tightened, nothing will move, no matter how rough the terrain gets. There is however, a very real possibilty of any large loops in the cable left sticking out will get caught up, wrenching it from the motor.
When the cable reaches the inside of the controller housing, reconnect to the bullet connectors, colour to colour. Place the controller in first then lay the cables alongside and re-fit the cover. My controller has strips of draught excluder stuck on it to stop it rattling about inside the housing, I hate rattles!.
Re-fit the footplates with the mudguard eyes and carrier support behind their respective bolt heads. Don't forget to re-fit the brake cable.
If anything here doesn't make sense, then please use your own discretion. If any of it is plainly wrong, then let me know and I'll edit the post.
Have fun
Bob