cleaned up ajaxPrefilter, ajaxError code