Improved recalculation of energy tracking

I reviewed and responded to the PR here: