Added battery level detection scripts