Refactor to separate modules with browserify