   constructor: (params={}) ->
     {@blobStore, @applicationDelegate, @window, @document, configDirPath, @enablePersistence, onlyLoadBaseStyleSheets} = params
 
-    debouncedSaveState = _.debounce((=> @saveState()), @saveStateDebounceInterval)
-    @document.addEventListener('mousedown', debouncedSaveState, true)
-    @document.addEventListener('keydown', debouncedSaveState, true)
-
-
     @loadTime = null
     {devMode, safeMode, resourcePath} = @getLoadSettings()
 


_ = require 'underscore-plus'
{deprecate} = require 'grim'
{CompositeDisposable, Emitter} = require 'event-kit'
fs = require 'fs-plus'
{mapSourcePosition} = require 'source-map-support'
Model = require './model'

    @registerDefaultViewProviders()

    @installUncaughtErrorHandler()
    @attachSaveStateListeners()
    @installWindowEventHandler()

    @observeAutoHideMenuBar()
