Cleaning up some global variables