          positions for each node in the underlying graph."}
   (memoize
    (fn [class-graph node-sep char-sep]
-     (let [{:keys [classes preds succs
+     (let [{:keys [classes block-classes preds succs
                    block-preds block-succs compacted]} class-graph
            [block-edges class-edges] ({:up [block-preds preds]
                                        :down [block-succs succs]} compacted)

(defn get-shift-ys
  "Calculates the relative y-positions of classes. If compacted upward, we walk
  the classes downward; for downward compaction, upward."
  [classes class-edges node-sep char-sep rel-ys compacted]
  (reduce (fn [ys class]
            (let [rel-op ({:up + :down -} compacted)
                  neighbor-ys (map #(rel-op (- (+ (get ys (:dest %))
                                                  (get rel-ys (:dest %)))
                                               (get rel-ys (:src %)))
                                            (* char-sep (dec (:weight %))))

            (into {}))))))


(defrecord ClassGraph [classes block-classes succs preds block-succs
                       block-preds sources sinks aligned compacted]
  YPlottable
  (ys [this node-sep char-sep]
    (memo-ys this node-sep char-sep))
