Replace primitive types with named objects

Will come in handy later in Drools code.
Calculate power consumption for running tasks