Reorganized both app.js into more manageable files.