Updated XHR promise functions