improved console messages.
rewrote the socket wrapper to conform to the new socket api on the server.