Move methods from ajaxcalls to locallib