C++ server code

Latest master merged in. We should discuss the layout of the code.
What do you think would be the correct course of action for this?