Lint and fix bad escaping

This PR tries to improve the code-quality by adding linting using [jshint](http://jshint.org/).

Linting runs after a `npm i` using npm with
```
$ npm run lint
```
After linting no errors or warnings are produced.

Several warnings (mainly subject to perl escaping) have been corrected. `\@ --> @`