First steps in separating client and server with changes to the socket infrastructure

Issue #5 Issue #2