Asyncprogress

Rebased and fixed. Replaces #175 and #181. Closes #169.