Remove some global variables

The Counter() global variable hasn't been fully removed yet.  Added a unit test to check that continuing a previous run works as intended.