Improved deleting of elements per elementtype