Removed unnecessary globals.