Refactored delete/recover endpoints.