Cleaning SocketMgr code