   let stateSource: Observable<AppState>
   let actionEmitter = Emitter<Any>()
 
-  init(_ initialState: AppState) {
+  init(_ state: AppState) {
     let baseServerUrl = URL(string: "http://localhost:\(NetUtils.openPort())")!
 
-    self.appState = initialState
+    self.appState = state
 
     self.stateSource = self.stateSubject.asObservable()
     let actionSource = self.actionEmitter.observable

          .map { $0.state },
        actionSource
          .mapOmittingNil { $0 as? UuidAction<PreviewTool.Action> }
          .mapOmittingNil { action in
            guard let mainWindowState = self.appState.mainWindows[action.uuid] else {
              return nil
            }

            return StateActionPair(state: UuidState(uuid: action.uuid, state: mainWindowState),
                                   action: action.payload,
                                   modified: false)
          }
          .transform(by: PreviewToolTransformer(baseServerUrl: baseServerUrl))
          .filter { $0.modified }
          .map { $0.state },
        actionSource
          .mapOmittingNil { $0 as? UuidAction<FileBrowser.Action> }
          .mapOmittingNil { action in
            guard let mainWindowState = self.appState.mainWindows[action.uuid] else {
              return nil
            }

            return StateActionPair(state: UuidState(uuid: action.uuid, state: mainWindowState),
                                   action: action.payload,
                                   modified: false)
          }
          .transform(by: FileBrowserTransformer())
          .filter { $0.modified }
          .map { $0.state },
        actionSource
          .mapOmittingNil { $0 as? UuidAction<OpenedFileList.Action> }
          .mapOmittingNil { action in
            guard let mainWindowState = self.appState.mainWindows[action.uuid] else {
              return nil
            }

            return StateActionPair(state: UuidState(uuid: action.uuid, state: mainWindowState),
                                   action: action.payload,
                                   modified: false)
          }
          .transform(by: OpenedFileListTransformer())
          .transform(by: previewTransformer.forOpenedFileList)
          .filter { $0.modified }

      })
      .addDisposableTo(self.disposeBag)

    // Preferences
    Observable
      .of(
        actionSource
          .mapOmittingNil { $0 as? PrefWindow.Action }
          .map { self.appStateActionPair(for: $0) }
          .transform(by: PrefWindowTransformer())
          .filter { $0.modified }
          .map { $0.state },
        actionSource
          .mapOmittingNil { $0 as? GeneralPref.Action }
          .map { self.appStateActionPair(for: $0) }
          .transform(by: GeneralPrefTransformer())
          .filter { $0.modified }
          .map { $0.state },
        actionSource
          .mapOmittingNil { $0 as? AppearancePref.Action }
          .map { self.appStateActionPair(for: $0) }
          .transform(by: AppearancePrefTransformer())
          .filter { $0.modified }
          .map { $0.state }
