Refactored code to work with Grunt, Bower, and Browserify

We also need to have bower as a dependency here.