Tidies up the implementation a bit, splitting the single function and class into distinct computeDominatorTree() and computePostDominatorTree() functions and helper classes.