Refactored deleting topics