C++ server code

Latest master merged in. We should discuss the layout of the code.
We can't switch here or does C++ not support it like C?