Move towards dependency injection in app.js. Pulled out ConfirmDialog