       (.add path-button))
     frame))
 
-(defn show-plugin [app]
+(defn show-plugin
+  "Show the plugin at a given location."
+  [app]
   (load-mm app)
   (when-not @control-frame
     (reset! control-frame (startup)))
   (.show @control-frame))
 
-(defn handle-exit []
+(defn handle-exit
+  "Runs when application exits."
+  []
   (stop))
 
 ;; testing
 
-(defn test-lib [] (first (keys (devices-in-each-module))))
-
-(defn test-unload []
+(defn test-lib
+  "Get the first module with loaded devices."
+  []
+  (first (keys (devices-in-each-module))))
+
+(defn test-unload
+  "Attemt to unload a the test library."
+  []
   (core unloadLibrary (test-lib)))
-
-;(def test-file (file default-directory "mmgr_dal_DemoCamera.dll"))

(ns DLLAutoReloader.core
  (:use [clojure.java.io :only (file copy)]
        [clojure.data :only (diff)]
        [org.micromanager.mm :only (edt load-mm mmc core gui)]
        [clojure.pprint :only (pprint)])
  (:import (javax.swing JButton JFrame JLabel JWindow)
           (java.awt Color)
           (java.awt.event ActionListener)

(def dll-directory-type (FileDialogs$FileType. "DLL Directory" "New DLL location" "" false nil))

(defn choose-dll-dir
  "Presents user with a dialog for choosing the directory from which DLLs will be reloaded."
  []
  (FileDialogs/openDir nil "Please choose a directory where new DLLs will appear"
                       dll-directory-type))
