   #
   # Returns an Array of TextNode instances.
   textNodes: ->
-    textNodes = getNodes(this.commonAncestor, isTextNode)
+    textNodes = filterNode(this.commonAncestor, isTextNode)
     [start, end] = [textNodes.indexOf(this.start), textNodes.indexOf(this.end)]
     # Return the textNodes that fall between the start and end indexes.
     return textNodes[start..end]

  return node.nodeType is TEXT_NODE


# Find the first Node in [start, end] (by step(node)) that passes the check.
findNode = (start, end, check, step) ->
  node = start
  node = step(node) while not (pass = check(node)) and node isnt end
  if pass then return node else return null


# Return the next Node in a first-to-last-child pre-order traversal.
preFirst = (node) ->
  if node.firstChild?

    if fn(node) then result.push(node)
    return node isnt last

  someNode(root, collect)

  return result

