    [UnityEngine Time Mathf Debug]
    [seawisphunter.minibuffer Minibuffer Command]))
 
-(log "minibuffer.lisp.core reloaded")
-
-;; This is just me trying to debug do-with-minibuffer
-(defonce defer-count 0)
+;(log "minibuffer.lisp.core reloaded")
+
 ;; gen-delegate, generate-generic-delegate, sys-func, and sys-action taken from
 ;; core-clr.clj and reworked from macros to be functions.
 

(defn do-with-minibuffer
  "Run (f Minibuffer/instance) when Minibuffer/instance is available.

   FIXME: I don't think this works currently."
  [f]
  (if (nil? Minibuffer/instance)
      (do
          (def defer-count (inc defer-count))
          (log "defering with-minibuffer")
        (Minibuffer/OnStart (gen-delegate Action [] (f Minibuffer/instance))) )
    (f Minibuffer/instance)))

(defmacro with-minibuffer
    [minibuffer-var & body]
    `(do-with-minibuffer (fn [~minibuffer-var] ~@body)))

(defmacro make-delegate
    [typeargs args f]
    (cond
     (some #{'&} args)                       (throw

                               nil)))
                      (eval `(make-delegate ~typeargs ~args ~f))))))

(defmacro defcmd
    "Define a Minibuffer command and function. The docstring is required.
  The typeargs define what C# types the function accepts and optionally what it
  returns. Minibuffer makes extensive use of the type information. Consider the
