Refactor directory structure.

Remove app.js and put relevant code into server.js.