requested /r/Javascript code review.

Code now satisfies JSLint, JSHint, and Closure-Compiler.