Big rework of the deletion mechanism