Cleanup and progress callback, see #10