Collection code cleanup