 
 
 (defn get-character-layer-pairs
+  "Generates a layer structure that mirrors the underlying graph, but with
+  characters as the things in the layers. Then it pairs these character layers
+  off with their adjacent layers"
   [layers characters]
   (let [char-layers (map (fn [layer]
                            (mapcat (fn [item]



(defn order-group
  [char-segs group order-attr]
  (first (reduce (fn [[segs i] char]
                   [(assoc-in segs [char order-attr :order] i)



(defn get-segments-by-layer-character
  "Takes character segments and organizes them by layer, and then by character"
  [char-segs layers]
  (let [layer-map (group-by #(-> % :dest :node :layer-id) char-segs)]
    (->> (drop 1 layers)
