Merge "Improve collection code."