Added multithreaded connection handler.