Move async stuff into async.h/c.