These should be moved to the outside of progress() above, and the commit_manually removed.  This inner function should have no wrappers.