Updated funcs to include ajax calls to REST