 
 // MARK: - Pasteboard Helpers
 //
-extension UIPasteboard
-{
-    ///
-    ///
-    private struct StringOptions {
-        static let RTFText = [NSDocumentTypeDocumentAttribute: NSRTFTextDocumentType]
-        static let RTFDText = [NSDocumentTypeDocumentAttribute: NSRTFDTextDocumentType]
-        static let plainText = [NSDocumentTypeDocumentAttribute: NSPlainTextDocumentType]
-    }
+extension UIPasteboard {
 
-    ///
-    ///
-    private func unarchiveAttributedString(fromPasteboardCFType type: CFString, with options: [String: Any]) -> NSAttributedString? {
-        guard let data = data(forPasteboardType: String(type)) else {
-            return nil
-        }
-
-        return try? NSAttributedString(data: data, options: options, documentAttributes: nil)
-    }
-
-
-    ///
+    /// Attempts to load the Pasteboard's contents into a NSAttributedString Instance, if possible.
     ///
     func loadAttributedString() -> NSAttributedString? {
+
         if let string = aztecAttributedString {
             return string
         }


        return plainTextAttributedString
    }

    ///
    ///
    private var RTFAttributedString: NSAttributedString? {
        return unarchiveAttributedString(fromPasteboardCFType: kUTTypeRTF, with: StringOptions.RTFText)
    }

    ///
    ///
    private var RTFDAttributedString: NSAttributedString? {
        return unarchiveAttributedString(fromPasteboardCFType: kUTTypeFlatRTFD, with: StringOptions.RTFDText)
    }

    ///
    ///
    private var richTextAttributedString: NSAttributedString? {
        return unarchiveAttributedString(fromPasteboardCFType: kUTTypeText, with: StringOptions.RTFText)
    }

    ///
    ///
    private var plainTextAttributedString: NSAttributedString? {
        return unarchiveAttributedString(fromPasteboardCFType: kUTTypePlainText, with: StringOptions.plainText)
    }


    ///
    ///
    private var aztecAttributedString: NSAttributedString? {
        guard let data = data(forPasteboardType: NSAttributedString.pastesboardUTI) else {
            return nil
        }

        return NSAttributedString.unarchive(with: data)
    }

    // MARK: - Helpers

    /// String Initialization Options
    ///
    private struct StringOptions {
        static let RTFText = [NSDocumentTypeDocumentAttribute: NSRTFTextDocumentType]
        static let RTFDText = [NSDocumentTypeDocumentAttribute: NSRTFDTextDocumentType]
        static let plainText = [NSDocumentTypeDocumentAttribute: NSPlainTextDocumentType]
    }

    /// Attempts to unarchive a Pasteboard's Entry into a NSAttributedString Instance.
    ///
    /// - Parameters:
    ///     - type: Pasteboard's Attribute Key
    ///     - options: Properties to be utilized during the NSAttributedString Initialization.
    ///
    /// - Returns: NSAttributed String with the contents of the specified Pasteboard entry, if any.
    ///
    private func unarchiveAttributedString(fromPasteboardCFType type: CFString, with options: [String: Any]) -> NSAttributedString? {
        guard let data = data(forPasteboardType: String(type)) else {
            return nil
        }

        return try? NSAttributedString(data: data, options: options, documentAttributes: nil)
    }
}
