Restructured the application.

This restructuring was in response to some hard-won advice on how to organize an angular application:

http://www.airpair.com/angularjs/posts/top-10-mistakes-angularjs-developers-make