Tidied up app.js