Cleared up the battery monitoring logic