karma tests, browserify fixes
Tidy