reorganize code in MPM, add CPDI2 support, not done yet