   ([keychain]
    (log/trace "get-ds " keychain)
    (cond
-     (k/proper-keychain? keychain)
+     (ds/proper-keychain? keychain)
      (do
        (log/trace "proper keychain: " keychain)
        (let [r (get-proper-emap keychain)]
          r))
 
-     (k/improper-keychain? keychain)
+     (ds/improper-keychain? keychain)
      (do
        (log/trace "improper-keychain: " keychain)
        (let [r (get-kinded-emap keychain)]

(defn fetch
  [^Key k]
  ;; FIXME: validate k
  (.get ds k))

(defn- make-embedded-entity
  [m]

;;           em (PersistentEntityMap. e nil)]
;;       (try
;;         (f em)
;;         (.put datastore e)
;;         (.commit txn)
;;         (finally
;;           (if (.isActive txn)
;;             (.rollback txn))))
;;       em)
;;     (let [k (apply entity-key keychain)
;;           e (try (.get datastore k)
;;                  (catch EntityNotFoundException e
;;                    ;;(log/trace (.getMessage e))
;;                    e)
