Added possibility to delay DOM removal