cleanup of some comments and combine some thread stuff