Refactor battery display