Lots of fixes to enable browserify/coffeeify/testling to play nice

Enjoy! :hamburger: