Remove unnecessary globals