Code cleanup for async operation.