Refactor AttachmentContainer.