ENH: better cut heuristic
BUG: More robust cut code