 
     let previewService = PreviewService()
 
+    // AppState
     Observable
       .of(
         actionSource
           .mapOmittingNil { $0 as? AppDelegate.Action }
-          .map { StateActionPair(state: self.appState, action: $0, modified: false) }
+          .map { self.appStateActionPair(for: $0) }
           .transform(by: AppDelegateTransformer(baseServerUrl: baseServerUrl))
           .filter { $0.modified }
           .map { $0.state },
         actionSource
           .mapOmittingNil { $0 as? UuidAction<MainWindow.Action> }
-          .map { StateActionPair(state: self.appState, action: $0, modified: false) }
+          .map { self.appStateActionPair(for: $0) }
           .transform(by: UiRootTransformer())
           .transform(by: openQuicklyTransformer.forMainWindow)
           .filter { $0.modified }
           .map { $0.state },
         actionSource
           .mapOmittingNil { $0 as? FileMonitor.Action }
-          .map { StateActionPair(state: self.appState, action: $0, modified: false) }
+          .map { self.appStateActionPair(for: $0) }
           .transform(by: FileMonitorTransformer())
           .filter { $0.modified }
           .map { $0.state },
         actionSource
           .mapOmittingNil { $0 as? OpenQuicklyWindow.Action }
-          .map { StateActionPair(state: self.appState, action: $0, modified: false) }
+          .map { self.appStateActionPair(for: $0) }
           .transform(by: openQuicklyTransformer.forOpenQuicklyWindow)
           .filter { $0.modified }
           .map { $0.state }

      })
      .addDisposableTo(self.disposeBag)

    Observable
      .of(
        actionSource
          .mapOmittingNil { $0 as? PrefWindow.Action }
          .map { StateActionPair(state: self.appState, action: $0, modified: false) }
          .transform(by: PrefWindowTransformer())
          .filter { $0.modified }
          .map { $0.state },
        actionSource
          .mapOmittingNil { $0 as? GeneralPref.Action }
          .map { StateActionPair(state: self.appState, action: $0, modified: false) }
          .transform(by: GeneralPrefTransformer())
          .filter { $0.modified }
          .map { $0.state },
        actionSource
          .mapOmittingNil { $0 as? AppearancePref.Action }
          .map { StateActionPair(state: self.appState, action: $0, modified: false) }
          .transform(by: AppearancePrefTransformer())
          .filter { $0.modified }
          .map { $0.state }

          .map { $0.state },
        actionSource
          .mapOmittingNil { $0 as? UuidAction<PreviewTool.Action> }
          .mapOmittingNil { self.mainWindowStateActionPair(for: $0) }
          .transform(by: PreviewToolTransformer(baseServerUrl: baseServerUrl))
          .filter { $0.modified }
          .map { $0.state },
        actionSource
          .mapOmittingNil { $0 as? UuidAction<FileBrowser.Action> }
          .mapOmittingNil { self.mainWindowStateActionPair(for: $0) }
          .transform(by: FileBrowserTransformer())
          .filter { $0.modified }
          .map { $0.state },
        actionSource
          .mapOmittingNil { $0 as? UuidAction<OpenedFileList.Action> }
          .mapOmittingNil { self.mainWindowStateActionPair(for: $0) }
          .transform(by: OpenedFileListTransformer())
          .transform(by: previewTransformer.forOpenedFileList)
          .filter { $0.modified }
