Refactor async cancellation