     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
 


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

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

  # Switch the library into "serializable-only" mode.
  # If set to true, all public API calls will be restricted to return
  # strictly serializable data structures.
  # (References to DOM objects will be omitted.)
  restrictToSerializable: (value = true) -> @restricted = value

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

  #   content: the text content of the node, as rendered by the browser
  #   length: the length of the next content
  scan: ->
    if @domStableSince @lastScanned
      # We have a valid paths structure!
#      console.log "We have a valid DOM structure cache."
      return @allpaths

#    console.log "No valid cache, will have to calculate getAllPaths."
    startTime = @timestamp()
