First iteration of JS XHR AJAX code