Battery reading. Some minor changes