Simplify delete function