   [fns]
   ;; This depends on the initial state we want
   (let [code [[:ldc 0 "; define main"]
-              [:ldf 'step]
+              (load-fn 0 fns 'step)
               [:cons]
               [:rtn]]
         main {:name 'main

    (macros form)

    (symbol? form)
    (if (some #(= (:name %) form) fns)
      [[:ldf form]]
      [[:ld 0 (.indexOf vars form)]])

    (vector? form)
    (if (empty? form)

           [:add "; inc"]])
   'dec (fn [x]
          [x
           [:ldc 1 "; dec"]
           [:sub "; dec"]])})

(defn load-var
  [vars name]
  (let [index (.indexOf vars name)]
    (if-not (neg? index)
      [:ld 0 index (format "; load var %s" name)])))

(defn load-fn
  ([fns name]
   (load-fn 1 fns name))
  ([frame fns name]
   (if-let [func (first (filter #(= (:name %) name) fns))]
     [:ld frame (.indexOf fns func) (format "; load fn %s" name)])))

(defn load-symbol
  [fns vars name]
  (if-let [load-stmt (or (load-fn fns name) (load-var vars name))]
    load-stmt
    (throw (IllegalArgumentException. (format "Could not find symbol %s" name)))))

(defn compile-form
  [vars fns form]
