     #)()
 
     ntrapy.pollTree = =>
-      ntrapy.poller = setInterval @getMappedData, @config.interval, "/roush/nodes/1/tree", @wsTemp, mapping
+      unless ntrapy.poller? then ntrapy.poller = setInterval @getMappedData, @config.interval, "/roush/nodes/1/tree", @wsTemp, mapping
+      console.log "poller: ", ntrapy.poller
 
-    ntrapy.stopTree = =>
-      clearInterval ntrapy.poller
+    ntrapy.stopTree = ->
+      ntrapy.poller = clearInterval ntrapy.poller if ntrapy.poller?
+      console.log "poller: ", ntrapy.poller
 
     @getData "/api/config", (data) =>
       # Store config

      @siteActive()?.template ? {} # TODO: Needs .template?() if @siteNav is mapped

    @getActions = (node) =>
      ntrapy.stopTree()
      @getData "/roush/nodes/#{node.id()}/adventures", (data) ->
        node.actions (n for n in data.adventures)

    @doAction = (data, parent) =>
      console.log data, parent

    @ # Return ourself



  ntrapy.indexModel = new IndexModel()
  ko.applyBindings ntrapy.indexModel

  $(document).on "click.dropdown.data-api", ntrapy.pollTree
