 ;; Database Management
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defn set-graph! [graph]
-  (swap! db (constantly graph)))
-
-(defn clear-db! []
+(defn set-word-db! [graph]
+  (swap! word-db (constantly graph)))
+
+(defn clear-word-db! []
   (set-graph! nil))
 
-(defn build-db!
+(defn build-word-db!
   ([]
-     (build-db! +default-corpus-file+))
+     (build-word-db! +default-corpus-file+))
   ([filename]
-     (set-graph! (make-graph (file-triples filename)))
-     @db))
+     (set-word-db! (make-graph (file-triples filename)))
+     @word-db))
 
 ;;;
 ;;  These are the actual "top-level" database API functions which are pleasantly
 ;; trivial to implement using the facilities we have created for parsing and
 ;; graph construction.  Primarily, these are responsible for atomic interaction
-;; with global state, which is limited to only the single var 'db'.
+;; with global state, which is limited to only the single atom 'word-db'.
 ;;
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;; (util/run-and-measure-timing
;;   (clojure.set/intersection
;;     (words-of-length @db 3)
;;     (words-excluding @db \A \E \I \O)
;;     (words-with-letter-position @db \F 0)
;;     ))
;;
;;  => {:response #{"FRY" "FLY" "FUG" "FUD" "FLU" "FUN" "FUB" "FUR"},

;; TODO: this is somewhat ugly.

(defn word-triples [word]
  (set (concat
         (map #(apply tuple %)
           (apply concat
             (for [c (map char (range (int \A) (inc (int \Z))))
