Moving index.js to app.js