           (f cue-local-var (show/get-variable cue-local-var))
           (show/add-variable-set-fn! cue-local-var f)))))))
 
-(defn- -init
+(defn -init
+  "Called during the first phase of object construction with the two
+  arguments identifying the grid coordinates of the cue to be tracked.
+  Validates that there is a cue there, and allocates object state."
   [x y]
   (core/init)
   (when (nil? *show*)

  ([this id]
   (show/end-effect! (get-in @(.state this) [:cue :key]) :when-id id)))

(defn- -kill
  "Terminate the cue immediately. If an id parameter is given, the cue
  will be killed only if it is still running the effect with the
  specified id."

        (-end this)
        (-start this))
      (let [v (nth (cue-variables this) (dec inlet)) ; One of the variable inlets; output its current value.
            current-val (get-cue-variable this v active)]
        (if (number? current-val)
          (.outlet this inlet (float current-val))
          (.outletBang this inlet))))))

(defn update-cue-variable
  "Max wants to set a value for a cue variable. Save a local copy to
  use when starting up future cues, and set the corresponding show
  variable if the cue is currently active."
  [this new-value v]
  (let [cue-local-key (keyword (:key v))
        {:keys [cue x y]} @(.state this)
        [_ active] (show/find-cue-grid-active-effect *show* x y)]
    (swap! (.state this) assoc-in [:variables cue-local-key] new-value)
    (when active (cues/set-cue-variable! cue v new-value :when-id (:id active)))))

(defn -inlet-float
  "Respond to a float message, meaning the value of one of the
  variable inlets has been set."
  [this new-value]
