MPC code corrected and other codes cleaned