Add qunit and a bunch of tests.
Fix the tests
Remove console.log