 ;; === Factories for DSymbol instances
 
 (defn- parse-numbers [str]
-  (when (and str (< 0 (count (s/trim str))))
-    (map #(Integer/parseInt %) (-> str s/trim (s/split #"\s+")))))
+  (if (and str (< 0 (count (s/trim str))))
+    (map #(Integer/parseInt %) (s/split (s/trim str) #"\s+"))))
 
 (defn- parse-number-lists [str]
-  (when str
-    (map parse-numbers (-> str s/trim (s/split #",")))))
+  (if str
+    (map parse-numbers (s/split (s/trim str) #","))))
 
 (defn- pairs [data free]
-  (when (seq free)
+  (if (seq free)
     (let [pair [(first free) (first data)]
           rest-free (remove (set pair) free)]
       (lazy-seq (cons pair (pairs (rest data) rest-free))))))

        ipairs (map vector indices (rest indices))
        spins (fn [D] (for [[i j] ipairs] (or (v ds i j D) 0)))
        step (fn step [xs emap n]
               (when-let [[Di i D] (first xs)]
                 (if (nil? D)
                   (recur (rest xs) emap n)
                   (let [[Ei E] (sort [(emap Di) (or (emap D) n)])

  (indices [_] (range 0 (inc dim)))
  (s [_ i D] ((or (s# i) {}) D))
  (v [ds i j D]
     (if (and (element? ds D) (index? ds i) (index? ds j))
       (cond (= j (inc i)) ((or (v# i) {}) D)
             (= j (dec i)) ((or (v# j) {}) D)
             (= j i) 1
