Extract collection maintenance code into helper.
Be consistent with the order of things.