Removed some global variables that weren't needed