         return foundDeviceRef
     }
 
-    // TODO this should again be a property wrapper as above, although we only need a getter
-    private var cachedDeviceRef: MIDIDeviceRef = 0
-    private var hasCachedDeviceRef = false
-
-    private var deviceRef: MIDIDeviceRef {
-        if !hasCachedDeviceRef {
-            var entityRef: MIDIEntityRef = 0
-            if MIDIEndpointGetEntity(endpointRef, &entityRef) == noErr {
-                var deviceRef: MIDIEntityRef = 0
-                if MIDIEntityGetDevice(entityRef, &deviceRef) == noErr {
-                    cachedDeviceRef = deviceRef
-                }
-            }
-        }
-        return cachedDeviceRef
-    }
-
 }


    // MARK: Private

    private var hasCachedManufacturerName = false
    private var cachedManufacturerName: String?
    private var hasCachedModelName = false
    private var cachedModelName: String?

    // We set this property on the virtual endpoints that we create,
    // so we can query them to see if they're ours.

    public override func invalidateCachedProperties() {
        super.invalidateCachedProperties()

        cachedManufacturerName = .none
        cachedModelName = .none
        cachedDeviceRef = .none
    }

    public override func propertyDidChange(_ propertyName: String!) {
        if propertyName == kMIDIPropertyManufacturer as String {
            cachedManufacturerName = .none
        }
        else if propertyName == kMIDIPropertyModel as String {
            cachedModelName = .none
        }

        super.propertyDidChange(propertyName)
