 ;; Loading visible tiles
 
 (defn overlay-loader
+  "Creates overlay tiles for visible monochrome tiles in memory."
   [screen-state-atom memory-tile-atom overlay-tiles-atom]
   (let [visible-tile-positions (tiles-in-pixel-rectangle
                                  (screen-rectangle @screen-state-atom)

  "Runs visible-loader whenever screen-state-atom changes."
  [screen-state-atom memory-tile-atom
   overlay-tiles-atom acquired-images]
  (let [react-mem-fn (fn [_ _] (visible-loader screen-state-atom memory-tile-atom
                                           acquired-images))
        react-vis-fn (fn [_ _] (overlay-loader screen-state-atom memory-tile-atom
                                               overlay-tiles-atom))
        agent (agent {})]
    (def agent1 agent)
    (reactive/handle-update
      memory-tile-atom
      react-vis-fn
      agent)
    (reactive/handle-update
      screen-state-atom
      react-mem-fn
      agent)
    (reactive/handle-update
      acquired-images
      react-mem-fn
      agent)
    ))
  

                               (multi-color-tile memory-tile-atom tile
                                                 (:channels @screen-state-atom)))))))

(defn monochrome-loader
  "Loads monochrome tiles needed for drawing."
  [screen-state-atom memory-tile-atom acquired-images]
  (let [visible-tile-positions (tiles-in-pixel-rectangle
                                 (screen-rectangle @screen-state-atom)
