requested /r/Javascript code review.

Code now satisfies JSLint, JSHint, and Closure-Compiler.
Merge pull request #3 from PlNG/master

requested /r/Javascript code review.