     }
 }
 
-private struct ServiceObserverWrapper {
-
-    let observer: Any
-
-    public init<Service: ContextService>(observer: AnyObserver<Service>) {
-        self.observer = observer
-    }
-}
-
-private struct ServiceObservableWrapper {
-
-    let observable: Any
-
-    public init<Service: ContextService>(observable: Observable<Service>) {
+private struct ServiceVariableWrapper {
+
+    let variable: Any
+    weak var observable: AnyObject?
+
+    public init<Service: ContextService>(variable: Variable<Service?>, observable: Observable<Service?>) {
+        self.variable = variable
         self.observable = observable
-    }
-}
-
-private struct ServiceDispatchCallback {
-
-    private let _callback: (AnyContextService) -> Void
-
-    init<Service: ContextService>(callback: @escaping (Service, Service.Component) -> Void) {
-        self._callback = { anyService in
-            guard let service = anyService.baseService as? Service else { return }
-            callback(service, service.component)
-        }
-    }
-
-    func invoke(with service: AnyContextService) {
-        self._callback(service)
     }
 }
 

    }

    fileprivate var services: [AnyContextServiceTag: AnyContextService] = [:]
    fileprivate var serviceCallbacks: [AnyContextServiceTag: [ServiceDispatchCallback]] = [:]

    public func store<Tag: ContextServiceTag, Service>(service: Service?, for tag: Tag) where Service == Tag.Service {
        let anyTag = tag as? AnyContextServiceTag ?? AnyContextServiceTag(tag: tag)
        if let service = self.services[anyTag] {
            self.remove(service: service.baseService)
            self.dispatch(.removed(tag: anyTag, service: service))
        }

        let service = AnyContextService(optionalService: service)

        if let service = service {
            self.add(service: service.baseService)
            self.dispatch(.added(tag: anyTag, service: service))
            self.variable(for: anyTag)?.value = service
        }
    }

