fixes minor code problems, such as missing semicolons, etc.

* a few forgottons semicolons
* a few forgotten "new" invocations
* globals definition for JSHint
Cool, as the branch is on this repo, you can also just reuse it and add the `.jshintrc` in here and close it together.