refactored app.js into many smaller files to make building a larger app easier