Lintify'd the code

Added basic jshint config to help catch errors. Fixed a bunch of minor linting errors.

If you are up for it, I'd like to update the code to use "use strict" mode - http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/