Add uncommitted changes from ComThread

Applied new changes to ComThread on top of new changes from master