correct the calls to ActiveEditMode which needed to be reversed.
removed some TODOs.
made the deadlock finder a singleton to stop multiple instances being
run up.,