WIP on refactoring / simplification

- still need to switch to browserify