Refactors flow in CvCtrl to a more stable behaviour