Added progress callback support (partially).