Completed replacement of use of Thread class