Add JSHint linting and add callbacks to API