 (defn comp-paths-to-bolts-map
   "return a map between the set of all complements in the given _bolt_,and the lazy sequence of bolts for that spec."
   [bolt comp-paths model depth max-depth]
-  (if (and (not (nil? bolt)))
-    (if (not (empty? comp-paths))
-      (zipmap
-       comp-paths
-       (mapfn #(let [spec (get-in bolt %)
-                     lexemes (get-lexemes model spec)
-                     bolts-at (if (< depth max-depth)
-                                  (lightning-bolts
-                                   model
-                                   (get-in bolt %)
-                                   depth max-depth))
-                     lexemes-before-phrases
-                     (lexemes-before-phrases depth max-depth)]
-                 (if lexemes-before-phrases
-                   (lazy-cat lexemes bolts-at)
-                   (lazy-cat bolts-at lexemes)))
-              comp-paths)))))
+  (when (and (not (nil? bolt))
+             (not (empty? comp-paths)))
+    (mapfn #(let [spec (get-in bolt %)
+                  lexemes (get-lexemes model spec)
+                  bolts-at (if (< depth max-depth)
+                             (lightning-bolts
+                              model
+                              (get-in bolt %)
+                              depth max-depth))
+                  lexemes-before-phrases
+                  (lexemes-before-phrases depth max-depth)]
+              (if lexemes-before-phrases
+                (lazy-cat lexemes bolts-at)
+                (lazy-cat bolts-at lexemes)))
+           comp-paths)))
 
 (defn add-comps
   "given a bolt, return the lazy sequence of all bolts derived from this bolt after adding,

  (flatten
   (mapfn (fn [bolt]
            (let [comp-paths (find-comp-paths bolt)
                  comp-bolts (vals (comp-paths-to-bolts-map bolt comp-paths model 0 max-total-depth))]
              ;; filter by the following constraint:
              ;; that for every path that points to a complement of a bolt,
              ;; there is a non-empty set of bolts that satisfies

                    (if (= false (get-in bolt-at [:phrasal]))
                      [(do-defaults (assoc-in bolt path bolt-at) model)]
                      (let [comp-paths (find-comp-paths bolt-at)
                            comp-bolts (comp-paths-to-bolts-map bolt-at comp-paths model (+ 1 depth) max-depth)]
                        (when (not (some empty? comp-bolts))
                          (mapfn #(do-defaults (assoc-in bolt path %) model)
                                 (add-comps bolt-at
