Implemented tracking of spent energy.