Added optparse for commandline options and a watt average.