Hello,
your bike indeed looks quite hacked.
Actually the rectifier ist quite simple: It has three yellow "inputs" transferring the AC juice from the alternator and two DC "outputs" (red, yellow) that charge the battery.
Have a look at the schematics in the service manual and you will see that the red wire of the rectifier once was connectect directly to the positive pole of the battery (via the positive secondary pole of the starter solenoid).
Routing the output of the generator through the ignition switch to the battery is a very bad idea, because it will burn the switch contacts when the charge current is quite high, i.e. the battery's charge is low.
How is the regulator that is currently on your bike wired? And please show us your new unit. Maybe we are able to help you wire it up correctly.
Also, a picture of your starter solenoid and fuse box might help.