better code for mutable Lists

Lists that can change while they are iterated.
code beautification