     ///     - type: The kind of Attachment we're after
     ///     - block: Closure to be executed, for each one of the elements
     ///
-    private func enumerateAttachments<T : NSTextAttachment>(range: NSRange? = nil, ofType type: T.Type, block: ((T, NSRange) -> Void)) {
+    func enumerateAttachments<T : NSTextAttachment>(range: NSRange? = nil, ofType type: T.Type, block: ((T, NSRange) -> Void)) {
         guard let textStorage = layoutManager.textStorage else {
             assertionFailure("Unable to enumerate attachments. No NSTextStorage.")
             return

            self.layoutAttachmentViewForAttachment(attachment, atRange: range)
        }
    }


    /// Updates the layout of the attachment view for the specified attachment but
    /// creating a new exclusion path for the view based on the location of the
    /// specified attachment.
    ///
    /// - Parameters:
    ///     - attachment: The AztecTextAttachment
    ///     - range: The range of the AztecTextAttachment in the textView's NSTextStorage
    ///
    private func layoutAttachmentViewForAttachment(attachment: AztecTextAttachment, atRange range: NSRange) {
        guard let attachmentView = attachmentViews[attachment.identifier] else {
            return
        }

        // Exclusion Frame needs to account for Insets, as well as line paddings!
        let newFrame = frameForAttachmentView(attachmentView, forAttachment: attachment, atRange: range)
        let newExclusionPath = exclusionPathForAttachmentFrame(newFrame, textWrapping: attachment.textWrapping)

        attachmentView.view.frame = newFrame
        attachmentView.exclusionPath = newExclusionPath

        // TextKit's Container!
        textView.textContainer.exclusionPaths.append(newExclusionPath)

        // Always ensure layout after updating an individual exclusion path so
        // subsequent attachments are in their proper location.
        layoutManager.ensureLayoutForTextContainer(textView.textContainer)
    }


    /// This method loops over any AztecTextAttachments found in textStorage and asks the delegate for a
    /// custom view for the attachment.
    ///
    public func reloadAttachments() {
        resetAttachmentManager()

        enumerateAttachments(ofType: AztecTextAttachment.self) { (attachment, range) in
            self.attachments.append(attachment)

            guard let view = self.delegate?.attachmentManager(self, viewForAttachment: attachment) else {
                return
            }

            self.attachmentViews[attachment.identifier] = AztecAttachmentView(view: view, identifier: attachment.identifier, exclusionPath: nil)
            self.resizeViewForAttachment(attachment, toFitInContainer: self.textView.textContainer)
            self.textView.addSubview(view)
        }

        layoutAttachmentViews()
    }


    /// Resizes and updates layout for custom attachment views so they match the 
    /// current textContainer size.
    /// Should be called when the size of the UITextView's NSTextContainer changes
    /// or from `NSLayoutManagerDelegate.layoutManager(layoutManager, textContainer, didChangeGeometryFromSize oldSize)`
    ///
    public func resizeAttachments() {
        let textContainer = textView.textContainer

        enumerateAttachments(ofType: AztecTextAttachment.self) { (attachment, range) in
            self.resizeViewForAttachment(attachment, toFitInContainer: textContainer)
        }

        layoutAttachmentViews()
    }


    /// Resets the attachment manager. Any custom views for AztecTextAttachments are
    /// removed from the UITextView, their exclusion paths are removed from 
    /// textStorage.
    ///
    private func resetAttachmentManager() {
        // Clean up any stale exclusion paths
        removeAttachmentExclusionPaths()



    /// Nukes all of the ExclusionPaths associated to the AttachmentViews collection.
    ///
    func removeAttachmentExclusionPaths() {
        let textContainer = textView.textContainer

        let paths = attachmentViews.flatMap { (identifier, attachmentView) -> UIBezierPath? in
