Made changes to the battery class.