Simplified the tcp server.