Removed the thread stuff... I think this is a simpler/more robust design