Remove unneeded global variables