Adding jshint.  Fixing whitespace. Fixing reference errors for variables that weren't defined.  Adding use-strict.