added jshint config
refactored Kenneth's pull request and cleaned up lots of other stuff, too