Change cleanup to be async.