anchor.diff:          (set-scroll-callback 'scroll-handler)
           (gl:clear-color 0 0 0 1.0)
   
  -        (with-viewer-lock (viewer)
  -          (with-slots (should-close window-open) viewer
  -            (setf should-close nil)
  -            (setf window-open t)))
  -
  -        ;; The 'event loop'
           (loop until (window-should-close-p)
  -           do
  -             (with-viewer-lock (viewer)
  -               (check-for-state-changes viewer)
  -               (render viewer nil))
  +           do (view-idle viewer window)
  +           do (render viewer window)
              do (swap-buffers)
  -           do (poll-events))
  -        (with-viewer-lock (viewer)
  -          (with-slots (objects) viewer
  -            (dolist (object objects)
  -              (cleanup (cdr object)))))))))
  +           do (poll-events))))))
   
   (defun show-viewer (viewer &optional (in-thread nil))
     (if in-thread
  
positive.code: 
  (defun set-viewport (viewer new-viewport)
    (with-viewer-lock (viewer)
      (with-slots (viewport modified) viewer
        (setf viewport new-viewport))))
  
  (defun close-viewer (viewer)
    (with-viewer-lock (viewer)
      (with-slots (window-open should-close) viewer
        (when window-open
          (set should-close t)))))
  
  (defun add-object (viewer name object)
    (with-viewer-lock (viewer)
      (with-slots (objects modified) viewer
        (if-let ((item (assoc name objects)))
          (setf (cdr item) object)
          (push (cons name object) objects))
        (setf modified t))))
  
  (defun scale-object (viewer object-name scale)
    (with-viewer-lock (viewer)
      (with-slots (objects modified) viewer
        (when-let ((items (assoc object-name objects)))
          (nmscale (slot-value (cdr items) 'transformation) (vec3 scale scale scale))))))
  
  (defun translate-object (viewer object-name offset)
    (with-viewer-lock (viewer)
      (with-slots (objects modified) viewer
        (when-let ((items (assoc object-name objects)))
          (nmtranslate (slot-value (cdr items) 'transformation) offset)))))
  
  (defun rotate-object (viewer object-name vector angle)
    (with-viewer-lock (viewer)
      (with-slots (objects modified) viewer
        (when-let ((items (assoc object-name objects)))
          (nmrotate (slot-value (cdr items) 'transformation) vector angle)))))
  
  (defun rm-object (viewer name)
    (with-viewer-lock (viewer)
      (with-slots (objects to-cleanup modified) viewer
        (when-let ((items (assoc name objects)))
          (push items to-cleanup)
          (setf objects (remove name objects :key #'car))
          (setf modified t)))))
  
  (defun recompile-shaders (viewer name)
    (with-viewer-lock (viewer)
      (with-slots (objects to-cleanup modified) viewer
        (if-let ((items (assoc name objects)))
          (progn 
            (format t "Rebuilding shader for ~a~%" items)
  
negative.code:         (progn 
            (format t "Could not find shader for ~a~%" name))))))
  
  (defun clear (viewer)
    (with-viewer-lock (viewer)
      (with-slots (objects to-cleanup) viewer
        (setf to-cleanup objects)
        (setf objects nil))))
  
  