Cleaned up some global variables