Made a parser for the battery data
Corrected a few code errors to make it possible to build