wait for proper thread termination before freeing thread memory;
update thread todo; fix typo;