Minimal changes in server.cpp