Update thread.h

Cleaned up. 
took out debugging classes/ comments/ asserts. 
Tested with shell team code and it should work.