Cleaned up logic for workLight
Added functions to calculate average hourly data