Cleaned up some of the messy global variables