Removed some ManualResetEvents and replacd them with a single boolean