Allow progress, success and error messages to be supplied as functions.  Fix bug with how messages are handled in run.