Refactor app.js and add CSS styling