If you blow up the image of the phelon manual, it tells what each of the wires does (ignition ground, Light wire(to switch), stop light, light wire (to coupling...?....mine wasn't hooked to anything when I got the bike)).
I wonder how in the world that hub came loose from the rest of the flywheel. I would think the orientation might matter. Here's a picture of mine & where the keyway is.
Mike Sal