changed clients and hosts so that they can safely shutdown. Now, the test program will be able to close and terminate all threads on its own.