C++ server code

Latest master merged in. We should discuss the layout of the code.
lets get rid of these everywhere! adding to list