Refactored delete