refactor to work with browserify

Fixes #9 

:fax::kissing_smiling_eyes::dolls::vibration_mode::love_hotel::stew: