 
 (defn chain
   "chains our hook with original formatter"
-  [name hook original-formatter]
+  [name original-formatter hook]
   (let [call-original-formatter? (fn [value]
                                    (if (not (nil? original-formatter))
                                      (do ; TODO should we wrap this in try-catch instead?


(defn build-surrogate-body [value]
  (let [target (.-target value)]
    (template "ol"
              "list-style-type:none; padding-left:0px; margin-top:0px; margin-bottom:0px; margin-left:12px"
              (template "li" "margin-left:12px" (reference target (pr-str target))))))

(defn body-hook [value]
  (if (surrogate? value)

    (keyword? value) (keyword-template value)
    (symbol? value) (symbol-template value)
    (fn? value) (fn-template value)
    (deref? value) (deref-template value)))

(defn header-container-template [value]
  (cond
    (map? value) (header-map-template value)
    (set? value) (header-set-template value)
    (seq? value) (header-seq-template value)
    (coll? value) (header-coll-template value)))

(defn inlined-value-template [value]
  (or (atomic-template value)
