clean up Globals and Debug