Modified the loading sequence in app.js