Refactor backend.

Split server.js into different modules.
Change API.
Update map.