Cleaned up usage of the cancellation token.