Fixing the math to calculate energy comsuption (had mWh, needed W)
Pep8-ing file