[Olena-patches] 3231: Update Laurent's cleanup code.