added globalvars object and changed modifyVars to take a reload boolean