Removed some global variables