Improve XHR sample.