Refactored using gulp and browserify.