Fix leaky test global state

Fix global state being leaked between tests.

The CONFIG variable is the current issue being addressed here.