Make dominator use actual topological sorted order. Fix some improper node removal