In order to run the battery properly you need to float the ground for the lighting coil and run both ends of the lighting coil wire to a Regulator/Recfitier.
Run the pos and neg from the rectifier to the battery, then run all of your lighting power/grounds to and from the battery directly, then one bigger ground coming off the battery.
That is how to do it in a simple way.
I also set mine up to read the total battery voltage off a TrailTech Vapor, and setup relays so when the battery power got low I could energize the relay to allow the magneto to recharge the battery to prevent overcharging. [Instead of Hi/Low lighting, i made the Low switch activate the charging relay and the Hi switch activated the lighting.]