Removed explicit global variables.