[ecomp] Refactory PI.