Refactored Application class into its own independent thing to make it testable. The untestable parts have been shelled out to gruntfile.js and labelled up explictly as a harness.