 
   /** Creates a motion runtime instance. */
   public init() {
+    self.parent = nil
   }
 
   /** Subscribes to the stream, writes its output to the given property, and observes its state. */

    }))
  }

  private func stateDidChange(_ state: MotionState, for token: String) {
    if state == .active {
      activeSubscriptions.insert(token)

    if oldState != newState {
      self.state.write(newState)
    }

    if let parent = parent {
      parent.stateDidChange(state, for: token)
    }
  }

  private weak var parent: MotionRuntime?
  private var children: [MotionRuntime] = []
  private var subscriptions: [Subscription] = []

  private typealias Token = String
