Lint using jshint and run linter on Travis

Closes #279
Fix linting errors
Regenerate all APIs