Refactored code to work with Grunt, Bower, and Browserify