                                               (fn [x]
                                                 {:url x
                                                  :src-xpath (cons action src-xpath)})
-                                              extracted-hrefs))]
+                                              extracted-hrefs))
+                       new-paging-q (concat paging-q (map
+                                                      (fn [x]
+                                                        {:url x
+                                                         :src-xpath src-xpath})
+                                                      pagination-extracted))]
                    (utils/sayln :items (count extracted-hrefs))
                    (recur {:content-queue new-content-q
-                           :paging-queue paging-q}
+                           :paging-queue new-paging-q}
                           (conj visited url)
                           num-leaves
                           leaf?
                           stop?
                           action-seq
                           pagination
-                          (merge corpus {url body})))))))))
+                          corpus))))))))

                                                                 first
                                                                 :path)}}]
                            (merge corpus corpus-entry)))))

               :else
               (let [{new-bodies  :bodies
                      new-visited :visited}

               (leaf? action-seq (first content-q))
               (do
                 (utils/sayln :reached-leaf)
                 (let [pagination-extracted (if (pagination src-xpath)
                                              (dom/eval-anchor-xpath
                                               (pagination src-xpath)
                                               (dom/html->xml-doc body)
                                               (-> content-q first :url)
                                               (clojure.set/union
                                                visited
                                                (map :url content-q)))
                                              [])]
                   (recur {:content-queue (concat
                                           (map
                                            (fn [x]
                                              {:url x
                                               :src-xpath src-xpath})
                                            pagination-extracted)
                                           (rest content-q))
                           :paging-queue  paging-q}
                          (conj visited (-> content-q first :url))
                          (+ 1 num-leaves)
                          leaf?
                          stop?
                          action-seq
                          pagination
                          (merge corpus {(-> content-q first :url)
                                         body}))))

               (and (empty? content-q)
                    (not
                     (empty? paging-q)))
               (let [sorted-pagination-entries (sort-by
                                                #(-> :src-xpath count)
                                                paging-q)
                     chosen-entry (last sorted-pagination-entries)
                     remaining-pagination (filter
                                           (fn [x] (not= x chosen-entry))
                                           paging-q)]
                 (recur {:content-queue (concat [chosen-entry]
                                                content-q)
                         :paging-queue remaining-pagination}
                        visited
                        num-leaves
                        leaf?
                        stop?
                        action-seq
                        pagination
                        corpus))
               
               :else
               (do
                 (utils/sayln :here)
