Minor cleanup, a few bugfixes, and a lot of async.