Applied smart pointers to MPC related classes.