Align code to rewritten P2 module