Refactored energy calculation to be based upon the component domain
model