add changeEnv and scale function. Remove all the urlib2 stuff