Remove socket.io from backend.

We will use REST API.
Fix style app.js.

Also, some unused code is removed.