creation code almost done
implemented thread unlinking etc.
creation and destruction should work