Code Cleanup

Improved documentation across all modules. Formatted code to follow
conventions. Found a handful of minor bugs and fixed them. Improved the
BatteryModule slightly.