                 guard let eid = element.attributes["id"] else {
                     return false
                 }
-                let metas = metadata["meta"].all(withAttributes: ["property": "title-type", "refines": "#" + eid])
+                let attributes = ["property": "title-type", "refines": "#" + eid]
+                let metas = metadata["meta"].all(withAttributes: attributes)
+
                 if let mainMetas = metas?.filter({ $0.string == "main" }) {
                     return !mainMetas.isEmpty
                 }

    ///   - Attributes: The XML document attributes
    /// - Returns: The content of the `<dc:identifier>` element, `nil` if the
    ///             element wasn't found
    private func parseUniqueIdentifier(from metadata: AEXMLElement,
                                       withAttributes attributes: [String : String]) -> String? {
        // Look for `<dc:identifier>` elements
        guard let identifiers = metadata["dc:identifier"].all else {

    ///   - element: The XML element to parse
    ///   - doc: The OPF XML document being parsed
    ///   - metadata: The metadata to which to add the contributor
    internal func parseContributor(from element: AEXMLElement,
                                  in document: AEXMLDocument,
                                  to metadata: Metadata) {
        let metadataElement = document.root["metadata"]
