server.js: multiple improvements