Add incomplete minCut function
Fix errors