 
 ;; Public API.
 
-(defn ^:export db [conn]
-  (transact/db conn))
+(def ^:export db d/db)
 
 (defn ^:export q [db find options]
   (let [find (cljs.reader/read-string find)
         opts (cljify options)]
     (take-pair-as-promise!
-      (db/<?q db find opts)
+      (d/<q db find opts)
       clj->js)))
 
 (defn ^:export ensure-schema [conn simple-schema]

        datoms (simple-schema/simple-schema->schema simple-schema)]
    (println "Transacting schema datoms" (pr-str datoms))
    (take-pair-as-promise!
      (transact/<transact!
        conn
        datoms)
      clj->js)))

  ;; Expects a JS array as input.
  (try
    (let [tx-data (js->tx-data tx-data)]
      (go-promise clj->js
        (let [tx-result (<? (d/<transact! conn tx-data))]
          (select-keys tx-result
                       [:tempids
                        :added-idents
