Updated app.js to make variables more clear and documented a bit