removing newline hack
throws errors for invalid javascript
adding renaming spec
adding spec for passing in optional parameters