Some refactoring in P3C.