Updated use of TCPServer in API to handle requests in new threads