Simplify collection logic greatly.

Fix bug where we could not add an item to an empty collection.