Added more flexible progress handler interface.