Refactoring in datomic sample