renaming fn arg
-dead code; moving var dec to top of fn
fixing jslint errors