segmenting app.js files into appropriate files and folders