Add counters class for debugging.
General clean up.