Refactor Container.set