   (.warn js/console (apply str args))
   false)
 
+
+(defn hash-map-with-name-keys
+  [v]
+  (zipmap (map :name v) v))
+
+
 (defn extract-arg-data
   "Package up all the relevant data for validation purposes from the xxx-args-desc map into a new map."
   [args-desc]
-  {:names       (set (map :name args-desc))
-   :required    (->> args-desc
-                     (filter :required)
-                     (map :name)
-                     set)
-   :validate-fns (filter :validate-fn args-desc)})
+  {:arg-names      (set (map :name args-desc))
+   :required-args  (->> args-desc
+                        (filter :required)
+                        (map :name)
+                        set)
+   :validated-args (->> (filter :validate-fn args-desc)
+                        vec
+                        (hash-map-with-name-keys))})
 
 ;; ----------------------------------------------------------------------------
 ;; Primary validation functions
 ;; ----------------------------------------------------------------------------
 
-(defn args-names-valid?
-  "Checks that arg names passed in are all one of the expected ones. If so, returns true. Prints errors to console."
+(defn arg-names-valid?
+  "returns true if every passed-args is value. Otherwise log the problem and return false"
   [defined-args passed-args]
   (or (superset? defined-args passed-args)
       (let [missing-args (remove defined-args passed-args)]
         (log-error "Invalid arguments: " missing-args))))
 
 (defn required-args-passed?
-  "Checks that all :required args are included in the arg list. If so, returns true. Prints errors to console"
+  "returns true is all the required args are supplied. Otherwise log the error and return false."
   [required-args passed-args]
   (or (superset? passed-args required-args)
       (let [missing-args (remove passed-args required-args)]

   Normally used for a call to the {:pre...} at the beginning of a function."
  [arg-defs passed-args]
  (let [passed-arg-keys (set (keys passed-args))]
    (and (args-names-valid?     (:names        arg-defs) passed-arg-keys)
         (required-args-passed? (:required     arg-defs) passed-arg-keys)
         (validate-fns-pass?    (:validate-fns arg-defs) passed-args))))


;; ----------------------------------------------------------------------------


(defn validate-arg-against-set
  "Validates the passed argument against the expected set."
  [arg arg-name valid-set]
  (or (contains? valid-set arg)
      (str "Invalid " arg-name ". Expected one of " valid-set ". Got '" (left-string arg 40) "'")))

(defn justify-style?
  [arg]
