cleaned up the code in app.js and added license info