Refactored all the pipos and added a new test which tests the minimu.