 /// Manages a State and commits the action received via dispatcher to mutations.
 open class Store<State: VueFlux.State> {
     private let state: State
-    private let mutations: State.Mutations
     private let dispatcher = Dispatcher<State>()
     private let sharedDispatcher = Dispatcher<State>.shared
-    private var sharedDispatcherKey: Dispatcher<State>.Observers.Key?
+    private let sharedDispatcherKey: Dispatcher<State>.Observers.Key
     
     /// An action proxy that dispatches actions via shared dispatcher.
     /// Action is dispatched to all stores which have same generic type of State.

    ///   - executor: An executor to dispatch actions on.
    public init(state: State, mutations: State.Mutations, executor: Executor) {
        self.state = state
        self.mutations = mutations
        
        let dispatch: ((State.Action) -> Void) = { [weak self] action in
            self?.commit(action: action)
        }
        
        dispatcher.subscribe(executor: executor, dispatch: dispatch)

    }
    
    deinit {
        sharedDispatcher.unsubscribe(for: sharedDispatcherKey)
    }
}

