Optimize api calls by removing unnecessary deletes