porting everything over to new head-on.js and browserfiy