Refactoring again - battery status function looks better