 
 (def formatter (f/formatter "yyyy-MM-dd"))
 
-(defn elect [circle record _]
-  (g/elect-to-role circle (elected-role-mapping (nth record 2))
-                   (second record) (f/parse formatter (nth record 3))))
+(defn elect [circle [_ person-name role-name expiration] _]
+  (g/elect-to-role circle (elected-role-mapping role-name)
+                   person-name (f/parse formatter expiration)))
 
-(defn appoint [circle record _]
-  (if (= 4 (count record))
-    (g/appoint-to-role circle (nth record 2) (second record) (nth record 3))
-    (g/appoint-to-role circle (nth record 2) (second record))))
+(defn appoint [circle [_ person-name role-name focus] _]
+  (g/appoint-to-role circle role-name person-name focus))
 
-(defn unappoint [circle record _]
-  (g/unappoint-from-role circle (nth record 2) (second record)))
+(defn unappoint [circle [_ person-name role-name] _]
+  (g/unappoint-from-role circle role-name person-name))
 
 (def commands {:create    modify-entity
                :delete    modify-entity

           (RuntimeException.
             (format "Unable to execute governance record: %s " record) e)))))

(defn modify-entity [circle record function-primary]
  (let [function-secondary (first (second record))
        function-name (format "%s-%s"
                              (name function-primary) (name function-secondary))
        fn (resolve (symbol "freefrog.lang" function-name))
        entity-name (nth record 2)
        params (->> record
                    (drop 3)
                    (map convert-to-pair)

(defn process-command
  "Execute the given governance transformation on the given
   circle, returning the new circle."
  [circle [function-primary :as record]]
  (let [command (function-primary commands)]
    (if command
      (command circle record function-primary)
      (do
