Change runCommand into a method on the application object