add jshint and fix linting errors
Merge PR #148.