Updated battery script to accept arguments.