Refactoring all the things!

Now using Bower and NPM to manage dependencies, and Grunt to do the
dirty work.