Replaced pa_pp_nextstate with the generic pa_pp_op
Updated to match the interface change in B::Replace
Add simple pa_pp_enterloop/pa_pp_leaveloop, just calling the corresponding PP function