Make cut more resilient and remove more dependencies on Result.t