Refactor minCut to be exported to minCut runner;