We might need to see some photos.
When you put the side cover back on, there's a wire that's pretty easy to pinch, which would shut the whole thing down.
Also, the headlight shouldn't come on with an '87, unless the engine is running... are you sure of the year? Has the engine been replaced with a later model?
If it's running a newer engine (and newer wiring), then the CDI you installed is probably the wrong one.
It sounds like the carb may have been replaced with something aftermarket. Mine came with a cheap Chinese eBay carb that was shorter than the factory carb... it ran pretty well, though.