Refactoring to use npm with browserify