Remove unused code
Extract behavior from server.js
Use a layout