test the charging code alone

finished up re-writing the charging function and initialization.
conditionally don't compile the lighting bit for now, but later can add
it back in and manage it.