   [op var-lkp constr-lkp condition-types]
   (let [conditions (map #(case %1 :free [:satisfies :free]
                                   :bound [:requires :bound]) condition-types)]
-    ; this check is not required, it serves as an optimization
-    ; for exiting as early as possible in this highly likely situation
+    ;; this check is not required, it serves as an optimization
+    ;; for exiting as early as possible in this highly likely situation
     (if-not (reduce #(and %1 (subset?
                                (keys (get op (nth %2 0)))
                                (into #{} (keys (lookup/lookup-by-type constr-lkp (nth %2 1)))))) conditions)
       ()
       (let [sorted-constr (apply union (map #(build-match-list op
-                                                               ; this is shady but we only replace the constraints with their counts
-                                                               ; on the respective map
+                                                               ;; this is shady but we only replace the constraints with their counts
+                                                               ;; on the respective map
                                                                (fmap count (lookup/lookup-by-type constr-lkp (nth %1 1)))
                                                                %1) conditions))]
         (loop [open (list (map->BindingBranchNode {:op      op

               result ()]
          (let [[first-open & rest-open] open]
            (if-not (some? first-open)
              ; no unvisited branches, we are ready
              result
              ; get the first constraint to be matched
              (let [[first-constr rest-constr] (:todo first-open)]
                (if-not (some? first-constr)
                  ; every constraint has already been matched
                  (recur rest-open (cons first-open result))
                  ; continue matching
                  (recur (concat (branch-constr constr-lkp first-open) rest-open) result))))))))))

(defrecord SearchPlanCell [^Cost cost-calculator ^Weight weight-calculator ops constr-lkp free-count non-past-ops])

                                                                 weight-calculator op-binding
                                                                 cell constr-lkp)]
                               (if (not full?)
                                 ;; using up an empty slot
                                 (-> plans
                                     ;; yuck. the set might not even exist at this point.
                                     (update-in [index :ordered-cells]
                                                #(conj (if (nil? %1) (sorted-set-by compare-search-plan-cell-by-cost) %1) cell))
                                     (assoc-in [index :cells-by-free free] cell))
                                 ;; replacing the worst
                                 (let [evicted (-> ordered-cells first)]
                                   (-> plans
                                       ;; get rid of it from the cells-by-free map
                                       (update-in [index :cells-by-free] #(dissoc %1 (-> evicted :constr-lkp (lookup/lookup :free))))
                                       ;; get rid of it from the ordered cells set
                                       (update-in [index :ordered-cells] #(disj %1 evicted))
                                       ;; add new item to ordered cells set
                                       (update-in [index :ordered-cells] #(conj %1 cell))
                                       ;; add new item to cells-be-free map
                                       (assoc-in [index :cells-by-free free] cell)))))
                  :else plans)))
            plans
