Final touches on SleepThread implementation