   (let [a-comp-b (compare (:seed a) (:seed b))
         plus (fnil + 0)]
     (vector
-     (assoc a :avg-pts (* (:weight a) (plus (when (pos? a-comp-b)
-                                              upset-pts)
-                                            pick-pts)))
-     (assoc b :avg-pts (* (:weight b) (plus (when (neg? a-comp-b)
-                                              upset-pts)
-                                            pick-pts))))))
-
-(defn ->tournament-teams
-  "Transform a sequence of team data into a map of team name->tournament team data."
-  [team-data]
-  (->> team-data
-       (remove (comp nil? :seed))
-       (map #(vector (:name %) (assoc % :weight 1 :avg-pts 0 :expected-value 0)))
-       (into {})))
-
-(defn ->tournament-bracket
-  "Transforms a bracket of team names and a map of tourament team data into a bracket of tournament teams."
-  [bracket tournament-teams]
-  (walk/postwalk-replace
-    tournament-teams
-    bracket))
-
-(defn- treeify-dispatch [node]
-  (cond
-    (and (coll? node) (= (count node) 2) (map? (first node)) (map? (last node)))
-    :branch
-
-    (and (map? node) (not (contains? node :upper)) (not (contains? node :lower)))
-    :leaf))
-
-(defmulti #^{:private true} treeify
-  treeify-dispatch)
-(defmethod treeify :default [node]
-  node)
-(defmethod treeify :branch [[upper lower]]
-  {:upper upper :lower lower})
-(defmethod treeify :leaf [node]
-  {:data {:teams (list node)} :upper nil :lower nil})
-
-(defn ->tournament-tree [bracket]
-  (walk/postwalk
-    treeify
-    bracket))
+      (assoc a :avg-pts (* (:weight a) (plus (when (pos? a-comp-b)
+                                               upset-pts)
+                                             pick-pts)))
+      (assoc b :avg-pts (* (:weight b) (plus (when (neg? a-comp-b)
+                                               upset-pts)
+                                             pick-pts))))))
 
 (defmulti #^{:private true} compute-matchup
-  "Compute a matchup.  The first argument is an associative structure that gives the points per a correct pick
-  for each round.  The second argument is an associative structure that gives the points per an upset pick for each
-  round.  The third and final argument is the matchup data to perform the computation on."
-  (fn [_ _ field]
-    (cond
-      (and (coll? field) (= (count field) 2) (map? (first field)) (map? (last field)))
-      :leaf
-      (and (coll? field) (= (count field) 2) (coll? (first field)) (coll? (last field)))
-      :branch)))
+          "Compute a matchup.  The first argument is an associative structure that gives the points per a correct pick
+          for each round.  The second argument is an associative structure that gives the points per an upset pick for each
+          round.  The third and final argument is the matchup data to perform the computation on."
+          (fn [_ _ field]
+            (cond
+              (and (coll? field) (= (count field) 2) (map? (first field)) (map? (last field)))
+              :leaf
+              (and (coll? field) (= (count field) 2) (coll? (first field)) (coll? (last field)))
+              :branch)))
 (defmethod compute-matchup :default [_ _ matchup]
   matchup)
 (defmethod compute-matchup :branch [pick-pts-fn upset-pts-fn [[upper-field] [lower-field] :as fields]]

  (Math/round
    (/ (Math/log x)
       (Math/log 2))))

(defn weighted-pairing-log5
  "Compute and update the chance that Team a and Team b will advance when playing against each other,

  (vector
    (map
      #(update-in % [:expected-value] (fnil + 0 0)
                  (get-in parent-team-map [(:name %) :expected-value])
                  (:avg-pts %))
      field)
    children))

