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

* a few forgottons semicolons
* a few forgotten "new" invocations
* globals definition for JSHint
OK I see. Thanks :+1: 

I will add a `.jshintrc` with a `node` flag set to `true` once I merge this PR :-)