clean up, add max.time and max.evals, add getTerminationCode and getTerminationMessage