C++ server code

Latest master merged in. We should discuss the layout of the code.
ohh alright thank you, this helps a lot. I was under the impression that it needed to be connected to the variable. Makes much more sense now.