Updates to the ajax return function