     mappings = (for range in ranges
       mapping = @getMappingsForRange range.start, range.end
     )
-#    console.log "Raw mappings:"
-#    console.log mappings
-
-    if @restricted
-      mappings = (for mapping in mappings
-        cleanMapping = $.extend {}, mapping
-        delete cleanMapping.range
-        cleanMapping.nodes = (for node in cleanMapping.nodes
-          cleanNode = $.extend {}, node
-          cleanNode.element = $.extend {}, cleanNode.element
-          cleanNode.element.pathInfo = $.extend {}, cleanNode.element.pathInfo
-          delete cleanNode.element.pathInfo.node
-          cleanNode
-        )
-        cleanMapping
-      )
-#      console.log "Cleaned mappings:"
-#      console.log mappings
 
     mappings
 

    t2 = @timestamp()    
    console.log "Phase II of data collecting " + (t2 - t1) + " ms."

    if @restricted
      @cleanPaths = {}
      for path, info of @allPaths
        cleanInfo = $.extend({}, info);
        delete cleanInfo.node
        @cleanPaths[path] = cleanInfo
      @cleanPaths
    else
      @allPaths
 
  # Select the given path (for visual identification), and optionally scroll to it
  selectPath: (path, scroll = false) ->


  constructor: ->
    @setRealRoot()
    window.DomTextMapper.instances.push this

  # ===== Public methods =======

  # Consider only the sub-tree beginning with the given node.
  # 
