Modified a lot of the charging code, added flag for temp control or not.