Code clean up for EnergyGauge