         }
     }
     
-    // MARK: - Hashable
-    
-    public static func == (lhs: PBXObject, rhs: PBXObject) -> Bool {
-        switch (lhs, rhs) {
-        case (.pbxNativeTarget(let lhsElement), .pbxNativeTarget(let rhsElement)):
-            return lhsElement == rhsElement
-        case (.pbxAggregateTarget(let lhsElement), .pbxAggregateTarget(let rhsElement)):
-            return lhsElement == rhsElement
-        case (.pbxBuildFile(let lhsElement), .pbxBuildFile(let rhsElement)):
-            return lhsElement == rhsElement
-        case (.pbxFileReference(let lhsElement), .pbxFileReference(let rhsElement)):
-            return lhsElement == rhsElement
-        case (.pbxProject(let lhsElement), .pbxProject(let rhsElement)):
-            return lhsElement == rhsElement
-        case (.pbxFileElement(let lhsElement), .pbxFileElement(let rhsElement)):
-            return lhsElement == rhsElement
-        case (.pbxGroup(let lhsElement), .pbxGroup(let rhsElement)):
-            return lhsElement == rhsElement
-        case (.pbxHeadersBuildPhase(let lhsElement), .pbxHeadersBuildPhase(let rhsElement)):
-            return lhsElement == rhsElement
-        case (.pbxFrameworksBuildPhase(let lhsElement), .pbxFrameworksBuildPhase(let rhsElement)):
-            return lhsElement == rhsElement
-        case (.pbxResourcesBuildPhase(let lhsElement), .pbxResourcesBuildPhase(let rhsElement)):
-            return lhsElement == rhsElement
-        case (.pbxShellScriptBuildPhase(let lhsElement), .pbxShellScriptBuildPhase(let rhsElement)):
-            return lhsElement == rhsElement
-        case (.pbxSourcesBuildPhase(let lhsElement), .pbxSourcesBuildPhase(let rhsElement)):
-            return lhsElement == rhsElement
-        case (.pbxTargetDependency(let lhsElement), .pbxTargetDependency(let rhsElement)):
-            return lhsElement == rhsElement
-        case (.pbxVariantGroup(let lhsElement), .pbxVariantGroup(let rhsElement)):
-            return lhsElement == rhsElement
-        case (.xcBuildConfiguration(let lhsElement), .xcBuildConfiguration(let rhsElement)):
-            return lhsElement == rhsElement
-        case (.xcConfigurationList(let lhsElement), .xcConfigurationList(let rhsElement)):
-            return lhsElement == rhsElement
-        case (.pbxCopyFilesBuildPhase(let lhsElement), .pbxCopyFilesBuildPhase(let rhsElement)):
-            return lhsElement == rhsElement
-        case (.pbxContainerItemProxy(let lhsElement), .pbxContainerItemProxy(let rhsElement)):
-            return lhsElement == rhsElement
-        default:
-            return false
+}
+
+// MARK: - PBXObject Extension (Extras)
+
+extension PBXObject {
+    
+    public var reference: UUID {
+        switch self {
+        case .pbxBuildFile(let element): return element.reference
+        case .pbxAggregateTarget(let element): return element.reference
+        case .pbxContainerItemProxy(let element): return element.reference
+        case .pbxCopyFilesBuildPhase(let element): return element.reference
+        case .pbxGroup(let element): return element.reference
+        case .pbxFileElement(let element): return element.reference
+        case .xcConfigurationList(let element): return element.reference
+        case .xcBuildConfiguration(let element): return element.reference
+        case .pbxVariantGroup(let element): return element.reference
+        case .pbxTargetDependency(let element): return element.reference
+        case .pbxSourcesBuildPhase(let element): return element.reference
+        case .pbxShellScriptBuildPhase(let element): return element.reference
+        case .pbxResourcesBuildPhase(let element): return element.reference
+        case .pbxFrameworksBuildPhase(let element): return element.reference
+        case .pbxHeadersBuildPhase(let element): return element.reference
+        case .pbxNativeTarget(let element): return element.reference
+        case .pbxFileReference(let element): return element.reference
+        case .pbxProject(let element): return element.reference
         }
     }
+    
+}
+
+// MARK: - PBXObject
+
+extension PBXObject: Hashable {
     
     public var hashValue: Int {
         switch self {

    }
}

public extension Array where Element == PBXObject {
    
    var buildFiles: [PBXBuildFile] {

import Foundation
import xcodeprojextensions

public enum PBXObject {
    
    case pbxNativeTarget(PBXNativeTarget)
    case pbxAggregateTarget(PBXAggregateTarget)
    case pbxBuildFile(PBXBuildFile)
