Switch to using JQuery ajax instead of a native XHR request