Added (untested) PHI-reducer code.