Datomic refactoring