Modifies eco counters

Adds tests and refactors the eco counters.
Actually add the tests