   configDefaults:
     openProjectFindResultsInRightPane: false
 
-  activate: ({viewState, projectViewState, resultsModelState, paneViewState}={}) ->
+  activate: ({@viewState, @projectViewState, @resultsModelState}={}) ->
     atom.project.registerOpener (filePath) =>
       new ResultsPaneView() if filePath is ResultsPaneView.URI
 
     atom.workspaceView.command 'project-find:show', =>
-      @createProjectFindView(projectViewState, resultsModelState)
+      @createProjectFindView()
       @findView?.detach()
       @projectFindView.attach()
 
     atom.workspaceView.command 'project-find:show-in-current-directory', (e) =>
-      @createProjectFindView(projectViewState, resultsModelState)
+      @createProjectFindView()
       @findView?.detach()
       @projectFindView.attach()
       @projectFindView.findInCurrentlySelectedDirectory($(e.target))

    @projectFindView?.remove()
    @projectFindView = null

  serialize: ->
    viewState: @findView.serialize()
    projectViewState: @projectFindView.serialize()
    resultsModelState: @resultsModel.serialize()

    # See https://github.com/atom/find-and-replace/issues/63
    ResultsPaneView.model = @resultsModel

  createFindView: ->
    @findView ?= new FindView(@viewState)

  deactivate: ->
    @findView?.remove()
