Pulled out all accidental global variables