More refactoring of imperative collections