Refactor RhinoJSEnv to make it more readable.