starting to clean up PDRefinement.lhs