When the flywheel came loose, the cam rotated as it is a taper fit to the crankshaft, without a key. Use a puller to pull it off the flywheel if necessary. Finding the timing again can be tricky but start out with the cam positioned so that the points open just before top dead center and mark it's location to the crank. Set the points to nominal gap. Find TDC by using a wooden coffee stirrer pressed against the piston, turn the crank CW to top, and put a mark on the wood at the top of the head. Good eye and feel are necessary here to spot the exact location of TDC. People will say use a piston stop but with that you have the slop in the connecting rod as backlash to throw it off. Put another mark 2mm below that TDC one, and that is your reference for the timing mark BTDC, where the points should open. Hook up a multimeter to the grey wire and ground, set the meter to buzz mode. Turn the crank CW until the buzzer stops and if the timing is correct, the lower line will line up with the top of the head.