small bugs were squashed
fix THRD_DEBUG
superficial changes
none performance impacting