                                  processed-pg
                                  url
                                  blacklist)
+
+           template-removed     (map
+                                 (fn [[xpath infos]]
+                                   (let [template-links (-> xpath
+                                                            template-removed
+                                                            set)]
+                                     [xpath (filter
+                                             (fn [{_ :node href :href _1 :text}]
+                                               (not (some #{href} template-links)))
+                                             infos)]))
+                                 xpaths-hrefs-text)
+           
            xpaths-anchors-chars (map
                                  (fn [[xpath nodes]]
                                    [xpath (map

                                                             :text
                                                             count)})
                                           nodes)])
                                 xpaths-hrefs-text)

           page-wide-nav-chars  (reduce
                                 (fn [acc [xpath nodes]]

  (require [crawler.dom :as dom]))

(defn state-action
  "Args:
    page-src : the body
    url      : the source url
    template-removed: Xpath, Href pairs that we remove from the decision space"
  ([page-src url template-removed]
     (state-action page-src url template-removed []))

  ([page-src url template-removed blacklist]
     (let [processed-pg         (dom/html->xml-doc page-src)

           ; xpaths nodes and associated anchor-text
