Delete handler for boxes and edges