minimal runable new p2 integration
more p2 fixes
Merge pull request #535 from georgiee/fix-new-p2

Fix new separated p2 integration so it's runable