Removed all global variables, but one.