Various collection refactoring.