 				if child.kind == XMLNode.Kind.element {
 					
 					let childElement = child as! XMLElement
-					let nameAttribute = childElement.fcpxName
-					
-					if let nameAttribute = nameAttribute {
-						
-						if usingAbsoluteMatch == true {
+					
+					guard let nameAttribute = childElement.fcpxName else {
+						continue
+					}
+					
+					if usingAbsoluteMatch == true {
+						
+						if nameAttribute.uppercased() == name.uppercased() {
 							
-							if nameAttribute == name {
-								
-								matchingElements.append(childElement)
-								
-							}
+							matchingElements.append(childElement)
 							
-						} else { // Lookes for a match within the string
+						}
+						
+					} else { // Lookes for a match within the string
+						
+						if nameAttribute.uppercased().contains(name.uppercased()) == true {
 							
-							if nameAttribute.contains(name) == true {
-								
-								matchingElements.append(childElement)
-								
-							}
+							matchingElements.append(childElement)
+							
 						}
-						
 					}
+					
 					
 					// Recurse through children
 					if childElement.children != nil {
 						
-						let items = clips(forName: name, inElement: childElement, usingAbsoluteMatch: usingAbsoluteMatch)
+						let items = elements(forName: name, inElement: childElement, usingAbsoluteMatch: usingAbsoluteMatch)
 						
 						matchingElements.append(contentsOf: items)
 					}

		
	}
	
	
	/**
	This function goes through the element and all its children, finding clips that match the given type.

	
	- returns: An array of matching clips as XMLElement objects.
	*/
	private func clips(forElementType elementType: FCPXMLElementType, inElement element: XMLElement) -> [XMLElement] {
		
		var matchingElements: [XMLElement] = []
		
