Corrections to global variables being created in tests