Added counters and other internal debug