Cleanup ml prover 5

@dwightguth @andreistefanescu please review
you did not refactor this into a lambda :-)