 class DockController extends KDViewController
 
+  isRunning = (item) -> item?.state is 'running'
+
   defaultItems = [
-    { title : "Activity",  path : "/Activity", order : 10, type :"persistent" }
-    { title : "Teamwork",  path : "/Teamwork", order : 20, type :"persistent" }
-    { title : "Terminal",  path : "/Terminal", order : 30, type :"persistent" }
-    { title : "Editor",    path : "/Ace",      order : 40, type :"persistent" }
-    { title : "Apps",      path : "/Apps",     order : 50, type :"persistent" }
-    { title : "DevTools",  path : "/DevTools", order : 60, type :"persistent" }
+    { title : 'Activity',  path : '/Activity', order : 10, type :'persistent' }
+    { title : 'IDE',       path : '/IDE',      order : 40, type :'persistent' }
+    { title : 'Terminal',  path : '/Terminal', order : 30, type :'persistent' }
+    # { title : 'Teamwork',  path : '/Teamwork', order : 20, type :'persistent' }
+    # { title : 'Apps',      path : '/Apps',     order : 50, type :'persistent' }
+    # { title : 'DevTools',  path : '/DevTools', order : 60, type :'persistent' }
   ]
 
+
   constructor:(options = {}, data)->
+
     options.view or= new KDCustomHTMLView domId : 'dock'
 
     super options, data
 
     @storage = new AppStorage "Dock", "1.0.3"
 
+    loaderOptions =
+      spinnerOptions    :
+        size            :
+          width         : 16
+        loaderOptions   :
+          color         : '#B8B8B8'
+
     @navController = new MainNavController
-      view         : new NavigationList
-        domId      : 'main-nav'
-        testPath   : 'navigation-list'
-        type       : 'navigation'
-        itemClass  : NavigationLink
-        testPath   : 'navigation-list'
-      wrapper      : no
-      scrollView   : no
+      view                : new NavigationList
+        domId             : 'main-nav'
+        testPath          : 'navigation-list'
+        type              : 'navigation'
+        itemClass         : NavigationLink
+        testPath          : 'navigation-list'
+      wrapper             : no
+      scrollView          : no
+      startWithLazyLoader : yes
+      lazyLoaderOptions   : loaderOptions
+
     ,
       id           : 'navigation'
       title        : 'navigation'
       items        : []
 
-    mainController = KD.getSingleton 'mainController'
-
-    mainController.ready @bound 'accountChanged'
+
+    @vmsList = new KDListViewController
+      wrapper             : no
+      scrollView          : no
+      startWithLazyLoader : yes
+      itemClass           : NavigationVMItem
+      lazyLoaderOptions   : loaderOptions
+    ,
+      id           : 'vms'
+      title        : 'vms'
+      items        : []
+
+
+    {mainController} = KD.singletons
+
+    # mainController.ready @bound 'accountChanged'
 
     @trackStateTransitions()
     @bindKeyCombos()

    { path } = item.getData()
    KD.singletons.router.handleRoute path

  bindKeyCombos: ->
    { globalKeyCombos } = KD.singletons

    globalKeyCombos

      item = @itemStates[i]
      return item  if item is this or predicate item


  activatePreviousApp: (e) ->

    e.preventDefault()
    item = @getRelativeItem -1, isRunning
    @setActiveItem item.item


  activateNextApp: (e) ->

    e.preventDefault()
    item = @getRelativeItem 1, isRunning
    @setActiveItem item.item


  setActiveItem: (item) ->

    KD.singletons.router.handleRoute item.getData().path


  trackStateTransitions: ->

    @itemStates = []
    @activeIndex = null
    @on 'NavItemStateChanged', (info) ->
