Finished cleaning some global variables