thread_test3 added. Code cleanup.