Update datomic, add connection middleware