Delete functionality and testing