refactorings in datomic util