Made the battery script a little prettier