Extracting ajaxRequest into a top level resource