C++ server code

Latest master merged in. We should discuss the layout of the code.
I think that's what I meant? I need to make more descriptive explanations.