Adapted project to work with grunt 4.
More compatibility fixes
Now with running phantomjs tests.
Better error messages in the browser.
Passing all tests again. Fixes #4.