refactor ajaxHandler service