Refactoring app.js start up code to use async