Reworked the JQUERY AJAX function.