   ["UFR" "URB" "UBL" "ULF" "DRF" "DFL" "DLB" "DBR"])
 
 (def solved-state
-  (State. solved-edges solved-corners))
+  (->State solved-edges solved-corners))
 
 (defn twist
   [piece-name amount]

  [scramble]
  "Turn all the moves into one of {U,D,L,R,F,B}"
  (let [moves (scramble-moves scramble)]
  (join " "
        (mapcat
          expand-move
          moves))))

(def solved-edges
  ; 0    1    2    3    4    5    6    7    8    9    10   11

(defn- apply-move-edges
  [edges move]
  (-> edges
      (permute (.edge-perm move))
      (orient  (.edge-orie move))))

(defn- apply-move-corners
  [corners move]
  (-> corners
      (permute (.corner-perm move))
      (orient  (.corner-orie move))))

(defn- apply-move
  [state move-name]
  (let [move (moves move-name)]
    (State. (apply-move-edges   (.edges state)   move)
            (apply-move-corners (.corners state) move))))

(defn scramble->state 
  [scramble]
  "Create a State record from a scramble"
  (let [moves (-> scramble
                  expand-scramble
                  scramble-moves)]
    (reduce apply-move
            solved-state
            moves)))

(defn- string->pieces
  [reid-string]
