Refactor battery level response