fixing bug in min_cut code. Code cleanup