Refactored to "app" namespace.

Refactored the models, controller, and router to add them to the @app namespace. Moved the document.ready out of the Backbone code and into the layout.
Changed to use existential assignment.
More refactoring.

More refactoring in the templates to clean up code and make it more testable.