     cleanupOnUninstall()
     setupEventHandlers()
     setApiKey()
-
-loadPackages = ->
-  AdmZip = require 'adm-zip'
-  fs = require 'fs'
-  os = require 'os'
-  path = require 'path'
-  execFile = require('child_process').execFile
-  request = require 'request'
-  rimraf = require 'rimraf'
-  ini = require 'ini'
 
 getUserHome = ->
   process.env[if process.platform == 'win32' then 'USERPROFILE' else 'HOME'] || ''

lastFile = ''
apiKey = null

# lazy-load packages during activation to speed up Atom startup time
AdmZip = null
fs = null
os = null
path = null
execFile = null
request = null
rimraf = null
ini = null

module.exports =
  config:

  activate: (state) ->
    packageVersion = atom.packages.getLoadedPackage('wakatime').metadata.version

    if not isCLIInstalled()
      installCLI(->
        console.log 'Finished installing wakatime cli.'
