Improved use of cancellation tokens.