Made changes to the Thread class