Made it CPPI Compliant and a few adjustments