Refactored to remove SocketServer classes