Refactor battery