Moved variable declarations to app.js and completed midway setup