Repository: accelerated-text/accelerated-text (language: python)

Issue:
Unify code formatting
https://github.com/weavejester/cljfmt


Discussion / hints:

Fix patch:
diff --git a/api/Makefile b/api/Makefile
index 61bc64e1d..9c5e8ef6c 100644
--- a/api/Makefile
+++ b/api/Makefile
@@ -1,11 +1,8 @@
 lint:
-	clojure -Sdeps '{:deps {clj-kondo/clj-kondo {:mvn/version "RELEASE"}}}' -m clj-kondo.main --lint src test
+	clj -M:lint
 
-fmt-check:
-	clojure -Sdeps '{:deps {cljfmt/cljfmt {:mvn/version "0.7.0"}}}' -m cljfmt.main check
-
-fmt-fix:
-	clojure -Sdeps '{:deps {cljfmt/cljfmt {:mvn/version "0.7.0"}}}' -m cljfmt.main check
+fix-format:
+	clojure -M:format fix
 
 unit-tests:
 	clojure -A:test -e:integration
diff --git a/api/deps.edn b/api/deps.edn
index 922849c8a..7d87f169e 100644
--- a/api/deps.edn
+++ b/api/deps.edn
@@ -21,13 +21,17 @@
  :paths     ["src" "resources"]
  :mvn/repos {"central" {:url "https://repo1.maven.org/maven2/"}
              "clojars" {:url "https://repo.clojars.org/"}}
- :aliases   {:dev
-             {:extra-paths ["test" "test/resources"]}
-             :test
-             {:extra-paths ["test"]
-              :extra-deps  {com.cognitect/test-runner {:git/url "https://github.com/cognitect-labs/test-runner"
-                                                       :sha     "028a6d41ac9ac5d5c405dfc38e4da6b4cc1255d5"}}
-              :main-opts   ["-m" "cognitect.test-runner"]}
-              :coverage {:extra-paths ["test"]
-                         :extra-deps {cloverage/cloverage {:mvn/version "1.2.2"}}
-                         :main-opts ["-m" "cloverage.coverage" "-p" "src" "-s" "test" "--codecov" "--runner" "clojure.test"]}}}
+ :aliases   {:dev      {:extra-paths ["test" "test/resources"]}
+             :test     {:extra-paths ["test"]
+                        :extra-deps  {com.cognitect/test-runner {:git/url "https://github.com/cognitect-labs/test-runner"
+                                                                 :sha     "028a6d41ac9ac5d5c405dfc38e4da6b4cc1255d5"}}
+                        :main-opts   ["-m" "cognitect.test-runner"]}
+             :coverage {:extra-paths ["test"]
+                        :extra-deps  {cloverage/cloverage {:mvn/version "1.2.2"}}
+                        :main-opts   ["-m" "cloverage.coverage" "-p" "src" "-s" "test" "--codecov" "--runner" "clojure.test"]}
+             :lint     {:extra-paths ["test"]
+                        :extra-deps  {clj-kondo/clj-kondo {:mvn/version "RELEASE"}}
+                        :main-opts   ["-m" "clj-kondo.main" "--lint" "src" "test"]}
+             :format   {:extra-paths ["test"]
+                        :extra-deps  {cljfmt/cljfmt {:mvn/version "0.8.0"}}
+                        :main-opts   ["-m" "cljfmt.main"]}}}
diff --git a/api/src/api/auth/middleware.clj b/api/src/api/auth/middleware.clj
index 197c16ff7..34b344873 100644
--- a/api/src/api/auth/middleware.clj
+++ b/api/src/api/auth/middleware.clj
@@ -11,7 +11,7 @@
 
 (defn append-auth-info [{:keys [headers] :as req}]
   (let [token (:auth-token (normalize-headers headers))
-        info (service/request token)]
+        info  (service/request token)]
     (assoc req :auth-info info)))
 
 (defn dummy-auth-info [req]
diff --git a/api/src/api/error.clj b/api/src/api/error.clj
index 8f86ece77..ddaf8f593 100644
--- a/api/src/api/error.clj
+++ b/api/src/api/error.clj
@@ -3,33 +3,30 @@
             [clojure.tools.logging :as log]
             [clojure.stacktrace :as st]))
 
-
 (derive ::error ::exception)
 (derive ::failure ::exception)
 
-
 (defn exception-handler [type exception request]
   {:status 500
-   :body {:type type
-          :exception (.getClass exception)
-          :data (ex-data exception)
-          :uri (:uri request)}})
-
+   :body   {:type      type
+            :exception (.getClass exception)
+            :data      (ex-data exception)
+            :uri       (:uri request)}})
 
 (def exception-middleware
   (exception/create-exception-middleware
    (merge
     exception/default-handlers
     {;; ex-data with :type ::error
-     ::error (partial exception-handler "error")
+     ::error             (partial exception-handler "error")
 
      ;; ex-data with ::exception or ::failure
-     ::exception (partial exception-handler "exception")
+     ::exception         (partial exception-handler "exception")
 
      ;; override the default handler
      ::exception/default (partial exception-handler "default")
 
      ;; print stack-traces for all exceptions
-     ::exception/wrap (fn [handler e request]
-                        (log/errorf "Uri: %s Stacktrace: \n%s" (:uri request) (with-out-str (st/print-stack-trace e)))
-                        (handler e request))})))
+     ::exception/wrap    (fn [handler e request]
+                           (log/errorf "Uri: %s Stacktrace: \n%s" (:uri request) (with-out-str (st/print-stack-trace e)))
+                           (handler e request))})))
diff --git a/api/src/api/graphql/domain/concept.clj b/api/src/api/graphql/domain/concept.clj
index 89c2bb7c4..b80fee407 100644
--- a/api/src/api/graphql/domain/concept.clj
+++ b/api/src/api/graphql/domain/concept.clj
@@ -6,25 +6,25 @@
 
 (defn list-concepts [{:keys [auth-info]} _ _]
   (resolve-as
-    (merge
-      {:id         "concepts"
-       :concepts   []
-       :amr        (->> (amr-entity/list-amrs (:group-id auth-info))
-                        (map concept-translate/amr->schema)
-                        (sort-by :id))
-       :rgl        (->> (concat ops/syntax ops/extra)
-                        (sort-by #(-> [(:category %) (:args %) (:label %)]))
-                        (map concept-translate/operation->schema))
-       :structural (map concept-translate/operation->schema ops/structural-words)
-       :grammar    (map concept-translate/operation->schema ops/grammar)
-       :paradigms  (->> (amr-entity/list-rgls (:group-id auth-info))
-                        (map concept-translate/amr->schema)
-                        (sort-by :id))}
-      (->> ops/paradigms
-           (group-by :module)
-           (reduce-kv (fn [m k v]
-                        (assoc m (keyword k) (map concept-translate/operation->schema v)))
-                      {})))))
+   (merge
+    {:id         "concepts"
+     :concepts   []
+     :amr        (->> (amr-entity/list-amrs (:group-id auth-info))
+                      (map concept-translate/amr->schema)
+                      (sort-by :id))
+     :rgl        (->> (concat ops/syntax ops/extra)
+                      (sort-by #(-> [(:category %) (:args %) (:label %)]))
+                      (map concept-translate/operation->schema))
+     :structural (map concept-translate/operation->schema ops/structural-words)
+     :grammar    (map concept-translate/operation->schema ops/grammar)
+     :paradigms  (->> (amr-entity/list-rgls (:group-id auth-info))
+                      (map concept-translate/amr->schema)
+                      (sort-by :id))}
+    (->> ops/paradigms
+         (group-by :module)
+         (reduce-kv (fn [m k v]
+                      (assoc m (keyword k) (map concept-translate/operation->schema v)))
+                    {})))))
 
 (defn- resolve-as-not-found-concept [id]
   (resolve-as nil {:message (format "Cannot find concept with id `%s`." id)}))
diff --git a/api/src/api/graphql/domain/data.clj b/api/src/api/graphql/domain/data.clj
index 5acc015e2..188bd4ad0 100644
--- a/api/src/api/graphql/domain/data.clj
+++ b/api/src/api/graphql/domain/data.clj
@@ -14,10 +14,10 @@
 
 (defn get-relevant-samples [{:keys [auth-info]}
                             {:keys [id method recordOffset recordLimit]
-                             :or {recordOffset 0 recordLimit 20 method "first"}} _]
+                             :or   {recordOffset 0 recordLimit 20 method "first"}} _]
   (let [data-fn (case method
-                      "relevant" data-files/fetch-most-relevant
-                      "first"    data-files/fetch)]
+                  "relevant" data-files/fetch-most-relevant
+                  "first" data-files/fetch)]
     (if-let [data-file (data-fn id recordOffset recordLimit (:group-id auth-info))]
       (resolve-as data-file)
       (resolve-as-not-found-file id))))
diff --git a/api/src/api/graphql/domain/dictionary.clj b/api/src/api/graphql/domain/dictionary.clj
index 0a8abaa80..94d5a65da 100644
--- a/api/src/api/graphql/domain/dictionary.clj
+++ b/api/src/api/graphql/domain/dictionary.clj
@@ -56,7 +56,7 @@
   (let [translate-fn (if (true? translate?) #(rm-translate/phrase->schema % lang group-id) identity)
         updated-item (update item ::dict-item/forms #(map (fn [phrase]
                                                             (cond-> phrase
-                                                                    (= id (::dict-item-form/id phrase)) (mut-fn)))
+                                                              (= id (::dict-item-form/id phrase)) (mut-fn)))
                                                           %))]
     (->> (dict-entity/update-dictionary-item updated-item group-id)
          (::dict-item/forms)
diff --git a/api/src/api/graphql/domain/document_plan.clj b/api/src/api/graphql/domain/document_plan.clj
index dcfc4ee50..b177a1498 100644
--- a/api/src/api/graphql/domain/document_plan.clj
+++ b/api/src/api/graphql/domain/document_plan.clj
@@ -33,8 +33,8 @@
       (resolve-as)))
 
 (defn get-document-plan [{:keys [auth-info]} args _]
-  (let [id (when-not (str/blank? (:id args)) (:id args))
-        name (when-not (str/blank? (:name args)) (:name args))
+  (let [id            (when-not (str/blank? (:id args)) (:id args))
+        name          (when-not (str/blank? (:name args)) (:name args))
         document-plan (cond
                         (some? id) (dp/get-document-plan id)
                         (some? name) (some #(when (= name (:name %)) %) (dp/list-document-plans (:group-id auth-info))))]
diff --git a/api/src/api/graphql/domain/language.clj b/api/src/api/graphql/domain/language.clj
index 4a7d7ca0a..0e94cbefa 100644
--- a/api/src/api/graphql/domain/language.clj
+++ b/api/src/api/graphql/domain/language.clj
@@ -9,8 +9,8 @@
 
 (defn language-model [{:keys [auth-info]} _ _]
   (resolve-as
-    {:id    "default"
-     :flags (map rm-translate/reader-model->reader-flag (reader-model-entity/available-languages (:group-id auth-info)))}))
+   {:id    "default"
+    :flags (map rm-translate/reader-model->reader-flag (reader-model-entity/available-languages (:group-id auth-info)))}))
 
 (defn- resolve-as-not-found-language [id]
   (resolve-as nil {:message (format "Cannot find language with code `%s`." id)}))
@@ -32,8 +32,8 @@
 (defn update-language-usage [{:keys [auth-info]} {:keys [id usage]} _]
   (if-let [item (dict-entity/get-dictionary-item (dict-domain/get-parent-id id))]
     (let [[parent-part phrase-part flag-id] (str/split id #"/")
-          flag-key (keyword flag-id)
-          phrase-id (format "%s/%s" parent-part phrase-part)
+          flag-key    (keyword flag-id)
+          phrase-id   (format "%s/%s" parent-part phrase-part)
           select-pair (fn [flags] (list flag-key (get flags flag-key)))]
       (->> (dict-domain/update-phrase item phrase-id (:group-id auth-info) #(assoc-in % [:flags flag-key] (keyword usage)) false)
            (:flags)
diff --git a/api/src/api/graphql/domain/reader_model.clj b/api/src/api/graphql/domain/reader_model.clj
index 7a495667f..d7f0239f3 100644
--- a/api/src/api/graphql/domain/reader_model.clj
+++ b/api/src/api/graphql/domain/reader_model.clj
@@ -9,8 +9,8 @@
 
 (defn reader-model [{:keys [auth-info]} _ _]
   (resolve-as
-    {:id    "default"
-     :flags (map rm-translate/reader-model->reader-flag (reader-model-entity/available-readers (:group-id auth-info)))}))
+   {:id    "default"
+    :flags (map rm-translate/reader-model->reader-flag (reader-model-entity/available-readers (:group-id auth-info)))}))
 
 (defn- resolve-as-not-found-reader-flag [id]
   (resolve-as nil {:message (format "Cannot find reader flag with id `%s`." id)}))
@@ -32,8 +32,8 @@
 (defn update-reader-flag-usage [{:keys [auth-info]} {:keys [id usage]} _]
   (if-let [item (dict-entity/get-dictionary-item (dict-domain/get-parent-id id))]
     (let [[parent-part phrase-part flag-id] (str/split id #"/")
-          flag-key (keyword flag-id)
-          phrase-id (format "%s/%s" parent-part phrase-part)
+          flag-key    (keyword flag-id)
+          phrase-id   (format "%s/%s" parent-part phrase-part)
           select-pair (fn [flags] (list flag-key (get flags flag-key)))]
       (->> (dict-domain/update-phrase item phrase-id (:group-id auth-info) #(assoc-in % [:flags flag-key] (keyword usage)) false)
            (:flags)
diff --git a/api/src/api/graphql/translate/concept.clj b/api/src/api/graphql/translate/concept.clj
index bba447daa..d49990b16 100644
--- a/api/src/api/graphql/translate/concept.clj
+++ b/api/src/api/graphql/translate/concept.clj
@@ -9,10 +9,10 @@
   {:id         (utils/gen-rand-str 16)
    :fieldLabel (or name category "Str")
    :fieldType  (cond-> ["List" "Str"]
-                       (some? category) (-> (concat (get paths/possible-paths category))
-                                            (distinct)
-                                            (vec)
-                                            (conj category)))})
+                 (some? category) (-> (concat (get paths/possible-paths category))
+                                      (distinct)
+                                      (vec)
+                                      (conj category)))})
 
 (defn normalize-category [cat]
   (when-not (str/blank? cat)
diff --git a/api/src/api/graphql/translate/document_plan.clj b/api/src/api/graphql/translate/document_plan.clj
index 53715581d..d2f52afae 100644
--- a/api/src/api/graphql/translate/document_plan.clj
+++ b/api/src/api/graphql/translate/document_plan.clj
@@ -11,13 +11,13 @@
 
 (defn dp-zipper [m]
   (zip/zipper
-    (fn [x] (or (map? x) (sequential? x)))
-    seq
-    (fn [p xs]
-      (if (isa? (type p) clojure.lang.MapEntry)
-        (into [] xs)
-        (into (empty p) xs)))
-    m))
+   (fn [x] (or (map? x) (sequential? x)))
+   seq
+   (fn [p xs]
+     (if (isa? (type p) clojure.lang.MapEntry)
+       (into [] xs)
+       (into (empty p) xs)))
+   m))
 
 (defn parse-blockly-xml [is]
   (try
@@ -28,8 +28,8 @@
 (defn ensure-blockly-categories [blockly-xml]
   (letfn [(edit [{{:keys [id concept_id pos concept_kind]} :attrs :as node}]
             (cond-> node
-                    (= "null" pos) (assoc-in [:attrs :pos] (get-dictionary-item-category id))
-                    (= "null" concept_kind) (assoc-in [:attrs :concept_kind] (:kind (get-amr-concept concept_id)))))]
+              (= "null" pos) (assoc-in [:attrs :pos] (get-dictionary-item-category id))
+              (= "null" concept_kind) (assoc-in [:attrs :concept_kind] (:kind (get-amr-concept concept_id)))))]
     (when (some? blockly-xml)
       (with-open [is (io/input-stream (.getBytes blockly-xml))]
         (loop [loc (zip/xml-zip (parse-blockly-xml is))]
@@ -46,12 +46,12 @@
               (let [{:keys [type kind itemId conceptId]} node]
                 (cond
                   (and
-                    (or (= "Dictionary-item" type)
-                        (= "Dictionary-item-modifier" type))
-                    (or (nil? kind) (= "null" kind))) (assoc node :kind (get-dictionary-item-category itemId))
+                   (or (= "Dictionary-item" type)
+                       (= "Dictionary-item-modifier" type))
+                   (or (nil? kind) (= "null" kind))) (assoc node :kind (get-dictionary-item-category itemId))
                   (and
-                    (= "AMR" type)
-                    (or (nil? kind) (= "null" kind))) (assoc node :kind (:kind (get-amr-concept conceptId)))
+                   (= "AMR" type)
+                   (or (nil? kind) (= "null" kind))) (assoc node :kind (:kind (get-amr-concept conceptId)))
                   :else node))
               node))]
     (loop [loc (dp-zipper document-plan)]
diff --git a/api/src/api/nlg/core.clj b/api/src/api/nlg/core.clj
index 961a43256..fafb91aab 100755
--- a/api/src/api/nlg/core.clj
+++ b/api/src/api/nlg/core.clj
@@ -22,7 +22,7 @@
 (defn deduplicate [results]
   (map first (vals (group-by :text results))))
 
-(defn with-cache [request-hash {id ::result/id :as result}]
+(defn add-to-cache [request-hash {id ::result/id :as result}]
   (when (:enable-cache conf)
     (log/debugf "Caching result `%s`" id)
     (results/write-cached-result request-hash id))
@@ -50,36 +50,36 @@
 (defn generate-text
   [{:keys [id document-plan data reader-model] :or {id (utils/gen-uuid) data {} reader-model (available-reader-model user-group/DUMMY-USER-GROUP-ID)}}]
   (let [{:keys [languages readers]} (select-enabled-readers reader-model)
-        semantic-graph (document-plan->semantic-graph document-plan)
-        amrs (find-amrs semantic-graph)
+        semantic-graph  (document-plan->semantic-graph document-plan)
+        amrs            (find-amrs semantic-graph)
         semantic-graphs (cons semantic-graph amrs)
         dictionary-keys (set (concat (vals data) (mapcat get-dictionary-keys semantic-graphs)))
-        context {:amr        amrs
-                 :data       data
-                 :readers    readers
-                 :dictionary (build-dictionaries dictionary-keys languages)}
-        request-hash (hash [semantic-graph context languages])]
+        context         {:amr        amrs
+                         :data       data
+                         :readers    readers
+                         :dictionary (build-dictionaries dictionary-keys languages)}
+        request-hash    (hash [semantic-graph context languages])]
     (try
       (if-let [cached-result (when (:enable-cache conf) (results/fetch-cached-result request-hash))]
         (do
           (log/infof "Found cached result `%s`" (::result/id cached-result))
           (assoc cached-result ::result/id id))
-        (with-cache
-          request-hash
-          #::result{:id     id
-                    :status :ready
-                    :rows   (transduce
-                              (comp
-                                (mapcat (fn [lang]
-                                          (let [context (update context :dictionary #(get % lang []))]
-                                            (cond-> (nlg/generate-text semantic-graph context lang)
-                                                    (and (= "Eng" lang) (enable-enrich?)) (enrich data)
-                                                    (:remove-duplicates conf) (deduplicate)))))
-                                (remove #(str/blank? (:text %)))
-                                (map ->result-row)
-                                (map add-annotations))
-                              conj
-                              languages)}))
+        (add-to-cache
+         request-hash
+         #::result{:id     id
+                   :status :ready
+                   :rows   (transduce
+                            (comp
+                             (mapcat (fn [lang]
+                                       (let [context (update context :dictionary #(get % lang []))]
+                                         (cond-> (nlg/generate-text semantic-graph context lang)
+                                           (and (= "Eng" lang) (enable-enrich?)) (enrich data)
+                                           (:remove-duplicates conf) (deduplicate)))))
+                             (remove #(str/blank? (:text %)))
+                             (map ->result-row)
+                             (map add-annotations))
+                            conj
+                            languages)}))
       (catch Exception e
         (log/error (.getMessage e))
         (log/trace (str/join "\n" (.getStackTrace e)))
diff --git a/api/src/api/nlg/enrich.clj b/api/src/api/nlg/enrich.clj
index bcff19c72..651d22afe 100644
--- a/api/src/api/nlg/enrich.clj
+++ b/api/src/api/nlg/enrich.clj
@@ -32,7 +32,7 @@
 (defn enrich [gen-result data]
   (mapcat (fn [{:keys [enriched] :as result}]
             (if (some? enriched)
-              (let [item (dissoc result :enriched)
+              (let [item          (dissoc result :enriched)
                     enriched-item (assoc item :text enriched :enriched? true)]
                 [item enriched-item])
               [result]))
diff --git a/api/src/api/nlg/enrich/data.clj b/api/src/api/nlg/enrich/data.clj
index e5ebb4d88..97cb77af5 100644
--- a/api/src/api/nlg/enrich/data.clj
+++ b/api/src/api/nlg/enrich/data.clj
@@ -18,8 +18,8 @@
 
 (defn select-rules [filename rules]
   (filter #(or
-             (and (some? (:filename %)) (= filename (:filename %)))
-             (and (some? (:filename-pattern %)) (re-matches (:filename-pattern %) filename)))
+            (and (some? (:filename %)) (= filename (:filename %)))
+            (and (some? (:filename-pattern %)) (re-matches (:filename-pattern %) filename)))
           rules))
 
 (defn build-transformations [tr]
@@ -56,4 +56,4 @@
   (let [rules (select-rules filename (read-rules))]
     (log/infof "%d rules matches filename `%s`" (count rules) filename)
     (cond-> data
-            (seq rules) (apply-rules rules))))
+      (seq rules) (apply-rules rules))))
diff --git a/api/src/api/nlg/format.clj b/api/src/api/nlg/format.clj
index 54efa8e71..8cbf5abed 100644
--- a/api/src/api/nlg/format.clj
+++ b/api/src/api/nlg/format.clj
@@ -33,21 +33,23 @@
 
 (defn get-flags [{::row/keys [language enriched? readers]} group-id]
   (cond-> (cons (get-lang-flag language group-id) (filter some? (map #(get-reader-flag % group-id) readers)))
-          (true? enriched?) (conj enriched-flag)))
+    (true? enriched?) (conj enriched-flag)))
 
 (defn split-into-paragraphs [annotations]
   (loop [[ann & anns] annotations
          segments []
-         segment []]
+         segment  []]
     (if (nil? ann)
       (cond-> segments (seq segment) (conj segment))
       (let [ending? (str/includes? (::annotation/text ann) "\n")]
         (recur
-          anns
-          (if ending? (conj segments segment) segments)
-          (if ending? (let [text (str/replace (::annotation/text ann) #"\s*\n+\s*" "")]
-                        (cond-> [] (not (str/blank? text)) (conj (assoc ann ::annotation/text text))))
-                      (conj segment ann)))))))
+         anns
+         (if ending?
+           (conj segments segment) segments)
+         (if ending?
+           (let [text (str/replace (::annotation/text ann) #"\s*\n+\s*" "")]
+             (cond-> [] (not (str/blank? text)) (conj (assoc ann ::annotation/text text))))
+           (conj segment ann)))))))
 
 (defn ->annotated-text-format [{rows ::result/rows} group-id]
   (map (fn [{annotations ::row/annotations :as row}]
@@ -64,12 +66,12 @@
                                               :children [{:type     "SENTENCE"
                                                           :id       (utils/gen-uuid)
                                                           :children (concat
-                                                                      (when (= i 0) flags)
-                                                                      (map (fn [{::annotation/keys [id text]}]
-                                                                             {:type "WORD"
-                                                                              :id   id
-                                                                              :text text})
-                                                                           paragraph-annotations))}]})))}))
+                                                                     (when (= i 0) flags)
+                                                                     (map (fn [{::annotation/keys [id text]}]
+                                                                            {:type "WORD"
+                                                                             :id   id
+                                                                             :text text})
+                                                                          paragraph-annotations))}]})))}))
        rows))
 
 (defn ->annotated-text-shallow-format [{rows ::result/rows} group-id]
@@ -85,20 +87,20 @@
                                              {:type "PARAGRAPH"
                                               :id   (utils/gen-uuid)
                                               :text (str/trim (cond->> paragraph
-                                                                       (= i 0) (str flags " ")))})))}))
+                                                                (= i 0) (str flags " ")))})))}))
        rows))
 
 (defn ->error [{::result/keys [error-message]}]
   (cond-> []
-          (and
-            (not (str/blank? error-message))
-            (not (str/includes? error-message "java.lang.NullPointerException"))
-            (re-matches #"^(?!tmp).*$" error-message))
-          (conj {:type     "ERROR"
-                 :id       (utils/gen-uuid)
-                 :children [error-flag {:type "MESSAGE"
-                                        :id   (utils/gen-uuid)
-                                        :text error-message}]})))
+    (and
+     (not (str/blank? error-message))
+     (not (str/includes? error-message "java.lang.NullPointerException"))
+     (re-matches #"^(?!tmp).*$" error-message))
+    (conj {:type     "ERROR"
+           :id       (utils/gen-uuid)
+           :children [error-flag {:type "MESSAGE"
+                                  :id   (utils/gen-uuid)
+                                  :text error-message}]})))
 
 (defn ->raw-format [{::result/keys [rows]}]
   (map #(str/replace (::row/text %) #"\s*\n+\s*" "\n") rows))
diff --git a/api/src/api/nlg/parser.clj b/api/src/api/nlg/parser.clj
index 533b16622..df3b6daa4 100644
--- a/api/src/api/nlg/parser.clj
+++ b/api/src/api/nlg/parser.clj
@@ -14,14 +14,14 @@
 
 (defmulti build-semantic-graph (fn [{type :type concept-id :conceptId} {kind :kind}]
                                  (keyword
-                                   (case [kind type]
-                                     ["AMR" "Document-plan"] "AMR-plan"
-                                     ["RGL" "Document-plan"] "AMR-plan"
-                                     ["AMR" "Segment"] "Frame"
-                                     ["RGL" "Segment"] "Frame"
-                                     ["AMR" "AMR"] (if (contains? ops/operation-map concept-id) "Operation" "AMR")
-                                     ["RGL" "AMR"] (if (contains? ops/operation-map concept-id) "Operation" "AMR")
-                                     type))))
+                                  (case [kind type]
+                                    ["AMR" "Document-plan"] "AMR-plan"
+                                    ["RGL" "Document-plan"] "AMR-plan"
+                                    ["AMR" "Segment"] "Frame"
+                                    ["RGL" "Segment"] "Frame"
+                                    ["AMR" "AMR"] (if (contains? ops/operation-map concept-id) "Operation" "AMR")
+                                    ["RGL" "AMR"] (if (contains? ops/operation-map concept-id) "Operation" "AMR")
+                                    type))))
 
 (defn definition? [node]
   (= "Define-var" (:type node)))
@@ -368,7 +368,7 @@
   (cond-> node (nil? node) (assoc :type "placeholder")))
 
 (defn rearrange-modifiers [node index]
-  (loop [zipper (dp-zip/make-zipper node)
+  (loop [zipper    (dp-zip/make-zipper node)
          modifiers []]
     (let [{:keys [type child] :as node} (zip/node zipper)]
       (if-not (and (contains? #{"Dictionary-item-modifier" "Cell-modifier"} type) (some? child))
@@ -383,7 +383,7 @@
   (-> node (nil->placeholder) (rearrange-modifiers index) (assoc :position index) (gen-id)))
 
 (defn preprocess [root]
-  (loop [loc (dp-zip/make-zipper root)
+  (loop [loc   (dp-zip/make-zipper root)
          index 1]
     (if (zip/end? loc)
       (zip/node loc)
@@ -398,7 +398,7 @@
 
 (defn post-add-kind [{:keys [name type kind] :as node} {variables :variables}]
   (let [kinds (map :kind (remove definition? (dp-zip/get-children node)))
-        kind (or
+        kind  (or
                kind
                (cond
                  (= "Get-var" type) (select-kind (remove nil? (map :kind (get variables name))))
@@ -412,29 +412,29 @@
     (if (zip/end? loc)
       (zip/node loc)
       (recur
-        (-> loc
-            (zip/edit post-add-kind context)
-            (dp-zip/post-next))))))
+       (-> loc
+           (zip/edit post-add-kind context)
+           (dp-zip/post-next))))))
 
 (defn add-category [semantic-graph {:keys [id kind name] :as node} {variables :variables}]
   (let [in-relations (filter #(= (:to %) id) (::sg/relations semantic-graph))
-        kind (or
-               kind
-               (case (keyword type)
-                 :Get-var (or (select-kind (remove nil? (map :category in-relations)))
-                              (some #(when (contains? % :category)
-                                       (:category %))
-                                    (get variables name)))
-                 (select-kind (remove nil? (map :category in-relations)))))]
+        kind         (or
+                      kind
+                      (case (keyword type)
+                        :Get-var (or (select-kind (remove nil? (map :category in-relations)))
+                                     (some #(when (contains? % :category)
+                                              (:category %))
+                                           (get variables name)))
+                        (select-kind (remove nil? (map :category in-relations)))))]
     (when (some? node)
       (cond-> node
-              (some? kind) (assoc :kind kind)))))
+        (some? kind) (assoc :kind kind)))))
 
 (defn document-plan->semantic-graph
   ([{id :id uid :uid name :name kind :kind body :documentPlan blockly-xml :blocklyXml :as dp}]
-   (let [labels (dp-utils/get-variable-labels blockly-xml)
+   (let [labels    (dp-utils/get-variable-labels blockly-xml)
          variables (dp-utils/find-variables dp labels)
-         context {:labels labels :variables variables}]
+         context   {:labels labels :variables variables}]
      (loop [semantic-graph #::sg{:id          (or id (utils/gen-rand-str 16))
                                  :uid         uid
                                  :name        (str name)
@@ -443,8 +443,8 @@
                                  :description (str/join "\n" (dp-utils/find-examples dp))
                                  :relations   []
                                  :concepts    []}
-            loc (-> body (preprocess) (post-process context) (dp-zip/make-zipper))
-            context (assoc context :variables {})]
+            loc            (-> body (preprocess) (post-process context) (dp-zip/make-zipper))
+            context        (assoc context :variables {})]
        (if (or (zip/end? loc) (empty? body))
          (-> semantic-graph
              (sg-utils/prune-nil-relations)
@@ -457,16 +457,16 @@
              (update ::sg/relations set))
          (let [{:keys [type name] :as node} (add-category semantic-graph (zip/node loc) (merge dp context))]
            (recur
-             (sg-utils/merge-semantic-graphs
-               semantic-graph
-               (build-semantic-graph node (merge dp context)))
-             (-> loc
-                 (zip/replace node)
-                 (zip/next))
-             (-> context
-                 (update :variables #(if (= "Define-var" type)
-                                       (merge-with concat % {name [node]}) %))))))))))
+            (sg-utils/merge-semantic-graphs
+             semantic-graph
+             (build-semantic-graph node (merge dp context)))
+            (-> loc
+                (zip/replace node)
+                (zip/next))
+            (-> context
+                (update :variables #(if (= "Define-var" type)
+                                      (merge-with concat % {name [node]}) %))))))))))
 
 (s/fdef document-plan->semantic-graph
-        :args (s/cat :document-plan map?)
-        :ret ::sg/graph)
+  :args (s/cat :document-plan map?)
+  :ret ::sg/graph)
diff --git a/api/src/api/nlg/service.clj b/api/src/api/nlg/service.clj
index e700760cf..1dec9ec76 100644
--- a/api/src/api/nlg/service.clj
+++ b/api/src/api/nlg/service.clj
@@ -50,10 +50,10 @@
      (log/infof "Generate request with %s" (utils/request->text request))
      (let [{row-index :dataSampleRow :as document-plan} (utils/get-document-plan request group-id)
            result-id (gen-uuid)
-           body {:id            result-id
-                 :document-plan document-plan
-                 :data          (or data-row (utils/get-data-row data-id (or sample-method "first") (or row-index 0) group-id) {})
-                 :reader-model  (map #(reader-model/update! % group-id) (utils/form-reader-model reader-model group-id))}]
+           body      {:id            result-id
+                      :document-plan document-plan
+                      :data          (or data-row (utils/get-data-row data-id (or sample-method "first") (or row-index 0) group-id) {})
+                      :reader-model  (map #(reader-model/update! % group-id) (utils/form-reader-model reader-model group-id))}]
        (results/write #::result{:id     result-id
                                 :status :pending})
        (if (true? async)
diff --git a/api/src/api/nlg/service/utils.clj b/api/src/api/nlg/service/utils.clj
index bf947919c..38095aa02 100644
--- a/api/src/api/nlg/service/utils.clj
+++ b/api/src/api/nlg/service/utils.clj
@@ -19,7 +19,7 @@
                          (some? result-format) (use-format result-format result group-id)
                          (and (= :error status) (:display-error conf)) (use-format "error" result group-id)
                          :else (with-default-format result group-id))}
-          (= :error status) (assoc :error true :message error-message)))
+    (= :error status) (assoc :error true :message error-message)))
 
 (defn error-response
   ([exception] (error-response exception nil))
@@ -49,7 +49,7 @@
                                                                 "relevant" (data-files/fetch-most-relevant data-id index 20 group-id)
                                                                 "first" (data-files/fetch data-id index 1 group-id))]
       (cond->> (zipmap (map :fieldName fields) (map :value fields))
-               (data-enrich/enable-enrich?) (data-enrich/enrich filename))
+        (data-enrich/enable-enrich?) (data-enrich/enrich filename))
       (log/errorf "Data with id `%s` not found" data-id))))
 
 (defn get-document-plan [{id :documentPlanId name :documentPlanName} group-id]
diff --git a/api/src/api/resource.clj b/api/src/api/resource.clj
index cb04dbd9e..6f17ae865 100755
--- a/api/src/api/resource.clj
+++ b/api/src/api/resource.clj
@@ -29,7 +29,6 @@
    :status                      {:get {:application/json {:color    "green"
                                                           :services {"service" true}}}}})
 
-
 (defn- dummy [& _]
   {:status 200
    :body   {:text "I do nothing."}})
@@ -47,17 +46,17 @@
       (update :pathParameters decode-vals)
       (update :queryStringParameters decode-vals)
       (cond-> (true? decode-body?)
-              (update :body #(json/read-value % utils/read-mapper)))))
+        (update :body #(json/read-value % utils/read-mapper)))))
 
 (defn- generate-response [status-code body]
   (json/write-value-as-string
-    {:statusCode      status-code
-     :isBase64Encoded false
-     :body            (if (some? body) (json/write-value-as-string body) "")
-     :headers         (cond-> {"Access-Control-Allow-Origin"  "*"
-                               "Access-Control-Allow-Methods" "GET, POST, PUT, DELETE, OPTIONS"
-                               "Access-Control-Allow-Headers" "*, Content-Type"}
-                              (some? body) (assoc "Content-Type" "application/json"))}))
+   {:statusCode      status-code
+    :isBase64Encoded false
+    :body            (if (some? body) (json/write-value-as-string body) "")
+    :headers         (cond-> {"Access-Control-Allow-Origin"  "*"
+                              "Access-Control-Allow-Methods" "GET, POST, PUT, DELETE, OPTIONS"
+                              "Access-Control-Allow-Headers" "*, Content-Type"}
+                       (some? body) (assoc "Content-Type" "application/json"))}))
 
 (defn build-resource [{:keys [get-handler post-handler delete-handler put-handler]} decode-body?]
   (fn [_ is os _]
diff --git a/api/src/api/server.clj b/api/src/api/server.clj
index de73e09dc..a4783f470 100755
--- a/api/src/api/server.clj
+++ b/api/src/api/server.clj
@@ -33,12 +33,12 @@
 (defn health [_] {:status 200, :body {:health "Ok"}})
 
 (defn status [_]
-  (let [main-deps {:gf (gf-service/ping)}
+  (let [main-deps  {:gf (gf-service/ping)}
         other-deps {}
-        color (cond
-                (some false? (vals main-deps)) :red
-                (some false? (vals other-deps)) :yellow
-                :else :green)]
+        color      (cond
+                     (some false? (vals main-deps)) :red
+                     (some false? (vals other-deps)) :yellow
+                     :else :green)]
     {:status 200 :body {:color (name color) :services (merge main-deps other-deps)}}))
 
 (defn string-store [item]
@@ -57,126 +57,126 @@
 
 (def routes
   (ring/router
-    [["/_graphql" {:post    {:parameters {:body map?}
-                             :coercion   reitit.coercion.spec/coercion
-                             :handler    (fn [{raw :body auth-info :auth-info}]
-                                           (let [body (utils/read-json-is raw)]
-                                             {:status 200
-                                              :body   (graphql/handle body auth-info)}))
-                             :summary    "GraphQL endpoint"}
-                   :options {:handler cors-handler
-                             :no-doc  true}}]
-     ["/nlg/" {:post    {:parameters {:body ::service/generate-request}
-                         :responses  {200 {:body     ::service/generate-response
-                                           :examples (get-in response-examples [:nlg :get])}}
-                         :summary    "Registers document plan for generation"
-                         :coercion   reitit.coercion.spec/coercion
-                         :middleware [muuntaja/format-request-middleware
-                                      coercion/coerce-request-middleware
-                                      coercion/coerce-response-middleware]
-                         :handler    (fn [{{body :body} :parameters auth-info :auth-info}]
-                                       (service/generate-request body auth-info))}
-               :options {:handler cors-handler
-                         :no-doc  true}}]
-     ["/nlg/_bulk/" {:post    {:parameters {:body ::service/generate-request-bulk}
-                               :responses  {200 {:body     ::service/generate-response-bulk
-                                                 :examples (get-in response-examples [:nlg-bulk :post])}}
-                               :summary    "Bulk generation"
-                               :coercion   reitit.coercion.spec/coercion
-                               :middleware [muuntaja/format-request-middleware
-                                            coercion/coerce-request-middleware
-                                            coercion/coerce-response-middleware]
-                               :handler    (fn [{{body :body} :parameters auth-info :auth-info}]
-                                             (service/generate-request-bulk body auth-info))}
-                     :options {:handler cors-handler
-                               :no-doc  true}}]
-     ["/nlg/:id" {:get     {:parameters {:query ::service/get-result
-                                         :path  {:id string?}}
-                            :responses  {200 {:body     ::service/generate-response
-                                              :examples (get-in response-examples [:nlg :get])}}
+   [["/_graphql" {:post    {:parameters {:body map?}
                             :coercion   reitit.coercion.spec/coercion
-                            :summary    "Get NLG result"
-                            :middleware [muuntaja/format-request-middleware
-                                         coercion/coerce-request-middleware]
-                            :handler    service/get-result}
-                  :delete  {:parameters {:path {:id string?}}
-                            :responses  {200 {:body     ::service/generate-response
-                                              :examples (get-in response-examples [:nlg :get])}}
-                            :coercion   reitit.coercion.spec/coercion
-                            :summary    "Delete NLG result"
-                            :middleware [muuntaja/format-request-middleware
-                                         coercion/coerce-request-middleware]
-                            :handler    service/delete-result}
+                            :handler    (fn [{raw :body auth-info :auth-info}]
+                                          (let [body (utils/read-json-is raw)]
+                                            {:status 200
+                                             :body   (graphql/handle body auth-info)}))
+                            :summary    "GraphQL endpoint"}
                   :options {:handler cors-handler
                             :no-doc  true}}]
-     ["/accelerated-text-data-files/"
-      {:post    {:parameters {:multipart {:file multipart/bytes-part}}
-                 :coercion   reitit.coercion.spec/coercion
-                 :summary    "Upload a file"
-                 :responses  {200 {:body     {:message string?
-                                              :id      string?}
-                                   :examples (get-in response-examples [:accelerated-text-data-files :post])}}
-                 :handler    (fn [request]
-                               (let [{params :params auth-info :auth-info} (multipart-handler request)
-                                     id (data-files/store! (get params "file") (:group-id auth-info))]
-                                 {:status 200
-                                  :body   {:message "Succesfully uploaded file" :id id}}))}
-       :delete  {:parameters {:body {:id string?}}
-                 :responses  {200 {:body {:message string?
-                                          :id      string?}
-                                   :examples (get-in response-examples [:accelerated-text-data-files :delete])}}
-                 :coercion   reitit.coercion.spec/coercion
-                 :summary    "Delete data file"
-                 :middleware [muuntaja/format-request-middleware
-                              coercion/coerce-request-middleware
-                              coercion/coerce-response-middleware]
-                 :handler    (fn [{{{id :id} :body} :parameters auth-info :auth-info}]
-                               (if (data-files/delete-data-file! id (:group-id auth-info))
-                                 {:status 200
-                                  :body   {:message "Succesfully deleted file" :id id}}
-                                 {:status 404}))}
-       :options {:handler cors-handler
-                 :no-doc  true}}]
-     ["/swagger.json" {:get {:no-doc  true
-                             :swagger {:info {:title "nlg-api"}}
-                             :handler (swagger/create-swagger-handler)}}]
-     ["/health" {:get      {:summary   "Check API health"
-                            :handler   health
-                            :responses {200 {:body     {:health string?}
-                                             :examples (get-in response-examples [:health :get])}}}
-                 :coercion reitit.coercion.spec/coercion}]
-     ["/status" {:get      {:summary   "Check service status"
-                            :handler   status
-                            :responses {200 {:body     {:color string? :services coll?}
-                                             :examples (get-in response-examples [:status :get])}}}
-                 :coercion reitit.coercion.spec/coercion}]]
-    {:data      {:muuntaja   m/instance
-                 :middleware [swagger/swagger-feature
-                              muuntaja/format-negotiate-middleware
-                              parameters/parameters-middleware
-                              auth/auth-middleware
-                              wrap-response
-                              muuntaja/format-response-middleware
-                              errors/exception-middleware]}
-     :exception pretty/exception}))
+    ["/nlg/" {:post    {:parameters {:body ::service/generate-request}
+                        :responses  {200 {:body     ::service/generate-response
+                                          :examples (get-in response-examples [:nlg :get])}}
+                        :summary    "Registers document plan for generation"
+                        :coercion   reitit.coercion.spec/coercion
+                        :middleware [muuntaja/format-request-middleware
+                                     coercion/coerce-request-middleware
+                                     coercion/coerce-response-middleware]
+                        :handler    (fn [{{body :body} :parameters auth-info :auth-info}]
+                                      (service/generate-request body auth-info))}
+              :options {:handler cors-handler
+                        :no-doc  true}}]
+    ["/nlg/_bulk/" {:post    {:parameters {:body ::service/generate-request-bulk}
+                              :responses  {200 {:body     ::service/generate-response-bulk
+                                                :examples (get-in response-examples [:nlg-bulk :post])}}
+                              :summary    "Bulk generation"
+                              :coercion   reitit.coercion.spec/coercion
+                              :middleware [muuntaja/format-request-middleware
+                                           coercion/coerce-request-middleware
+                                           coercion/coerce-response-middleware]
+                              :handler    (fn [{{body :body} :parameters auth-info :auth-info}]
+                                            (service/generate-request-bulk body auth-info))}
+                    :options {:handler cors-handler
+                              :no-doc  true}}]
+    ["/nlg/:id" {:get     {:parameters {:query ::service/get-result
+                                        :path  {:id string?}}
+                           :responses  {200 {:body     ::service/generate-response
+                                             :examples (get-in response-examples [:nlg :get])}}
+                           :coercion   reitit.coercion.spec/coercion
+                           :summary    "Get NLG result"
+                           :middleware [muuntaja/format-request-middleware
+                                        coercion/coerce-request-middleware]
+                           :handler    service/get-result}
+                 :delete  {:parameters {:path {:id string?}}
+                           :responses  {200 {:body     ::service/generate-response
+                                             :examples (get-in response-examples [:nlg :get])}}
+                           :coercion   reitit.coercion.spec/coercion
+                           :summary    "Delete NLG result"
+                           :middleware [muuntaja/format-request-middleware
+                                        coercion/coerce-request-middleware]
+                           :handler    service/delete-result}
+                 :options {:handler cors-handler
+                           :no-doc  true}}]
+    ["/accelerated-text-data-files/"
+     {:post    {:parameters {:multipart {:file multipart/bytes-part}}
+                :coercion   reitit.coercion.spec/coercion
+                :summary    "Upload a file"
+                :responses  {200 {:body     {:message string?
+                                             :id      string?}
+                                  :examples (get-in response-examples [:accelerated-text-data-files :post])}}
+                :handler    (fn [request]
+                              (let [{params :params auth-info :auth-info} (multipart-handler request)
+                                    id (data-files/store! (get params "file") (:group-id auth-info))]
+                                {:status 200
+                                 :body   {:message "Succesfully uploaded file" :id id}}))}
+      :delete  {:parameters {:body {:id string?}}
+                :responses  {200 {:body     {:message string?
+                                             :id      string?}
+                                  :examples (get-in response-examples [:accelerated-text-data-files :delete])}}
+                :coercion   reitit.coercion.spec/coercion
+                :summary    "Delete data file"
+                :middleware [muuntaja/format-request-middleware
+                             coercion/coerce-request-middleware
+                             coercion/coerce-response-middleware]
+                :handler    (fn [{{{id :id} :body} :parameters auth-info :auth-info}]
+                              (if (data-files/delete-data-file! id (:group-id auth-info))
+                                {:status 200
+                                 :body   {:message "Succesfully deleted file" :id id}}
+                                {:status 404}))}
+      :options {:handler cors-handler
+                :no-doc  true}}]
+    ["/swagger.json" {:get {:no-doc  true
+                            :swagger {:info {:title "nlg-api"}}
+                            :handler (swagger/create-swagger-handler)}}]
+    ["/health" {:get      {:summary   "Check API health"
+                           :handler   health
+                           :responses {200 {:body     {:health string?}
+                                            :examples (get-in response-examples [:health :get])}}}
+                :coercion reitit.coercion.spec/coercion}]
+    ["/status" {:get      {:summary   "Check service status"
+                           :handler   status
+                           :responses {200 {:body     {:color string? :services coll?}
+                                            :examples (get-in response-examples [:status :get])}}}
+                :coercion reitit.coercion.spec/coercion}]]
+   {:data      {:muuntaja   m/instance
+                :middleware [swagger/swagger-feature
+                             muuntaja/format-negotiate-middleware
+                             parameters/parameters-middleware
+                             auth/auth-middleware
+                             wrap-response
+                             muuntaja/format-response-middleware
+                             errors/exception-middleware]}
+    :exception pretty/exception}))
 
 (def app
   (ring/ring-handler
-    routes
-    (swagger-ui/create-swagger-ui-handler
-      {:path   "/"
-       :config {:validatorUrl     nil
-                :operationsSorter "alpha"}})
-    (ring/create-default-handler)))
+   routes
+   (swagger-ui/create-swagger-ui-handler
+    {:path   "/"
+     :config {:validatorUrl     nil
+              :operationsSorter "alpha"}})
+   (ring/create-default-handler)))
 
 (defn start-http-server [conf]
   (let [host (get conf :host "0.0.0.0")
         port (get conf :port 3001)]
     (log/infof "Running server on: localhost:%s. Press Ctrl+C to stop" port)
     (server/run-server
-      #'app {:port     port
-             :ip       host
-             :max-body Integer/MAX_VALUE})))
+     #'app {:port     port
+            :ip       host
+            :max-body Integer/MAX_VALUE})))
 
 (defstate http-server
   :start (start-http-server conf)
diff --git a/api/src/data/datomic/entities/document_plan.clj b/api/src/data/datomic/entities/document_plan.clj
index 8b3a83688..ccc316b05 100644
--- a/api/src/data/datomic/entities/document_plan.clj
+++ b/api/src/data/datomic/entities/document_plan.clj
@@ -19,82 +19,82 @@
 (defn prepare-document-plan [document-plan]
   (when document-plan
     (remove-empty-or-nil-vals
-      {:blockly/segments        (map prepare-document-plan (:segments document-plan))
-       :blockly/children        (map prepare-document-plan (:children document-plan))
-       :blockly/conditions      (map prepare-document-plan (:conditions document-plan))
-       :blockly/hasChildren     (not (nil? (:children document-plan)))
-       :blockly/srcId           (:srcId document-plan)
-       :blockly/type            (:type document-plan)
-       :blockly/name            (:name document-plan)
-       :blockly/label           (:label document-plan)
-       :blockly/text            (:text document-plan)
-       :blockly/concept-id      (:conceptId document-plan)
-       :blockly/kind            (:kind document-plan)
-       :blockly/item-id         (:itemId document-plan)
-       :blockly/operator        (:operator document-plan)
-       :blockly/roles           (map prepare-document-plan (:roles document-plan))
-       :blockly/child           (prepare-document-plan (:child document-plan))
-       :blockly/condition       (prepare-document-plan (:condition document-plan))
-       :blockly/then-expression (prepare-document-plan (:thenExpression document-plan))
-       :blockly/list            (prepare-document-plan (:list document-plan))
-       :blockly/modifier        (prepare-document-plan (:modifier document-plan))
-       :blockly/value           (prepare-document-plan (:value document-plan))
-       :blockly/value-1         (prepare-document-plan (:value1 document-plan))
-       :blockly/value–2         (prepare-document-plan (:value2 document-plan))
-       :blockly/dictionary-item (prepare-document-plan (:dictionaryItem document-plan))})))
+     {:blockly/segments        (map prepare-document-plan (:segments document-plan))
+      :blockly/children        (map prepare-document-plan (:children document-plan))
+      :blockly/conditions      (map prepare-document-plan (:conditions document-plan))
+      :blockly/hasChildren     (not (nil? (:children document-plan)))
+      :blockly/srcId           (:srcId document-plan)
+      :blockly/type            (:type document-plan)
+      :blockly/name            (:name document-plan)
+      :blockly/label           (:label document-plan)
+      :blockly/text            (:text document-plan)
+      :blockly/concept-id      (:conceptId document-plan)
+      :blockly/kind            (:kind document-plan)
+      :blockly/item-id         (:itemId document-plan)
+      :blockly/operator        (:operator document-plan)
+      :blockly/roles           (map prepare-document-plan (:roles document-plan))
+      :blockly/child           (prepare-document-plan (:child document-plan))
+      :blockly/condition       (prepare-document-plan (:condition document-plan))
+      :blockly/then-expression (prepare-document-plan (:thenExpression document-plan))
+      :blockly/list            (prepare-document-plan (:list document-plan))
+      :blockly/modifier        (prepare-document-plan (:modifier document-plan))
+      :blockly/value           (prepare-document-plan (:value document-plan))
+      :blockly/value-1         (prepare-document-plan (:value1 document-plan))
+      :blockly/value–2         (prepare-document-plan (:value2 document-plan))
+      :blockly/dictionary-item (prepare-document-plan (:dictionaryItem document-plan))})))
 
 (defn transact-item [conn key data-item]
   (let [current-ts (utils/ts-now)]
     @(d/transact conn [(remove-nil-vals
-                         {:document-plan/id                 key
-                          :document-plan/uid                (:uid data-item)
-                          :document-plan/data-sample-id     (:dataSampleId data-item)
-                          :document-plan/name               (:name data-item)
-                          :document-plan/kind               (:kind data-item)
-                          :document-plan/examples           (:examples data-item)
-                          :document-plan/blockly-xml        (:blocklyXml data-item)
-                          :document-plan/document-plan      (prepare-document-plan (:documentPlan data-item))
-                          :document-plan/created-at         current-ts
-                          :document-plan/updated-at         current-ts
-                          :document-plan/data-sample-row    (:dataSampleRow data-item)
-                          :document-plan/data-sample-method (:dataSampleMethod data-item)
-                          :document-plan/update-count       0})])
+                        {:document-plan/id                 key
+                         :document-plan/uid                (:uid data-item)
+                         :document-plan/data-sample-id     (:dataSampleId data-item)
+                         :document-plan/name               (:name data-item)
+                         :document-plan/kind               (:kind data-item)
+                         :document-plan/examples           (:examples data-item)
+                         :document-plan/blockly-xml        (:blocklyXml data-item)
+                         :document-plan/document-plan      (prepare-document-plan (:documentPlan data-item))
+                         :document-plan/created-at         current-ts
+                         :document-plan/updated-at         current-ts
+                         :document-plan/data-sample-row    (:dataSampleRow data-item)
+                         :document-plan/data-sample-method (:dataSampleMethod data-item)
+                         :document-plan/update-count       0})])
     (assoc data-item
-      :id key
-      :createdAt current-ts
-      :updatedAt current-ts
-      :updateCount 0)))
+           :id key
+           :createdAt current-ts
+           :updatedAt current-ts
+           :updateCount 0)))
 
 (defn doc-plan->document-plan [document-plan]
   (when document-plan
     (remove-empty-or-nil-but-not-nil-list-vals
-      {:segments       (map doc-plan->document-plan (:blockly/segments document-plan))
-       :children       (if (and (:blockly/hasChildren document-plan)
-                                (nil? (:blockly/children document-plan)))
-                         (if (= "theme" (:blockly/name document-plan))
-                           [nil]
-                           [])
-                         (map doc-plan->document-plan (:blockly/children document-plan)))
-       :conditions     (map doc-plan->document-plan (:blockly/conditions document-plan))
-       :conceptId      (:blockly/concept-id document-plan)
-       :kind           (:blockly/kind document-plan)
-       :srcId          (:blockly/srcId document-plan)
-       :type           (:blockly/type document-plan)
-       :label          (:blockly/label document-plan)
-       :name           (:blockly/name document-plan)
-       :text           (:blockly/text document-plan)
-       :itemId         (:blockly/item-id document-plan)
-       :operator       (:blockly/operator document-plan)
-       :child          (doc-plan->document-plan (:blockly/child document-plan))
-       :condition      (doc-plan->document-plan (:blockly/condition document-plan))
-       :thenExpression (doc-plan->document-plan (:blockly/then-expression document-plan))
-       :list           (doc-plan->document-plan (:blockly/list document-plan))
-       :modifier       (doc-plan->document-plan (:blockly/modifier document-plan))
-       :value          (doc-plan->document-plan (:blockly/value document-plan))
-       :value1         (doc-plan->document-plan (:blockly/value-1 document-plan))
-       :value2         (doc-plan->document-plan (:blockly/value–2 document-plan))
-       :roles          (map doc-plan->document-plan (:blockly/roles document-plan))
-       :dictionaryItem (doc-plan->document-plan (:blockly/dictionary-item document-plan))})))
+     {:segments       (map doc-plan->document-plan (:blockly/segments document-plan))
+      :children       (if (and (:blockly/hasChildren document-plan)
+                               (nil? (:blockly/children document-plan)))
+                        (if (= "theme" (:blockly/name document-plan))
+                          [nil]
+                          [])
+                        (map doc-plan->document-plan (:blockly/children document-plan)))
+      :conditions     (map doc-plan->document-plan (:blockly/conditions document-plan))
+      :conceptId      (:blockly/concept-id document-plan)
+      :kind           (:blockly/kind document-plan)
+      :srcId          (:blockly/srcId document-plan)
+      :type           (:blockly/type document-plan)
+      :label          (:blockly/label document-plan)
+      :name           (:blockly/name document-plan)
+      :text           (:blockly/text document-plan)
+      :itemId         (:blockly/item-id document-plan)
+      :operator       (:blockly/operator document-plan)
+      :child          (doc-plan->document-plan (:blockly/child document-plan))
+      :condition      (doc-plan->document-plan (:blockly/condition document-plan))
+      :thenExpression (doc-plan->document-plan (:blockly/then-expression document-plan))
+      :list           (doc-plan->document-plan (:blockly/list document-plan))
+      :modifier       (doc-plan->document-plan (:blockly/modifier document-plan))
+      :value          (doc-plan->document-plan (:blockly/value document-plan))
+      :value1         (doc-plan->document-plan (:blockly/value-1 document-plan))
+      :value2         (doc-plan->document-plan (:blockly/value–2 document-plan))
+      :roles          (map doc-plan->document-plan (:blockly/roles document-plan))
+      :dictionaryItem (doc-plan->document-plan (:blockly/dictionary-item document-plan))})))
 
 (defn dp->dp [document-plan]
   {:id               (:document-plan/id document-plan)
@@ -127,22 +127,22 @@
     (map (fn [document-plan] (dp->dp document-plan)) resp)))
 
 (defn update! [conn key data-item]
-  (let [original (pull-entity conn key)
+  (let [original   (pull-entity conn key)
         current-ts (utils/ts-now)]
     @(d/transact conn [(remove-nil-vals
-                         {:db/id                            [:document-plan/id key]
-                          :document-plan/uid                (:uid data-item)
-                          :document-plan/data-sample-id     (:dataSampleId data-item)
-                          :document-plan/name               (:name data-item)
-                          :document-plan/kind               (:kind data-item)
-                          :document-plan/examples           (:examples data-item)
-                          :document-plan/blockly-xml        (:blocklyXml data-item)
-                          :document-plan/document-plan      (prepare-document-plan (:documentPlan data-item))
-                          :document-plan/updated-at         current-ts
-                          :document-plan/data-sample-row    (:dataSampleRow data-item)
-                          :document-plan/data-sample-method (:dataSampleMethod data-item)
-                          :document-plan/update-count       (if (some? (:updateCount original))
-                                                              (inc (:updateCount original))
+                        {:db/id                            [:document-plan/id key]
+                         :document-plan/uid                (:uid data-item)
+                         :document-plan/data-sample-id     (:dataSampleId data-item)
+                         :document-plan/name               (:name data-item)
+                         :document-plan/kind               (:kind data-item)
+                         :document-plan/examples           (:examples data-item)
+                         :document-plan/blockly-xml        (:blocklyXml data-item)
+                         :document-plan/document-plan      (prepare-document-plan (:documentPlan data-item))
+                         :document-plan/updated-at         current-ts
+                         :document-plan/data-sample-row    (:dataSampleRow data-item)
+                         :document-plan/data-sample-method (:dataSampleMethod data-item)
+                         :document-plan/update-count       (if (some? (:updateCount original))
+                                                             (inc (:updateCount original))
                                                              0)})])
     (pull-entity conn key)))
 
diff --git a/api/src/data/datomic/entities/user_group.clj b/api/src/data/datomic/entities/user_group.clj
index f58a3a1ae..ed5444be7 100644
--- a/api/src/data/datomic/entities/user_group.clj
+++ b/api/src/data/datomic/entities/user_group.clj
@@ -24,9 +24,9 @@
 
 (defn make-pattern [entities]
   (vec (conj
-         (filter #(contains? entities (cond-> % (map? %) (-> (keys) (first))))
-                 (rest pattern))
-         (first pattern))))
+        (filter #(contains? entities (cond-> % (map? %) (-> (keys) (first))))
+                (rest pattern))
+        (first pattern))))
 
 (defn scan [conn {:keys [group-id entities]}]
   (ffirst (d/q '[:find (pull ?e pattern)
diff --git a/api/src/data/entities/amr.clj b/api/src/data/entities/amr.clj
index 8a3981681..059d32f3f 100644
--- a/api/src/data/entities/amr.clj
+++ b/api/src/data/entities/amr.clj
@@ -14,10 +14,10 @@
 
 (defn find-amrs [semantic-graph]
   (loop [amr-ids (sg-utils/get-amr-ids semantic-graph)
-         output '()]
+         output  '()]
     (if-not (seq amr-ids)
       (set output)
       (let [amrs (map get-amr amr-ids)]
         (recur
-          (remove nil? (mapcat sg-utils/get-amr-ids amrs))
-          (concat output amrs))))))
+         (remove nil? (mapcat sg-utils/get-amr-ids amrs))
+         (concat output amrs))))))
diff --git a/api/src/data/entities/data_files.clj b/api/src/data/entities/data_files.clj
index cab0d7b86..bcda0f729 100644
--- a/api/src/data/entities/data_files.clj
+++ b/api/src/data/entities/data_files.clj
@@ -100,8 +100,8 @@
 
 (defn fetch-most-relevant [id offset limit group-id]
   (let [{:keys [filename header rows total]} (some-> (read-data-file id group-id) (parse-data))
-        sampled-rows (row-selection/sample rows (:relevant-items-limit conf))
-        m (row-selection/distance-matrix sampled-rows)
+        sampled-rows  (row-selection/sample rows (:relevant-items-limit conf))
+        m             (row-selection/distance-matrix sampled-rows)
         selected-rows (drop offset (row-selection/select-rows m sampled-rows limit))]
     {:id           id
      :fileName     filename
diff --git a/api/src/data/entities/data_files/format_coercion.clj b/api/src/data/entities/data_files/format_coercion.clj
index ac9494cdf..74ed2630c 100644
--- a/api/src/data/entities/data_files/format_coercion.clj
+++ b/api/src/data/entities/data_files/format_coercion.clj
@@ -1,7 +1,6 @@
 (ns data.entities.data-files.format-coercion
   (:require [clojure.string :as string]))
 
-
 (defn transpose [m] (apply mapv vector m))
 
 (defn coerce-ints [coll]
diff --git a/api/src/data/entities/data_files/row_selection.clj b/api/src/data/entities/data_files/row_selection.clj
index 0bbf034c5..f9b8ebb9f 100644
--- a/api/src/data/entities/data_files/row_selection.clj
+++ b/api/src/data/entities/data_files/row_selection.clj
@@ -1,7 +1,7 @@
 (ns data.entities.data-files.row-selection
-    (:require [clojure.set :as set]
-              [clojure.tools.logging :as log]
-              [data.utils :refer [murmur-hash]]))
+  (:require [clojure.set :as set]
+            [clojure.tools.logging :as log]
+            [data.utils :refer [murmur-hash]]))
 
 (defn hash-row [row]
   (map-indexed (fn [idx k] (murmur-hash (str idx ":" k))) row))
@@ -34,19 +34,18 @@
 
       (let [too-close?     (fn [[_ x]] (< x (/ 1 10)))
             available-rows (remove (fn [[idx _]] (contains? (set results) idx)) (get m next)) ;; Rows which are not yet in result
-            distant-rows   (remove (fn [[idx _]]  ;; Rows who are far enough from previous results
+            distant-rows   (remove (fn [[idx _]]            ;; Rows who are far enough from previous results
                                      (some too-close? (-> (get m idx) (select-keys (take-last 3 results)))))
                                    available-rows)
             k              (key (apply max-key val (if (empty? distant-rows) available-rows distant-rows)))]
         (recur (conj results k) k)))))
 
-
 (defn sample [col limit]
   (if (> (count col) limit)
     (let [l    (count col)
           step (- (/ l limit) 1)]
-      (loop [[head & tail]   col
-             result          []]
+      (loop [[head & tail] col
+             result []]
         (if (= (count result) limit)
           result
           (recur (drop step tail) (conj result head)))))
diff --git a/api/src/data/entities/dictionary.clj b/api/src/data/entities/dictionary.clj
index abec98c88..0d1aa41a2 100644
--- a/api/src/data/entities/dictionary.clj
+++ b/api/src/data/entities/dictionary.clj
@@ -67,23 +67,23 @@
 (defn read-dictionary-items-from-file [f]
   (with-open [r (io/reader f)]
     (doall
-      (for [dict-item (edn/read (PushbackReader. r))]
-        (-> (utils/add-ns-to-map "acc-text.nlg.dictionary.item" dict-item)
-            (update ::dict-item/language #(cond->> % (nil? %) (get conf :default-language)))
-            (update ::dict-item/forms (fn [forms]
-                                        (map #(utils/add-ns-to-map
-                                                "acc-text.nlg.dictionary.item.form"
-                                                {:id (utils/gen-uuid) :value % :default? true})
-                                             forms)))
-            (update ::dict-item/attributes (fn [attrs]
-                                             (map (fn [[name value]]
-                                                    (utils/add-ns-to-map
-                                                      "acc-text.nlg.dictionary.item.attr"
-                                                      {:id (utils/gen-uuid) :name name :value value}))
-                                                  attrs))))))))
+     (for [dict-item (edn/read (PushbackReader. r))]
+       (-> (utils/add-ns-to-map "acc-text.nlg.dictionary.item" dict-item)
+           (update ::dict-item/language #(cond->> % (nil? %) (get conf :default-language)))
+           (update ::dict-item/forms (fn [forms]
+                                       (map #(utils/add-ns-to-map
+                                              "acc-text.nlg.dictionary.item.form"
+                                              {:id (utils/gen-uuid) :value % :default? true})
+                                            forms)))
+           (update ::dict-item/attributes (fn [attrs]
+                                            (map (fn [[name value]]
+                                                   (utils/add-ns-to-map
+                                                    "acc-text.nlg.dictionary.item.attr"
+                                                    {:id (utils/gen-uuid) :name name :value value}))
+                                                 attrs))))))))
 
 (defstate dictionary
-  :start (doseq [f (utils/list-files (:dictionary-path conf) #{".edn"})
+  :start (doseq [f         (utils/list-files (:dictionary-path conf) #{".edn"})
                  dict-item (read-dictionary-items-from-file f)]
            (let [id (or (::dict-item/id dict-item) (gen-id dict-item))]
              (when-not (some? (get-dictionary-item id))
diff --git a/api/src/data/entities/document_plan/utils.clj b/api/src/data/entities/document_plan/utils.clj
index 354b3f347..59bc7cedf 100644
--- a/api/src/data/entities/document_plan/utils.clj
+++ b/api/src/data/entities/document_plan/utils.clj
@@ -12,9 +12,9 @@
         (reduce (fn [m {{var-id :id} :attrs
                         [var-name]   :content}]
                   (cond-> m
-                          (and
-                            (some? var-id)
-                            (some? var-name)) (assoc var-id var-name)))
+                    (and
+                     (some? var-id)
+                     (some? var-name)) (assoc var-id var-name)))
                 {}
                 vars)))))
 
diff --git a/api/src/data/entities/document_plan/zip.clj b/api/src/data/entities/document_plan/zip.clj
index 7167ad647..cb4e03cef 100644
--- a/api/src/data/entities/document_plan/zip.clj
+++ b/api/src/data/entities/document_plan/zip.clj
@@ -37,22 +37,22 @@
 
 (defn branch? [{type :type :as node}]
   (and
-    (map? node)
-    (case (keyword type)
-      :Document-plan (seq (:segments node))
-      :AMR (seq (:roles node))
-      :Dictionary-item-modifier (some? (:child node))
-      :Cell-modifier (some? (:child node))
-      :Modifier (or (some? (:child node)) (some? (:modifier node)) (seq (:modifiers node)))
-      :If-then-else (seq (:conditions node))
-      :If-condition (or (some? (:condition node)) (some? (:thenExpression node)))
-      :Default-condition (some? (:thenExpression node))
-      :Value-comparison (or (some? (:value1 node)) (some? (:value2 node)))
-      :Value-in (or (some? (:list node)) (some? (:value node)))
-      :Not (some? (:value node))
-      :Xor (or (some? (:value1 node)) (some? (:value2 node)))
-      :Define-var (some? (:value node))
-      (seq (:children node)))))
+   (map? node)
+   (case (keyword type)
+     :Document-plan (seq (:segments node))
+     :AMR (seq (:roles node))
+     :Dictionary-item-modifier (some? (:child node))
+     :Cell-modifier (some? (:child node))
+     :Modifier (or (some? (:child node)) (some? (:modifier node)) (seq (:modifiers node)))
+     :If-then-else (seq (:conditions node))
+     :If-condition (or (some? (:condition node)) (some? (:thenExpression node)))
+     :Default-condition (some? (:thenExpression node))
+     :Value-comparison (or (some? (:value1 node)) (some? (:value2 node)))
+     :Value-in (or (some? (:list node)) (some? (:value node)))
+     :Not (some? (:value node))
+     :Xor (or (some? (:value1 node)) (some? (:value2 node)))
+     :Define-var (some? (:value node))
+     (seq (:children node)))))
 
 (defn make-zipper [document-plan-root]
   (zip/zipper branch? get-children make-node document-plan-root))
diff --git a/api/src/data/entities/reader_model.clj b/api/src/data/entities/reader_model.clj
index e30f72fbc..afd3800b8 100644
--- a/api/src/data/entities/reader_model.clj
+++ b/api/src/data/entities/reader_model.clj
@@ -54,8 +54,8 @@
               (utils/read-edn)
               (filter ::reader-model/available?)
               (mapv #(update! (assoc % ::reader-model/type :reader
-                                       ::reader-model/enabled? (contains? (:enabled-readers conf)
-                                                                          (str/capitalize (::reader-model/code %))))
+                                     ::reader-model/enabled? (contains? (:enabled-readers conf)
+                                                                        (str/capitalize (::reader-model/code %))))
                               user-group/DUMMY-USER-GROUP-ID)))
   :stop (doseq [reader (available-readers user-group/DUMMY-USER-GROUP-ID)]
           (delete! (::reader-model/code reader) user-group/DUMMY-USER-GROUP-ID)))
@@ -65,8 +65,8 @@
               (utils/read-edn)
               (filter ::reader-model/available?)
               (mapv #(update! (assoc % ::reader-model/type :language
-                                       ::reader-model/enabled? (contains? (:enabled-languages conf)
-                                                                          (str/capitalize (::reader-model/code %))))
+                                     ::reader-model/enabled? (contains? (:enabled-languages conf)
+                                                                        (str/capitalize (::reader-model/code %))))
                               user-group/DUMMY-USER-GROUP-ID)))
   :stop (doseq [lang (available-languages user-group/DUMMY-USER-GROUP-ID)]
           (delete! (::reader-model/code lang) user-group/DUMMY-USER-GROUP-ID)))
diff --git a/api/src/data/entities/user_group.clj b/api/src/data/entities/user_group.clj
index 254ca90a6..e8b27410b 100644
--- a/api/src/data/entities/user_group.clj
+++ b/api/src/data/entities/user_group.clj
@@ -19,7 +19,7 @@
 
 (defn list-files [group-id]
   (::user-group/data-files
-    (db/scan! user-group-db {:group-id group-id :entities #{::user-group/data-files}})))
+   (db/scan! user-group-db {:group-id group-id :entities #{::user-group/data-files}})))
 
 (defn link-document-plan [group-id dp-ref]
   (log/debugf "Linking document plan: `%s` to user group ID: %d" dp-ref group-id)
@@ -28,7 +28,7 @@
 (defn list-document-plans [group-id]
   (map dp-entity/dp->dp
        (::user-group/document-plans
-         (db/scan! user-group-db {:group-id group-id :entities #{::user-group/document-plans}}))))
+        (db/scan! user-group-db {:group-id group-id :entities #{::user-group/document-plans}}))))
 
 (defn link-dictionary-item [group-id dict-item-ref]
   (log/debugf "Linking dictionary-item: `%s` to user group ID: %d" dict-item-ref group-id)
@@ -36,7 +36,7 @@
 
 (defn list-dictionary-items [group-id]
   (::user-group/dictionary-items
-    (db/scan! user-group-db {:group-id group-id :entities #{::user-group/dictionary-items}})))
+   (db/scan! user-group-db {:group-id group-id :entities #{::user-group/dictionary-items}})))
 
 (defn link-reader-model [group-id reader-model-ref]
   (log/debugf "Linking reader model: `%s` to user group ID: %d" reader-model-ref group-id)
@@ -44,4 +44,4 @@
 
 (defn list-reader-models [group-id]
   (::user-group/reader-models
-    (db/scan! user-group-db {:group-id group-id :entities #{::user-group/reader-models}})))
+   (db/scan! user-group-db {:group-id group-id :entities #{::user-group/reader-models}})))
diff --git a/api/src/data/spec/user_group.clj b/api/src/data/spec/user_group.clj
index e7cf6640c..907e302f6 100644
--- a/api/src/data/spec/user_group.clj
+++ b/api/src/data/spec/user_group.clj
@@ -1,8 +1,8 @@
 (ns data.spec.user-group
-    (:require [acc-text.nlg.dictionary.item :as dictionary-item]
-              [clojure.spec.alpha :as s]
-              [data.spec.data-file :as data-file]
-              [data.spec.reader-model :as reader-model]))
+  (:require [acc-text.nlg.dictionary.item :as dictionary-item]
+            [clojure.spec.alpha :as s]
+            [data.spec.data-file :as data-file]
+            [data.spec.reader-model :as reader-model]))
 
 (s/def ::id number?)
 
diff --git a/api/src/data/utils.clj b/api/src/data/utils.clj
index 7489a54e1..163cd48a3 100644
--- a/api/src/data/utils.clj
+++ b/api/src/data/utils.clj
@@ -27,11 +27,10 @@
   (with-open [rdr (io/reader f)]
     (edn/read (PushbackReader. rdr))))
 
-
 (defn read-csv [^File f]
   (with-open [reader (io/reader f)]
     (doall
-      (csv/read-csv reader))))
+     (csv/read-csv reader))))
 
 (defn read-json [^File f]
   (with-open [f (io/reader f)]
@@ -42,15 +41,15 @@
 
 (defn get-ext [^File f]
   (let [filename (.getName f)
-        index (.lastIndexOf filename ".")]
+        index    (.lastIndexOf filename ".")]
     (when (not= index -1)
       (subs filename index (count filename)))))
 
 (defn get-name [^File f]
   (let [filename (.getName f)
-        index (.lastIndexOf filename ".")]
+        index    (.lastIndexOf filename ".")]
     (cond-> filename
-            (not= index -1) (subs 0 index))))
+      (not= index -1) (subs 0 index))))
 
 (defn file-with-ext
   [^File f ^PersistentHashSet ext]
@@ -87,4 +86,4 @@
              {}
              m))
 
-(defn murmur-hash [key] (first (MurmurHash3/hash128x64 (.getBytes key))))
\ No newline at end of file
+(defn murmur-hash [key] (first (MurmurHash3/hash128x64 (.getBytes key))))
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index b8bb3b147..93000e4c6 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -37,9 +37,33 @@ jobs:
       - script: |
           cd api
           clj-kondo --lint src test
+        displayName: 'Lint API'
+        condition: succeededOrFailed()
       - script: |
           cd core
           clj-kondo --lint src test
+        displayName: 'Lint Core'
+        condition: succeededOrFailed()
+
+  - job: check_format
+    continueOnError: true
+    pool:
+      vmImage: 'ubuntu-latest'
+    steps:
+      - script: |
+          curl -O https://download.clojure.org/install/linux-install-1.10.1.492.sh
+          chmod +x linux-install-1.10.1.492.sh
+          sudo ./linux-install-1.10.1.492.sh
+      - script: |
+          cd api
+          clojure -Sdeps '{:deps {cljfmt {:mvn/version "0.8.0"}}}' -m cljfmt.main check
+        displayName: 'Check API format'
+        condition: succeededOrFailed()
+      - script: |
+          cd core
+          clojure -Sdeps '{:deps {cljfmt {:mvn/version "0.8.0"}}}' -m cljfmt.main check
+        displayName: 'Check Core format'
+        condition: succeededOrFailed()
 
 # TODO: fix test timeout
 # - job: test_frontend
diff --git a/core/Makefile b/core/Makefile
index 8eaeb921f..7eeae7e9b 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1,12 +1,8 @@
 lint:
-	clojure -Sdeps '{:deps {clj-kondo {:mvn/version "RELEASE"}}}' -m clj-kondo.main --lint src test
-
-fmt-check:
-	clojure -Sdeps '{:deps {cljfmt/cljfmt {:mvn/version "0.7.0"}}}' -m cljfmt.main check
-
-fmt-fix:
-	clojure -Sdeps '{:deps {cljfmt/cljfmt {:mvn/version "0.7.0"}}}' -m cljfmt.main check
+	clj -M:lint
 
+fix-format:
+	clojure -M:format fix
 
 unit-tests:
 	clojure -A:test -e:integration
diff --git a/core/deps.edn b/core/deps.edn
index 93d17f9b2..5fc1bd125 100644
--- a/core/deps.edn
+++ b/core/deps.edn
@@ -11,12 +11,18 @@
              ubergraph/ubergraph            {:mvn/version "0.8.1"}}
  :mvn/repos {"central" {:url "https://repo1.maven.org/maven2/"}
              "clojars" {:url "https://clojars.org/repo"}}
- :aliases   {:dev  {:extra-deps {org.clojure/test.check {:mvn/version "0.9.0"}}}
-             :test {:extra-paths ["test"]
-                    :extra-deps  {com.cognitect/test-runner
-                                  {:git/url "https://github.com/cognitect-labs/test-runner"
-                                   :sha     "028a6d41ac9ac5d5c405dfc38e4da6b4cc1255d5"}}
-                    :main-opts   ["-m" "cognitect.test-runner"]}
+ :aliases   {:dev      {:extra-deps {org.clojure/test.check {:mvn/version "0.9.0"}}}
+             :test     {:extra-paths ["test"]
+                        :extra-deps  {com.cognitect/test-runner
+                                      {:git/url "https://github.com/cognitect-labs/test-runner"
+                                       :sha     "028a6d41ac9ac5d5c405dfc38e4da6b4cc1255d5"}}
+                        :main-opts   ["-m" "cognitect.test-runner"]}
              :coverage {:extra-paths ["test"]
-                        :extra-deps {cloverage/cloverage {:mvn/version "1.2.2"}}
-                        :main-opts ["-m" "cloverage.coverage" "-p" "src" "-s" "test" "--codecov" "--runner" "clojure.test"]}}}
+                        :extra-deps  {cloverage/cloverage {:mvn/version "1.2.2"}}
+                        :main-opts   ["-m" "cloverage.coverage" "-p" "src" "-s" "test" "--codecov" "--runner" "clojure.test"]}
+             :lint     {:extra-paths ["test"]
+                        :extra-deps  {clj-kondo/clj-kondo {:mvn/version "RELEASE"}}
+                        :main-opts   ["-m" "clj-kondo.main" "--lint" "src" "test"]}
+             :format   {:extra-paths ["test"]
+                        :extra-deps  {cljfmt/cljfmt {:mvn/version "0.8.0"}}
+                        :main-opts   ["-m" "cljfmt.main"]}}}
diff --git a/core/src/acc_text/nlg/core.clj b/core/src/acc_text/nlg/core.clj
index b8905519e..ab59b5a99 100644
--- a/core/src/acc_text/nlg/core.clj
+++ b/core/src/acc_text/nlg/core.clj
@@ -15,11 +15,11 @@
                          "*Reader"   (str/join "," (:readers context))})
       (update :dictionary #(reduce (fn [m {::dict-item/keys [key category] :as dict-item}]
                                      (assoc m [key category]
-                                              (update dict-item ::dict-item/attributes
-                                                      (fn [attrs]
-                                                        (into {} (map (fn [{::dict-item-attr/keys [name value]}]
-                                                                        [name value])
-                                                                      attrs))))))
+                                            (update dict-item ::dict-item/attributes
+                                                    (fn [attrs]
+                                                      (into {} (map (fn [{::dict-item-attr/keys [name value]}]
+                                                                      [name value])
+                                                                    attrs))))))
                                    {}
                                    %))))
 
diff --git a/core/src/acc_text/nlg/dictionary/lang/eng.clj b/core/src/acc_text/nlg/dictionary/lang/eng.clj
index 909df7adf..5c2c7a681 100644
--- a/core/src/acc_text/nlg/dictionary/lang/eng.clj
+++ b/core/src/acc_text/nlg/dictionary/lang/eng.clj
@@ -10,25 +10,25 @@
 
 (defmethod resolve-dict-item "A" [{::dict-item/keys [key forms]}]
   (let [concept (utils/gen-id)
-        arity (count forms)
-        args (take arity (repeatedly #(utils/gen-id)))]
+        arity   (count forms)
+        args    (take arity (repeatedly #(utils/gen-id)))]
     #::sg{:id        (utils/gen-id)
           :name      key
           :category  "A"
           :concepts  (cons
-                       {:id       concept
-                        :type     :operation
-                        :name     "mkA"
-                        :label    (utils/get-operation-label module "mkA" (take arity (repeat "Str")) "A")
-                        :category "A"
-                        :module   module}
-                       (map (fn [arg {form ::dict-item-form/value}]
-                              {:id       arg
-                               :type     :quote
-                               :value    form
-                               :category "Str"})
-                            args
-                            forms))
+                      {:id       concept
+                       :type     :operation
+                       :name     "mkA"
+                       :label    (utils/get-operation-label module "mkA" (take arity (repeat "Str")) "A")
+                       :category "A"
+                       :module   module}
+                      (map (fn [arg {form ::dict-item-form/value}]
+                             {:id       arg
+                              :type     :quote
+                              :value    form
+                              :category "Str"})
+                           args
+                           forms))
           :relations (map-indexed (fn [i arg]
                                     {:from     concept
                                      :to       arg
@@ -39,9 +39,9 @@
                                   args)}))
 
 (defmethod resolve-dict-item "A2" [{::dict-item/keys [attributes] :as dict-item}]
-  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "A"))
+  (let [child   (resolve-dict-item (assoc dict-item ::dict-item/category "A"))
         concept (utils/gen-id)
-        arg (utils/gen-id)]
+        arg     (utils/gen-id)]
     (-> child
         (assoc ::sg/category "A2")
         (update ::sg/concepts concat [{:id       concept
@@ -68,65 +68,65 @@
                                         :name     "Str"}]))))
 
 (defmethod resolve-dict-item "N" [{::dict-item/keys [key forms attributes]}]
-  (let [concept (utils/gen-id)
-        noun-concept (utils/gen-id)
+  (let [concept        (utils/gen-id)
+        noun-concept   (utils/gen-id)
         gender-concept (utils/gen-id)
-        gender (get attributes "Gender" "nonhuman")
-        arity (count forms)
-        args (take arity (repeatedly #(utils/gen-id)))]
+        gender         (get attributes "Gender" "nonhuman")
+        arity          (count forms)
+        args           (take arity (repeatedly #(utils/gen-id)))]
     #::sg{:id        (utils/gen-id)
           :name      key
           :category  "N"
           :concepts  (concat
-                       [{:id       concept
-                         :type     :operation
-                         :name     "mkN"
-                         :label    (utils/get-operation-label module "mkN" ["Gender" "N"] "N")
-                         :category "N"
-                         :module   module}
-                        {:id       gender-concept
-                         :type     :operation
-                         :name     gender
-                         :label    (utils/get-operation-label module gender [] "Gender")
-                         :category "Gender"
-                         :module   module}
-                        {:id       noun-concept
-                         :type     :operation
-                         :name     "mkN"
-                         :label    (utils/get-operation-label module "mkN" (take arity (repeat "Str")) "N")
-                         :category "N"
-                         :module   module}]
-                       (map (fn [arg {form ::dict-item-form/value}]
-                              {:id       arg
-                               :type     :quote
-                               :value    form
-                               :category "Str"})
-                            args
-                            forms))
+                      [{:id       concept
+                        :type     :operation
+                        :name     "mkN"
+                        :label    (utils/get-operation-label module "mkN" ["Gender" "N"] "N")
+                        :category "N"
+                        :module   module}
+                       {:id       gender-concept
+                        :type     :operation
+                        :name     gender
+                        :label    (utils/get-operation-label module gender [] "Gender")
+                        :category "Gender"
+                        :module   module}
+                       {:id       noun-concept
+                        :type     :operation
+                        :name     "mkN"
+                        :label    (utils/get-operation-label module "mkN" (take arity (repeat "Str")) "N")
+                        :category "N"
+                        :module   module}]
+                      (map (fn [arg {form ::dict-item-form/value}]
+                             {:id       arg
+                              :type     :quote
+                              :value    form
+                              :category "Str"})
+                           args
+                           forms))
           :relations (concat
-                       [{:from     concept
-                         :to       gender-concept
-                         :role     :arg
-                         :index    0
-                         :category "Gender"
-                         :name     "Gender"}
-                        {:from     concept
-                         :to       noun-concept
-                         :role     :arg
-                         :index    1
-                         :category "N"
-                         :name     "N"}]
-                       (map-indexed (fn [i arg]
-                                      {:from     noun-concept
-                                       :to       arg
-                                       :role     :arg
-                                       :index    i
-                                       :category "Str"
-                                       :name     "Str"})
-                                    args))}))
+                      [{:from     concept
+                        :to       gender-concept
+                        :role     :arg
+                        :index    0
+                        :category "Gender"
+                        :name     "Gender"}
+                       {:from     concept
+                        :to       noun-concept
+                        :role     :arg
+                        :index    1
+                        :category "N"
+                        :name     "N"}]
+                      (map-indexed (fn [i arg]
+                                     {:from     noun-concept
+                                      :to       arg
+                                      :role     :arg
+                                      :index    i
+                                      :category "Str"
+                                      :name     "Str"})
+                                   args))}))
 
 (defmethod resolve-dict-item "PN" [dict-item]
-  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "N"))
+  (let [child   (resolve-dict-item (assoc dict-item ::dict-item/category "N"))
         concept (utils/gen-id)]
     (-> child
         (assoc ::sg/category "PN")
@@ -144,9 +144,9 @@
                                         :name     "N"}]))))
 
 (defmethod resolve-dict-item "N2" [{::dict-item/keys [attributes] :as dict-item}]
-  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "N"))
+  (let [child   (resolve-dict-item (assoc dict-item ::dict-item/category "N"))
         concept (utils/gen-id)
-        arg (utils/gen-id)]
+        arg     (utils/gen-id)]
     (-> child
         (assoc ::sg/category "N2")
         (update ::sg/concepts concat [{:id       concept
@@ -173,12 +173,12 @@
                                         :name     "Str"}]))))
 
 (defmethod resolve-dict-item "N3" [{::dict-item/keys [attributes] :as dict-item}]
-  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "N"))
-        concept (utils/gen-id)
+  (let [child        (resolve-dict-item (assoc dict-item ::dict-item/category "N"))
+        concept      (utils/gen-id)
         prep-concept (utils/gen-id)
         post-concept (utils/gen-id)
-        prep-arg (utils/gen-id)
-        post-arg (utils/gen-id)]
+        prep-arg     (utils/gen-id)
+        post-arg     (utils/gen-id)]
     (-> child
         (assoc ::sg/category "N3")
         (update ::sg/concepts concat [{:id       concept
@@ -239,179 +239,179 @@
                                         :name     "Str"}]))))
 
 (defmethod resolve-dict-item "NP" [{::dict-item/keys [key forms language attributes]}]
-  (let [concept (utils/gen-id)
-        arity (count forms)
-        args (take arity (repeatedly #(utils/gen-id)))
-        arg-types (concat (take arity (repeat "Str")) ["Number" "Person" "Gender"])
+  (let [concept        (utils/gen-id)
+        arity          (count forms)
+        args           (take arity (repeatedly #(utils/gen-id)))
+        arg-types      (concat (take arity (repeat "Str")) ["Number" "Person" "Gender"])
         number-concept (utils/gen-id)
-        number (get attributes "Number" "singular")
+        number         (get attributes "Number" "singular")
         person-concept (utils/gen-id)
-        person (get attributes "Person" "P3")
+        person         (get attributes "Person" "P3")
         gender-concept (utils/gen-id)
-        gender (get attributes "Gender" "nonhuman")]
+        gender         (get attributes "Gender" "nonhuman")]
     #::sg{:id        (utils/gen-id)
           :name      key
           :category  "NP"
           :concepts  (cons
-                       {:id       concept
-                        :type     :operation
-                        :name     "mkNP"
-                        :label    (utils/get-operation-label module "mkNP" arg-types "NP")
-                        :category "NP"
-                        :module   (str "Res" language)}
-                       (concat
-                         (map (fn [arg {form ::dict-item-form/value}]
-                                {:id       arg
-                                 :type     :quote
-                                 :value    form
-                                 :category "Str"})
-                              args
-                              forms)
-                         [{:id       number-concept
-                           :type     :operation
-                           :name     number
-                           :label    (utils/get-operation-label module number [] "Number")
-                           :category "Number"
-                           :module   module}
-                          {:id       person-concept
-                           :type     :operation
-                           :name     person
-                           :label    (utils/get-operation-label module person [] "Person")
-                           :category "Person"
-                           :module   (str "Res" language)}
-                          {:id       gender-concept
-                           :type     :operation
-                           :name     gender
-                           :label    (utils/get-operation-label module gender [] "Gender")
-                           :category "Gender"
-                           :module   module}]))
-          :relations (concat
-                       (map-indexed (fn [i arg]
-                                      {:from     concept
-                                       :to       arg
-                                       :role     :arg
-                                       :index    i
-                                       :category "Str"
-                                       :name     "Str"})
-                                    args)
-                       [{:from     concept
-                         :to       number-concept
-                         :role     :arg
-                         :index    (+ arity 1)
+                      {:id       concept
+                       :type     :operation
+                       :name     "mkNP"
+                       :label    (utils/get-operation-label module "mkNP" arg-types "NP")
+                       :category "NP"
+                       :module   (str "Res" language)}
+                      (concat
+                       (map (fn [arg {form ::dict-item-form/value}]
+                              {:id       arg
+                               :type     :quote
+                               :value    form
+                               :category "Str"})
+                            args
+                            forms)
+                       [{:id       number-concept
+                         :type     :operation
+                         :name     number
+                         :label    (utils/get-operation-label module number [] "Number")
                          :category "Number"
-                         :name     "Number"}
-                        {:from     concept
-                         :to       person-concept
-                         :role     :arg
-                         :index    (+ arity 2)
+                         :module   module}
+                        {:id       person-concept
+                         :type     :operation
+                         :name     person
+                         :label    (utils/get-operation-label module person [] "Person")
                          :category "Person"
-                         :name     "Person"}
-                        {:from     concept
-                         :to       gender-concept
-                         :role     :arg
-                         :index    (+ arity 3)
+                         :module   (str "Res" language)}
+                        {:id       gender-concept
+                         :type     :operation
+                         :name     gender
+                         :label    (utils/get-operation-label module gender [] "Gender")
                          :category "Gender"
-                         :name     "Gender"}])}))
+                         :module   module}]))
+          :relations (concat
+                      (map-indexed (fn [i arg]
+                                     {:from     concept
+                                      :to       arg
+                                      :role     :arg
+                                      :index    i
+                                      :category "Str"
+                                      :name     "Str"})
+                                   args)
+                      [{:from     concept
+                        :to       number-concept
+                        :role     :arg
+                        :index    (+ arity 1)
+                        :category "Number"
+                        :name     "Number"}
+                       {:from     concept
+                        :to       person-concept
+                        :role     :arg
+                        :index    (+ arity 2)
+                        :category "Person"
+                        :name     "Person"}
+                       {:from     concept
+                        :to       gender-concept
+                        :role     :arg
+                        :index    (+ arity 3)
+                        :category "Gender"
+                        :name     "Gender"}])}))
 
 (defmethod resolve-dict-item "IP" [{::dict-item/keys [key forms language attributes]}]
-  (let [concept (utils/gen-id)
-        arity (count forms)
-        args (take arity (repeatedly #(utils/gen-id)))
-        arg-types (concat (take arity (repeat "Str")) ["Number"])
+  (let [concept        (utils/gen-id)
+        arity          (count forms)
+        args           (take arity (repeatedly #(utils/gen-id)))
+        arg-types      (concat (take arity (repeat "Str")) ["Number"])
         number-concept (utils/gen-id)
-        number (get attributes "Number" "singular")]
+        number         (get attributes "Number" "singular")]
     #::sg{:id        (utils/gen-id)
           :name      key
           :category  "NP"
           :concepts  (cons
-                       {:id       concept
-                        :type     :operation
-                        :name     "mkIP"
-                        :label    (utils/get-operation-label module "mkIP" arg-types "IP")
-                        :category "IP"
-                        :module   (str "Res" language)}
-                       (concat
-                         (map (fn [arg {form ::dict-item-form/value}]
-                                {:id       arg
-                                 :type     :quote
-                                 :value    form
-                                 :category "Str"})
-                              args
-                              forms)
-                         [{:id       number-concept
-                           :type     :operation
-                           :name     number
-                           :label    (utils/get-operation-label module number [] "Number")
-                           :category "Number"
-                           :module   module}]))
-          :relations (concat
-                       (map-indexed (fn [i arg]
-                                      {:from     concept
-                                       :to       arg
-                                       :role     :arg
-                                       :index    i
-                                       :category "Str"
-                                       :name     "Str"})
-                                    args)
-                       [{:from     concept
-                         :to       number-concept
-                         :role     :arg
-                         :index    (+ arity 1)
+                      {:id       concept
+                       :type     :operation
+                       :name     "mkIP"
+                       :label    (utils/get-operation-label module "mkIP" arg-types "IP")
+                       :category "IP"
+                       :module   (str "Res" language)}
+                      (concat
+                       (map (fn [arg {form ::dict-item-form/value}]
+                              {:id       arg
+                               :type     :quote
+                               :value    form
+                               :category "Str"})
+                            args
+                            forms)
+                       [{:id       number-concept
+                         :type     :operation
+                         :name     number
+                         :label    (utils/get-operation-label module number [] "Number")
                          :category "Number"
-                         :name     "Number"}])}))
+                         :module   module}]))
+          :relations (concat
+                      (map-indexed (fn [i arg]
+                                     {:from     concept
+                                      :to       arg
+                                      :role     :arg
+                                      :index    i
+                                      :category "Str"
+                                      :name     "Str"})
+                                   args)
+                      [{:from     concept
+                        :to       number-concept
+                        :role     :arg
+                        :index    (+ arity 1)
+                        :category "Number"
+                        :name     "Number"}])}))
 
 (defmethod resolve-dict-item "Conj" [{::dict-item/keys [key forms attributes]}]
-  (let [concept (utils/gen-id)
-        arity (count forms)
-        args (take arity (repeatedly #(utils/gen-id)))
-        arg-types (concat (take arity (repeat "Str")) ["Number"])
+  (let [concept        (utils/gen-id)
+        arity          (count forms)
+        args           (take arity (repeatedly #(utils/gen-id)))
+        arg-types      (concat (take arity (repeat "Str")) ["Number"])
         number-concept (utils/gen-id)
-        number (get attributes "Number")]
+        number         (get attributes "Number")]
     #::sg{:id        (utils/gen-id)
           :name      key
           :category  "NP"
           :concepts  (cons
-                       {:id       concept
-                        :type     :operation
-                        :name     "mkConj"
-                        :label    (utils/get-operation-label module "mkConj" arg-types "Conj")
-                        :category "Conj"
-                        :module   module}
-                       (concat
-                         (map (fn [arg {form ::dict-item-form/value}]
-                                {:id       arg
-                                 :type     :quote
-                                 :value    form
-                                 :category "Str"})
-                              args
-                              forms)
-                         (when (some? number)
-                           [{:id       number-concept
-                             :type     :operation
-                             :name     number
-                             :label    (utils/get-operation-label module number [] "Number")
-                             :category "Number"
-                             :module   module}])))
-          :relations (concat
-                       (map-indexed (fn [i arg]
-                                      {:from     concept
-                                       :to       arg
-                                       :role     :arg
-                                       :index    i
-                                       :category "Str"
-                                       :name     "Str"})
-                                    args)
+                      {:id       concept
+                       :type     :operation
+                       :name     "mkConj"
+                       :label    (utils/get-operation-label module "mkConj" arg-types "Conj")
+                       :category "Conj"
+                       :module   module}
+                      (concat
+                       (map (fn [arg {form ::dict-item-form/value}]
+                              {:id       arg
+                               :type     :quote
+                               :value    form
+                               :category "Str"})
+                            args
+                            forms)
                        (when (some? number)
-                         [{:from     concept
-                           :to       number-concept
-                           :role     :arg
-                           :index    (+ arity 1)
+                         [{:id       number-concept
+                           :type     :operation
+                           :name     number
+                           :label    (utils/get-operation-label module number [] "Number")
                            :category "Number"
-                           :name     "Number"}]))}))
+                           :module   module}])))
+          :relations (concat
+                      (map-indexed (fn [i arg]
+                                     {:from     concept
+                                      :to       arg
+                                      :role     :arg
+                                      :index    i
+                                      :category "Str"
+                                      :name     "Str"})
+                                   args)
+                      (when (some? number)
+                        [{:from     concept
+                          :to       number-concept
+                          :role     :arg
+                          :index    (+ arity 1)
+                          :category "Number"
+                          :name     "Number"}]))}))
 
 (defmethod resolve-dict-item "AdA" [{::dict-item/keys [key forms]}]
   (let [concept (utils/gen-id)
-        arg (utils/gen-id)]
+        arg     (utils/gen-id)]
     #::sg{:id        (utils/gen-id)
           :name      key
           :category  "AdA"
@@ -434,7 +434,7 @@
 
 (defmethod resolve-dict-item "AdN" [{::dict-item/keys [key forms]}]
   (let [concept (utils/gen-id)
-        arg (utils/gen-id)]
+        arg     (utils/gen-id)]
     #::sg{:id        (utils/gen-id)
           :name      key
           :category  "AdN"
@@ -457,7 +457,7 @@
 
 (defmethod resolve-dict-item "AdV" [{::dict-item/keys [key forms]}]
   (let [concept (utils/gen-id)
-        arg (utils/gen-id)]
+        arg     (utils/gen-id)]
     #::sg{:id        (utils/gen-id)
           :name      key
           :category  "AdV"
@@ -480,7 +480,7 @@
 
 (defmethod resolve-dict-item "Adv" [{::dict-item/keys [key forms]}]
   (let [concept (utils/gen-id)
-        arg (utils/gen-id)]
+        arg     (utils/gen-id)]
     #::sg{:id        (utils/gen-id)
           :name      key
           :category  "Adv"
@@ -503,7 +503,7 @@
 
 (defmethod resolve-dict-item "Prep" [{::dict-item/keys [key forms]}]
   (let [concept (utils/gen-id)
-        arg (utils/gen-id)]
+        arg     (utils/gen-id)]
     #::sg{:id        (utils/gen-id)
           :name      key
           :category  "Prep"
@@ -526,7 +526,7 @@
 
 (defmethod resolve-dict-item "Post" [{::dict-item/keys [key forms]}]
   (let [concept (utils/gen-id)
-        arg (utils/gen-id)]
+        arg     (utils/gen-id)]
     #::sg{:id        (utils/gen-id)
           :name      key
           :category  "Prep"
@@ -548,102 +548,102 @@
                        :name     "Str"}]}))
 
 (defmethod resolve-dict-item "Pron" [{::dict-item/keys [key forms language attributes]}]
-  (let [concept (utils/gen-id)
-        arity (count forms)
-        args (take arity (repeatedly #(utils/gen-id)))
-        arg-types (concat (take arity (repeat "Str")) ["Number" "Person" "Gender"])
+  (let [concept        (utils/gen-id)
+        arity          (count forms)
+        args           (take arity (repeatedly #(utils/gen-id)))
+        arg-types      (concat (take arity (repeat "Str")) ["Number" "Person" "Gender"])
         number-concept (utils/gen-id)
-        number (get attributes "Number" "singular")
+        number         (get attributes "Number" "singular")
         person-concept (utils/gen-id)
-        person (get attributes "Person" "P3")
+        person         (get attributes "Person" "P3")
         gender-concept (utils/gen-id)
-        gender (get attributes "Gender" "nonhuman")]
+        gender         (get attributes "Gender" "nonhuman")]
     #::sg{:id        (utils/gen-id)
           :name      key
           :category  "Pron"
           :concepts  (cons
-                       {:id       concept
-                        :type     :operation
-                        :name     "mkPron"
-                        :label    (utils/get-operation-label module "mkPron" arg-types "Pron")
-                        :category "Pron"
-                        :module   (str "Morpho" language)}
-                       (concat
-                         (map (fn [arg {form ::dict-item-form/value}]
-                                {:id       arg
-                                 :type     :quote
-                                 :value    form
-                                 :category "Str"})
-                              args
-                              forms)
-                         [{:id       number-concept
-                           :type     :operation
-                           :name     number
-                           :label    (utils/get-operation-label module number [] "Number")
-                           :category "Number"
-                           :module   module}
-                          {:id       person-concept
-                           :type     :operation
-                           :name     person
-                           :label    (utils/get-operation-label module person [] "Person")
-                           :category "Person"
-                           :module   (str "Res" language)}
-                          {:id       gender-concept
-                           :type     :operation
-                           :name     gender
-                           :label    (utils/get-operation-label module gender [] "Gender")
-                           :category "Gender"
-                           :module   module}]))
-          :relations (concat
-                       (map-indexed (fn [i arg]
-                                      {:from     concept
-                                       :to       arg
-                                       :role     :arg
-                                       :index    i
-                                       :category "Str"
-                                       :name     "Str"})
-                                    args)
-                       [{:from     concept
-                         :to       number-concept
-                         :role     :arg
-                         :index    (+ arity 1)
+                      {:id       concept
+                       :type     :operation
+                       :name     "mkPron"
+                       :label    (utils/get-operation-label module "mkPron" arg-types "Pron")
+                       :category "Pron"
+                       :module   (str "Morpho" language)}
+                      (concat
+                       (map (fn [arg {form ::dict-item-form/value}]
+                              {:id       arg
+                               :type     :quote
+                               :value    form
+                               :category "Str"})
+                            args
+                            forms)
+                       [{:id       number-concept
+                         :type     :operation
+                         :name     number
+                         :label    (utils/get-operation-label module number [] "Number")
                          :category "Number"
-                         :name     "Number"}
-                        {:from     concept
-                         :to       person-concept
-                         :role     :arg
-                         :index    (+ arity 2)
+                         :module   module}
+                        {:id       person-concept
+                         :type     :operation
+                         :name     person
+                         :label    (utils/get-operation-label module person [] "Person")
                          :category "Person"
-                         :name     "Person"}
-                        {:from     concept
-                         :to       gender-concept
-                         :role     :arg
-                         :index    (+ arity 3)
+                         :module   (str "Res" language)}
+                        {:id       gender-concept
+                         :type     :operation
+                         :name     gender
+                         :label    (utils/get-operation-label module gender [] "Gender")
                          :category "Gender"
-                         :name     "Gender"}])}))
+                         :module   module}]))
+          :relations (concat
+                      (map-indexed (fn [i arg]
+                                     {:from     concept
+                                      :to       arg
+                                      :role     :arg
+                                      :index    i
+                                      :category "Str"
+                                      :name     "Str"})
+                                   args)
+                      [{:from     concept
+                        :to       number-concept
+                        :role     :arg
+                        :index    (+ arity 1)
+                        :category "Number"
+                        :name     "Number"}
+                       {:from     concept
+                        :to       person-concept
+                        :role     :arg
+                        :index    (+ arity 2)
+                        :category "Person"
+                        :name     "Person"}
+                       {:from     concept
+                        :to       gender-concept
+                        :role     :arg
+                        :index    (+ arity 3)
+                        :category "Gender"
+                        :name     "Gender"}])}))
 
 (defmethod resolve-dict-item "Quant" [{::dict-item/keys [key forms]}]
   (let [concept (utils/gen-id)
-        arity (count forms)
-        args (take arity (repeatedly #(utils/gen-id)))]
+        arity   (count forms)
+        args    (take arity (repeatedly #(utils/gen-id)))]
     #::sg{:id        (utils/gen-id)
           :name      key
           :category  "Quant"
           :concepts  (cons
-                       {:id       concept
-                        :type     :operation
-                        :name     "mkQuant"
-                        :label    (utils/get-operation-label module "mkQuant" (take arity (repeat "Str")) "Quant")
-                        :category "Quant"
-                        :module   module}
-                       (concat
-                         (map (fn [arg {form ::dict-item-form/value}]
-                                {:id       arg
-                                 :type     :quote
-                                 :value    form
-                                 :category "Str"})
-                              args
-                              forms)))
+                      {:id       concept
+                       :type     :operation
+                       :name     "mkQuant"
+                       :label    (utils/get-operation-label module "mkQuant" (take arity (repeat "Str")) "Quant")
+                       :category "Quant"
+                       :module   module}
+                      (concat
+                       (map (fn [arg {form ::dict-item-form/value}]
+                              {:id       arg
+                               :type     :quote
+                               :value    form
+                               :category "Str"})
+                            args
+                            forms)))
           :relations (map-indexed (fn [i arg]
                                     {:from     concept
                                      :to       arg
@@ -655,7 +655,7 @@
 
 (defmethod resolve-dict-item "Subj" [{::dict-item/keys [key forms]}]
   (let [concept (utils/gen-id)
-        arg (utils/gen-id)]
+        arg     (utils/gen-id)]
     #::sg{:id        (utils/gen-id)
           :name      key
           :category  "Subj"
@@ -678,7 +678,7 @@
 
 (defmethod resolve-dict-item "Interj" [{::dict-item/keys [key forms]}]
   (let [concept (utils/gen-id)
-        arg (utils/gen-id)]
+        arg     (utils/gen-id)]
     #::sg{:id        (utils/gen-id)
           :name      key
           :category  "Interj"
@@ -701,25 +701,25 @@
 
 (defmethod resolve-dict-item "V" [{::dict-item/keys [key forms]}]
   (let [concept (utils/gen-id)
-        arity (count forms)
-        args (take arity (repeatedly #(utils/gen-id)))]
+        arity   (count forms)
+        args    (take arity (repeatedly #(utils/gen-id)))]
     #::sg{:id        (utils/gen-id)
           :name      key
           :category  "V"
           :concepts  (cons
-                       {:id       concept
-                        :type     :operation
-                        :name     "mkV"
-                        :label    (utils/get-operation-label module "mkV" (take arity (repeat "Str")) "V")
-                        :category "V"
-                        :module   module}
-                       (map (fn [arg {form ::dict-item-form/value}]
-                              {:id       arg
-                               :type     :quote
-                               :value    form
-                               :category "Str"})
-                            args
-                            forms))
+                      {:id       concept
+                       :type     :operation
+                       :name     "mkV"
+                       :label    (utils/get-operation-label module "mkV" (take arity (repeat "Str")) "V")
+                       :category "V"
+                       :module   module}
+                      (map (fn [arg {form ::dict-item-form/value}]
+                             {:id       arg
+                              :type     :quote
+                              :value    form
+                              :category "Str"})
+                           args
+                           forms))
           :relations (map-indexed (fn [i arg]
                                     {:from     concept
                                      :to       arg
@@ -730,9 +730,9 @@
                                   args)}))
 
 (defmethod resolve-dict-item "V2" [{::dict-item/keys [attributes] :as dict-item}]
-  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+  (let [child   (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
         concept (utils/gen-id)
-        arg (utils/gen-id)]
+        arg     (utils/gen-id)]
     (-> child
         (assoc ::sg/category "V2")
         (update ::sg/concepts concat [{:id       concept
@@ -759,21 +759,21 @@
                                         :name     "Str"}]))))
 
 (defmethod resolve-dict-item "V3" [{::dict-item/keys [attributes] :as dict-item}]
-  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
-        concept (utils/gen-id)
-        prep-concept (utils/gen-id)
-        post-concept (utils/gen-id)
-        prep-arg (utils/gen-id)
-        post-arg (utils/gen-id)
+  (let [child          (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+        concept        (utils/gen-id)
+        prep-concept   (utils/gen-id)
+        post-concept   (utils/gen-id)
+        prep-arg       (utils/gen-id)
+        post-arg       (utils/gen-id)
         prep-attribute (get attributes "Prep" "to")
         post-attribute (get attributes "Post")
-        arity (cond-> 1
-                      (some? prep-attribute) (inc)
-                      (and (some? prep-attribute) (some? post-attribute)) (inc))
-        arg-types (case arity
-                    1 ["V"]
-                    2 ["V" "Prep"]
-                    3 ["V" "Prep" "Prep"])]
+        arity          (cond-> 1
+                         (some? prep-attribute) (inc)
+                         (and (some? prep-attribute) (some? post-attribute)) (inc))
+        arg-types      (case arity
+                         1 ["V"]
+                         2 ["V" "Prep"]
+                         3 ["V" "Prep" "Prep"])]
     (-> child
         (assoc ::sg/category "V3")
         (update ::sg/concepts concat
@@ -840,7 +840,7 @@
                     :name     "Str"}])))))
 
 (defmethod resolve-dict-item "VA" [dict-item]
-  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+  (let [child   (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
         concept (utils/gen-id)]
     (-> child
         (assoc ::sg/category "VA")
@@ -858,21 +858,21 @@
                                         :name     "V"}]))))
 
 (defmethod resolve-dict-item "V2A" [{::dict-item/keys [attributes] :as dict-item}]
-  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
-        concept (utils/gen-id)
-        prep-concept (utils/gen-id)
-        post-concept (utils/gen-id)
-        prep-arg (utils/gen-id)
-        post-arg (utils/gen-id)
+  (let [child          (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+        concept        (utils/gen-id)
+        prep-concept   (utils/gen-id)
+        post-concept   (utils/gen-id)
+        prep-arg       (utils/gen-id)
+        post-arg       (utils/gen-id)
         prep-attribute (get attributes "Prep")
         post-attribute (get attributes "Post")
-        arity (cond-> 1
-                      (some? prep-attribute) (inc)
-                      (and (some? prep-attribute) (some? post-attribute)) (inc))
-        arg-types (case arity
-                    1 ["V"]
-                    2 ["V" "Prep"]
-                    3 ["V" "Prep" "Prep"])]
+        arity          (cond-> 1
+                         (some? prep-attribute) (inc)
+                         (and (some? prep-attribute) (some? post-attribute)) (inc))
+        arg-types      (case arity
+                         1 ["V"]
+                         2 ["V" "Prep"]
+                         3 ["V" "Prep" "Prep"])]
     (-> child
         (assoc ::sg/category "V2A")
         (update ::sg/concepts concat
@@ -939,7 +939,7 @@
                     :name     "Str"}])))))
 
 (defmethod resolve-dict-item "VQ" [dict-item]
-  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+  (let [child   (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
         concept (utils/gen-id)]
     (-> child
         (assoc ::sg/category "VQ")
@@ -957,10 +957,10 @@
                                         :name     "V"}]))))
 
 (defmethod resolve-dict-item "V2Q" [{::dict-item/keys [attributes] :as dict-item}]
-  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
-        concept (utils/gen-id)
-        prep-concept (utils/gen-id)
-        prep-arg (utils/gen-id)
+  (let [child          (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+        concept        (utils/gen-id)
+        prep-concept   (utils/gen-id)
+        prep-arg       (utils/gen-id)
         prep-attribute (get attributes "Prep" "as")]
     (-> child
         (assoc ::sg/category "V2Q")
@@ -1002,7 +1002,7 @@
                   :name     "Str"}]))))
 
 (defmethod resolve-dict-item "VS" [dict-item]
-  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+  (let [child   (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
         concept (utils/gen-id)]
     (-> child
         (assoc ::sg/category "VS")
@@ -1020,10 +1020,10 @@
                                         :name     "V"}]))))
 
 (defmethod resolve-dict-item "V2S" [{::dict-item/keys [attributes] :as dict-item}]
-  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
-        concept (utils/gen-id)
-        prep-concept (utils/gen-id)
-        prep-arg (utils/gen-id)
+  (let [child          (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+        concept        (utils/gen-id)
+        prep-concept   (utils/gen-id)
+        prep-arg       (utils/gen-id)
         prep-attribute (get attributes "Prep" "to")]
     (-> child
         (assoc ::sg/category "V2S")
@@ -1065,7 +1065,7 @@
                   :name     "Str"}]))))
 
 (defmethod resolve-dict-item "VV" [dict-item]
-  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+  (let [child   (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
         concept (utils/gen-id)]
     (-> child
         (assoc ::sg/category "VV")
@@ -1083,18 +1083,18 @@
                                         :name     "V"}]))))
 
 (defmethod resolve-dict-item "V2V" [{::dict-item/keys [attributes] :as dict-item}]
-  (let [child (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
-        concept (utils/gen-id)
-        prep-concept (utils/gen-id)
-        post-concept (utils/gen-id)
-        prep-arg (utils/gen-id)
-        post-arg (utils/gen-id)
+  (let [child          (resolve-dict-item (assoc dict-item ::dict-item/category "V"))
+        concept        (utils/gen-id)
+        prep-concept   (utils/gen-id)
+        post-concept   (utils/gen-id)
+        prep-arg       (utils/gen-id)
+        post-arg       (utils/gen-id)
         prep-attribute (get attributes "Prep" "")
         post-attribute (get attributes "Post" "to")
-        arity (cond-> 1 (and (some? prep-attribute) (some? post-attribute)) (+ 2))
-        arg-types (case arity
-                    1 ["V"]
-                    3 ["V" "Prep" "Prep"])]
+        arity          (cond-> 1 (and (some? prep-attribute) (some? post-attribute)) (+ 2))
+        arg-types      (case arity
+                         1 ["V"]
+                         3 ["V" "Prep" "Prep"])]
     (-> child
         (assoc ::sg/category "V2V")
         (update ::sg/concepts concat
diff --git a/core/src/acc_text/nlg/generator.clj b/core/src/acc_text/nlg/generator.clj
index 128c2b7ae..416167c97 100644
--- a/core/src/acc_text/nlg/generator.clj
+++ b/core/src/acc_text/nlg/generator.clj
@@ -14,17 +14,17 @@
   (format "abstract %s = {%s\n}"
           module
           (join-body
-            "flags" (map (fn [[flag val]]
-                           (format "%s = %s" (name flag) val))
-                         flags)
-            "cat" cat
-            "fun" (map (fn [index c]
-                         (let [funs (get fun c)]
-                           (if (seq funs)
-                             (format "Function%02d : %s -> %s" index (str/join " -> " (get fun c)) c)
-                             (format "Function%02d : %s" index c))))
-                       (rest (range))
-                       cat))))
+           "flags" (map (fn [[flag val]]
+                          (format "%s = %s" (name flag) val))
+                        flags)
+           "cat" cat
+           "fun" (map (fn [index c]
+                        (let [funs (get fun c)]
+                          (if (seq funs)
+                            (format "Function%02d : %s -> %s" index (str/join " -> " (get fun c)) c)
+                            (format "Function%02d : %s" index c))))
+                      (rest (range))
+                      cat))))
 
 (defn ->incomplete [lang {::grammar/keys [module cat fun lincat lin]}]
   (format "incomplete concrete %sBody of %s = open Syntax, Grammar, %sLex, Morpho%s, Res%s, Paradigms%s in {%s\n}"
@@ -35,29 +35,29 @@
           lang
           lang
           (join-body
-            "lincat" (->> lincat
-                          (reduce-kv (fn [m c type]
-                                       (update m type #(conj % c)))
-                                     {})
-                          (map (fn [[type cs]]
-                                 (format "%s = %s" (str/join ", " cs) type))))
-            "lin" (map (fn [index c]
-                         (let [funs (get fun c)
-                               body (remove str/blank? (get lin c))
-                               l (str/join " | " (cond-> body (empty? body) (conj "\"\"")))]
-                           (if (seq funs)
-                             (format "Function%02d %s = %s" index (str/join " " funs) l)
-                             (format "Function%02d = %s" index l))))
-                       (rest (range))
-                       cat))))
+           "lincat" (->> lincat
+                         (reduce-kv (fn [m c type]
+                                      (update m type #(conj % c)))
+                                    {})
+                         (map (fn [[type cs]]
+                                (format "%s = %s" (str/join ", " cs) type))))
+           "lin" (map (fn [index c]
+                        (let [funs (get fun c)
+                              body (remove str/blank? (get lin c))
+                              l    (str/join " | " (cond-> body (empty? body) (conj "\"\"")))]
+                          (if (seq funs)
+                            (format "Function%02d %s = %s" index (str/join " " funs) l)
+                            (format "Function%02d = %s" index l))))
+                      (rest (range))
+                      cat))))
 
 (defn ->interface [{::grammar/keys [module oper]}]
   (format "interface %sLex = {%s\n}"
           module
           (join-body
-            "oper" (map (fn [[c type _]]
-                          (format "%s : %s" c type))
-                        oper))))
+           "oper" (map (fn [[c type _]]
+                         (format "%s : %s" c type))
+                       oper))))
 
 (defn ->resource [lang {::grammar/keys [module oper]}]
   (format "resource %sLex%s = open Syntax%s, Grammar%s, Paradigms%s, Res%s, Morpho%s in {%s\n}"
@@ -69,9 +69,9 @@
           lang
           (if (= lang "Lav") "Eng" lang)
           (join-body
-            "oper" (map (fn [[c type body]]
-                          (format "%s : %s = %s" c type body))
-                        oper))))
+           "oper" (map (fn [[c type body]]
+                         (format "%s : %s = %s" c type body))
+                       oper))))
 
 (defn ->concrete [lang {::grammar/keys [instance module]}]
   (format "concrete %s%s of %s = %sBody with \n  (Syntax=Syntax%s),\n  (Grammar=Grammar%s),\n  (%sLex=%sLex%s);"
@@ -93,5 +93,5 @@
    (str module instance)   (->concrete lang grammar)})
 
 (s/fdef generate
-        :args (s/cat :grammar ::grammar/grammar :language string?)
-        :ret map?)
+  :args (s/cat :grammar ::grammar/grammar :language string?)
+  :ret map?)
diff --git a/core/src/acc_text/nlg/gf/operations.clj b/core/src/acc_text/nlg/gf/operations.clj
index 10b65a677..fce583988 100644
--- a/core/src/acc_text/nlg/gf/operations.clj
+++ b/core/src/acc_text/nlg/gf/operations.clj
@@ -18,7 +18,7 @@
                  (let [{:keys [module functions]} (utils/read-edn f)]
                    (for [{:keys [function label type example]} functions]
                      {:id       (cond->> (str function "/" (str/join "->" type))
-                                         (some? module) (str module "."))
+                                  (some? module) (str module "."))
                       :type     :operation
                       :name     function
                       :label    (or label function)
@@ -31,18 +31,18 @@
 
 (def structural-words (filter (fn [{:keys [category args]}]
                                 (and
-                                  (empty? args)
-                                  (not (contains? #{"Tense" "Punct" "Pol"
-                                                    "Num" "ImpForm" "Ant"}
-                                                  category))))
+                                 (empty? args)
+                                 (not (contains? #{"Tense" "Punct" "Pol"
+                                                   "Num" "ImpForm" "Ant"}
+                                                 category))))
                               operations))
 
 (def grammar (filter (fn [{:keys [category args]}]
                        (and
-                         (empty? args)
-                         (contains? #{"Tense" "Punct" "Pol"
-                                      "Num" "ImpForm" "Ant"}
-                                    category)))
+                        (empty? args)
+                        (contains? #{"Tense" "Punct" "Pol"
+                                     "Num" "ImpForm" "Ant"}
+                                   category)))
                      operations))
 
 (def syntax (filter (fn [{:keys [module]}]
diff --git a/core/src/acc_text/nlg/gf/results.clj b/core/src/acc_text/nlg/gf/results.clj
index 6b65619fa..95aa5637e 100644
--- a/core/src/acc_text/nlg/gf/results.clj
+++ b/core/src/acc_text/nlg/gf/results.clj
@@ -11,29 +11,29 @@
 (defn make-concept [{:keys [cat text]} lincat]
   (if (some? cat)
     (cond-> (get-attrs cat)
-            (contains? lincat cat) (assoc :category (get lincat cat)))
+      (contains? lincat cat) (assoc :category (get lincat cat)))
     {:type     :quote
      :value    text
      :category "Str"}))
 
 (defn make-zipper [t]
   (zip/zipper
-    map?
-    (fn [node]
-      (:children node))
-    (fn [node children]
-      (assoc node :children children))
-    t))
+   map?
+   (fn [node]
+     (:children node))
+   (fn [node children]
+     (assoc node :children children))
+   t))
 
 (defn get-concepts [tree lincat]
   (->> (make-zipper tree)
        (iterate zip/next)
        (take-while #(not (zip/end? %)))
        (map (comp
-              #(make-concept (cond->> %
-                                      (string? %) (hash-map :text))
-                             lincat)
-              zip/node))))
+             #(make-concept (cond->> %
+                              (string? %) (hash-map :text))
+                            lincat)
+             zip/node))))
 
 (defn emend [text]
   (->> (str/split text #"\s*¶+\s*")
diff --git a/core/src/acc_text/nlg/gf/service.clj b/core/src/acc_text/nlg/gf/service.clj
index 83c6654cc..2f55d2838 100644
--- a/core/src/acc_text/nlg/gf/service.clj
+++ b/core/src/acc_text/nlg/gf/service.clj
@@ -23,7 +23,7 @@
 
 (defn ping []
   (let [service-host (or (System/getenv "GF_ENDPOINT") "http://localhost:8001")
-        request-url (str service-host "/health")
+        request-url  (str service-host "/health")
         {request-error :error} @(client/request {:url request-url :method :get})]
     (when (some? request-error)
       (log/tracef "GF service host: %s is unreachable. Are you sure it is started and reachable?" service-host))
@@ -31,8 +31,8 @@
 
 (defn request
   [{::grammar/keys [module instance lincat] :as grammar} lang]
-  (let [payload (generator/generate grammar (check-language lang))
-        request-url (or (System/getenv "GF_ENDPOINT") "http://localhost:8001")
+  (let [payload         (generator/generate grammar (check-language lang))
+        request-url     (or (System/getenv "GF_ENDPOINT") "http://localhost:8001")
         request-content {:module module :instance instance :content payload}]
     (log/debugf "Compiling grammar via %s" request-url)
     (log/debugf "** Abstract **\n%s\n" (get payload module))
@@ -49,6 +49,6 @@
                             :body    (json/write-value-as-string request-content write-mapper)})
           {[[_ results]] :results error :error} (json/read-value body read-mapper)]
       (cond
-       (some? request-error) (throw request-error)
-       (some? error) (throw (Exception. ^String error))
-       :else (map #(post-process lang lincat %) (distinct results))))))
+        (some? request-error) (throw request-error)
+        (some? error) (throw (Exception. ^String error))
+        :else (map #(post-process lang lincat %) (distinct results))))))
diff --git a/core/src/acc_text/nlg/gf/utils.clj b/core/src/acc_text/nlg/gf/utils.clj
index 8603e8bae..2bf3ced80 100644
--- a/core/src/acc_text/nlg/gf/utils.clj
+++ b/core/src/acc_text/nlg/gf/utils.clj
@@ -63,17 +63,17 @@
 (defn- find-single-arity-functions [fns]
   (reduce (fn [acc {:keys [module functions]}]
             (concat acc (sequence
-                          (comp
-                            (map #(set/rename-keys % {:type :params}))
-                            (map #(assoc % :type (last (:params %))))
-                            (map #(assoc % :position (find-position (:params %))))
-                            (map #(update % :params (comp remove-optional-params butlast)))
-                            (remove #(not= 1 (count (:params %))))
-                            (map #(set/rename-keys % {:params :from}))
-                            (map #(update % :from first))
-                            (map #(assoc % :module module))
-                            (map #(select-keys % [:function :type :position :from :module])))
-                          functions)))
+                         (comp
+                          (map #(set/rename-keys % {:type :params}))
+                          (map #(assoc % :type (last (:params %))))
+                          (map #(assoc % :position (find-position (:params %))))
+                          (map #(update % :params (comp remove-optional-params butlast)))
+                          (remove #(not= 1 (count (:params %))))
+                          (map #(set/rename-keys % {:params :from}))
+                          (map #(update % :from first))
+                          (map #(assoc % :module module))
+                          (map #(select-keys % [:function :type :position :from :module])))
+                         functions)))
           []
           fns))
 
@@ -89,22 +89,22 @@
              (group-by :function fns)))
 
 (defn make-transformation-graph [& paths]
-  (let [fns (-> (apply read-rgl-functions paths) (find-single-arity-functions) (apply-function-filter) (group-single-arity-function-params))
+  (let [fns       (-> (apply read-rgl-functions paths) (find-single-arity-functions) (apply-function-filter) (group-single-arity-function-params))
         type->fns (group-by :type fns)]
     (apply uber/digraph (->> fns
                              (mapcat (fn [{:keys [function type from module position]}]
                                        (cons
-                                         [^:node function {:module module :type type :position position}]
-                                         (cons
-                                           [^:edge function type]
-                                           (->> (for [type from
-                                                      {from-function :function from-type :type} (cons {:type type}
-                                                                                                      (type->fns type))]
-                                                  [^:edge (or from-function from-type) function])
-                                                (filter #(not= (first %) (second %))))))))
+                                        [^:node function {:module module :type type :position position}]
+                                        (cons
+                                         [^:edge function type]
+                                         (->> (for [type from
+                                                    {from-function :function from-type :type} (cons {:type type}
+                                                                                                    (type->fns type))]
+                                                [^:edge (or from-function from-type) function])
+                                              (filter #(not= (first %) (second %))))))))
                              (concat (into #{} (concat
-                                                 (map :type fns)
-                                                 (mapcat :from fns))))))))
+                                                (map :type fns)
+                                                (mapcat :from fns))))))))
 (def op-map
   {"N"   #{"mkN" "mkN2" "mkN3" "mkCN" "mkPN"}
    "V"   #{"mkV" "mkV2" "mkV2A" "mkV3" "mkVA" "mkVQ" "mkVS" "mkVV"}
@@ -126,9 +126,9 @@
               "Str" #{"mkCN" "mkN"}
               #{}))
           (evaluate-path [src dest path]
-            (let [ops (get op-map (or (normalize-op src) (normalize-op dest)))
-                  required-ops (get-required-ops src)
-                  desired-ops (set/union #{"mkUtt"} ops)
+            (let [ops           (get op-map (or (normalize-op src) (normalize-op dest)))
+                  required-ops  (get-required-ops src)
+                  desired-ops   (set/union #{"mkUtt"} ops)
                   undesired-ops (set/union #{"mkImp" "mkQS" "mkQCl" "mkPost" "mkVPSlash"}
                                            (set/difference (apply set/union (vals op-map)) ops))]
               [(if (set/subset? required-ops (set path)) 0 1)
@@ -170,10 +170,10 @@
          (group-by #(vector (first %) (last %)))
          (reduce-kv (fn [m [src dest] paths]
                       (cond-> m
-                              (and
-                                (not= [src dest] ["Str" "Utt"])
-                                (not= src dest)) (assoc [src dest] (first (map (comp path->sg rest butlast)
-                                                                               (sort-by #(evaluate-path src dest %) paths))))))
+                        (and
+                         (not= [src dest] ["Str" "Utt"])
+                         (not= src dest)) (assoc [src dest] (first (map (comp path->sg rest butlast)
+                                                                        (sort-by #(evaluate-path src dest %) paths))))))
                     {}))))
 
 (defn save-graph [g output-path]
@@ -197,10 +197,10 @@
        (apply read-rgl-functions)
        (mapcat (fn [{:keys [module functions]}] (map #(assoc % :module module) functions)))
        (filter (fn [{:keys [type function]}] (and
-                                               (= 3 (count (filter #(re-matches #"\p{L}+" %) type)))
-                                               (re-matches #"^mk.+" function)
-                                               (not (re-matches #"^mkList.+" function))
-                                               (not= "Str" (first type) (second type)))))
+                                              (= 3 (count (filter #(re-matches #"\p{L}+" %) type)))
+                                              (re-matches #"^mk.+" function)
+                                              (not (re-matches #"^mkList.+" function))
+                                              (not= "Str" (first type) (second type)))))
        (map (fn [{:keys [function type module]}]
               (let [[x y z] (filter #(re-matches #"\p{L}+" %) type)]
                 {[x y] (list {:type :operation :name function :category z :module module})})))
diff --git a/core/src/acc_text/nlg/grammar.clj b/core/src/acc_text/nlg/grammar.clj
index 73c7a8ab7..7895ee40d 100644
--- a/core/src/acc_text/nlg/grammar.clj
+++ b/core/src/acc_text/nlg/grammar.clj
@@ -25,5 +25,5 @@
   (impl/build-grammar semantic-graph context))
 
 (s/fdef build-grammar
-        :args (s/cat :semantic-graph ::sg/graph :context map?)
-        :ret ::grammar)
+  :args (s/cat :semantic-graph ::sg/graph :context map?)
+  :ret ::grammar)
diff --git a/core/src/acc_text/nlg/grammar/impl.clj b/core/src/acc_text/nlg/grammar/impl.clj
index 5628d2d01..7541bc752 100644
--- a/core/src/acc_text/nlg/grammar/impl.clj
+++ b/core/src/acc_text/nlg/grammar/impl.clj
@@ -25,7 +25,7 @@
   (-> label
       (str/replace #"-" "_")
       (cond-> (not (re-find (re-pattern (format "_%s$" category)) label))
-              (str "_" category))))
+        (str "_" category))))
 
 (defn node->cat [graph node-id]
   (let [{:keys [type position] :as attrs} (attrs graph node-id)]
@@ -37,8 +37,8 @@
 (defn s-node? [graph node-id]
   (let [category (:category (attrs graph node-id))]
     (and
-      (some? category)
-      (not= category "Str"))))
+     (some? category)
+     (not= category "Str"))))
 
 (defn remove-data-types [graph node-ids]
   (remove #(contains? data-types (:type (attrs graph %))) node-ids))
@@ -47,92 +47,92 @@
 
 (defmethod build-node :default [graph node-id]
   (let [successors (get-successors graph node-id)
-        category (get (attrs graph node-id) :category "Str")
-        cat (node->cat graph node-id)]
+        category   (get (attrs graph node-id) :category "Str")
+        cat        (node->cat graph node-id)]
     #:acc-text.nlg.grammar
-        {:cat    [cat]
-         :fun    {cat (->> successors (remove-data-types graph) (map #(node->cat graph %)))}
-         :lincat {cat category}
-         :lin    {cat [(str/join " ++ " (map #(cond-> (node->cat graph %)
-                                                      (and
-                                                        (= category "Str")
-                                                        (s-node? graph %)) (str ".s"))
-                                             successors))]}}))
+     {:cat    [cat]
+      :fun    {cat (->> successors (remove-data-types graph) (map #(node->cat graph %)))}
+      :lincat {cat category}
+      :lin    {cat [(str/join " ++ " (map #(cond-> (node->cat graph %)
+                                             (and
+                                              (= category "Str")
+                                              (s-node? graph %)) (str ".s"))
+                                          successors))]}}))
 
 (defmethod build-node :amr [graph node-id]
   (let [successors (get-successors graph node-id)
-        category (get (attrs graph node-id) :category "Str")
-        cat (node->cat graph node-id)]
+        category   (get (attrs graph node-id) :category "Str")
+        cat        (node->cat graph node-id)]
     #:acc-text.nlg.grammar
-        {:cat    [cat]
-         :fun    {cat (->> successors (remove-data-types graph) (map #(node->cat graph %)))}
-         :lincat {cat category}
-         :lin    {cat [(str/join " | " (map #(cond-> (node->cat graph %)
-                                                     (and
-                                                       (= category "Str")
-                                                       (s-node? graph %)) (str ".s"))
-                                            successors))]}}))
+     {:cat    [cat]
+      :fun    {cat (->> successors (remove-data-types graph) (map #(node->cat graph %)))}
+      :lincat {cat category}
+      :lin    {cat [(str/join " | " (map #(cond-> (node->cat graph %)
+                                            (and
+                                             (= category "Str")
+                                             (s-node? graph %)) (str ".s"))
+                                         successors))]}}))
 
 (defmethod build-node :operation [graph node-id]
   (let [{:keys [name module]} (attrs graph node-id)
         successors (get-successors graph node-id)
-        cat (node->cat graph node-id)]
+        cat        (node->cat graph node-id)]
     #:acc-text.nlg.grammar
-        {:cat    [cat]
-         :fun    {cat (->> successors (remove-data-types graph) (map #(node->cat graph %)))}
-         :lincat {cat (or (:category (attrs graph node-id)) "Text")}
-         :lin    {cat [(cond-> (str module "." name)
-                               (seq successors) (str " " (str/join " " (map #(node->cat graph %) successors))))]}}))
+     {:cat    [cat]
+      :fun    {cat (->> successors (remove-data-types graph) (map #(node->cat graph %)))}
+      :lincat {cat (or (:category (attrs graph node-id)) "Text")}
+      :lin    {cat [(cond-> (str module "." name)
+                      (seq successors) (str " " (str/join " " (map #(node->cat graph %) successors))))]}}))
 
 (defmethod build-node :quote [graph node-id]
   (let [{:keys [value]} (attrs graph node-id)
         cat (node->cat graph node-id)]
     #:acc-text.nlg.grammar
-        {:oper [[cat "Str" (format "\"%s\"" (str/replace value #"\"" "\\\\\""))]]}))
+     {:oper [[cat "Str" (format "\"%s\"" (str/replace value #"\"" "\\\\\""))]]}))
 
 (defmethod build-node :dictionary-item [_ _]
   #:acc-text.nlg.grammar{})
 
 (defmethod build-node :synonyms [graph node-id]
   (let [successors (get-successors graph node-id)
-        category (:category (attrs graph node-id))
-        cat (node->cat graph node-id)]
+        category   (:category (attrs graph node-id))
+        cat        (node->cat graph node-id)]
     #:acc-text.nlg.grammar
-        {:cat    [cat]
-         :fun    {cat (->> successors (remove-data-types graph) (map #(node->cat graph %)))}
-         :lincat {cat (or category "Str")}
-         :lin    {cat (map #(cond-> (node->cat graph %)
-                                    (and (s-node? graph %) (nil? category)) (str ".s"))
-                           successors)}}))
+     {:cat    [cat]
+      :fun    {cat (->> successors (remove-data-types graph) (map #(node->cat graph %)))}
+      :lincat {cat (or category "Str")}
+      :lin    {cat (map #(cond-> (node->cat graph %)
+                           (and (s-node? graph %) (nil? category)) (str ".s"))
+                        successors)}}))
 
 (defmethod build-node :reference [graph node-id]
   (let [successors (get-successors graph node-id)
-        category (:category (attrs graph node-id))
-        cat (node->cat graph node-id)]
+        category   (:category (attrs graph node-id))
+        cat        (node->cat graph node-id)]
     #:acc-text.nlg.grammar
-        {:cat    [cat]
-         :fun    {cat (->> successors (remove-data-types graph) (map #(node->cat graph %)))}
-         :lincat {cat (or category "Str")}
-         :lin    {cat (map #(cond-> (node->cat graph %)
-                                    (and (s-node? graph %) (nil? category)) (str ".s"))
-                           successors)}}))
+     {:cat    [cat]
+      :fun    {cat (->> successors (remove-data-types graph) (map #(node->cat graph %)))}
+      :lincat {cat (or category "Str")}
+      :lin    {cat (map #(cond-> (node->cat graph %)
+                           (and (s-node? graph %) (nil? category)) (str ".s"))
+                        successors)}}))
 
 (defmethod build-node :shuffle [graph node-id]
   (let [successors (get-successors graph node-id)
-        category (:category (attrs graph node-id))
-        cat (node->cat graph node-id)]
+        category   (:category (attrs graph node-id))
+        cat        (node->cat graph node-id)]
     #:acc-text.nlg.grammar
-        {:cat    [cat]
-         :fun    {cat (->> successors (remove-data-types graph) (map #(node->cat graph %)))}
-         :lincat {cat (or category "Str")}
-         :lin    {cat [(str/join " | " (->> (permutations successors)
-                                            (remove empty?)
-                                            (map (fn [group]
-                                                   (->> (map #(cond-> (node->cat graph %)
-                                                                      (and (s-node? graph %) (nil? category)) (str ".s"))
-                                                             group)
-                                                        (str/join " ++ ")
-                                                        (format "(%s)"))))))]}}))
+     {:cat    [cat]
+      :fun    {cat (->> successors (remove-data-types graph) (map #(node->cat graph %)))}
+      :lincat {cat (or category "Str")}
+      :lin    {cat [(str/join " | " (->> (permutations successors)
+                                         (remove empty?)
+                                         (map (fn [group]
+                                                (->> (map #(cond-> (node->cat graph %)
+                                                             (and (s-node? graph %) (nil? category)) (str ".s"))
+                                                          group)
+                                                     (str/join " ++ ")
+                                                     (format "(%s)"))))))]}}))
 
 (defn ->graph [semantic-graph context]
   (-> semantic-graph
@@ -165,7 +165,7 @@
   ([semantic-graph context]
    (build-grammar "Default" "Instance" semantic-graph context))
   ([module instance semantic-graph context]
-   (let [graph (->graph semantic-graph context)
+   (let [graph    (->graph semantic-graph context)
          start-id (find-root-id graph)]
      (reduce (fn [grammar node-id]
                (merge-with (fn [acc val]
@@ -176,12 +176,12 @@
                            grammar
                            (build-node graph node-id)))
              #:acc-text.nlg.grammar
-                 {:module   module
-                  :instance instance
-                  :flags    {:startcat (node->cat graph start-id)}
-                  :cat      []
-                  :fun      {}
-                  :lincat   {}
-                  :lin      {}
-                  :oper     (build-dictionary-operations context)}
+              {:module   module
+               :instance instance
+               :flags    {:startcat (node->cat graph start-id)}
+               :cat      []
+               :fun      {}
+               :lincat   {}
+               :lin      {}
+               :oper     (build-dictionary-operations context)}
              (pre-traverse graph start-id)))))
diff --git a/core/src/acc_text/nlg/graph/amr.clj b/core/src/acc_text/nlg/graph/amr.clj
index f88a95711..fbca76d58 100644
--- a/core/src/acc_text/nlg/graph/amr.clj
+++ b/core/src/acc_text/nlg/graph/amr.clj
@@ -43,8 +43,8 @@
                g)))
 
 (defn build-amr [[node {amr-name :name} amr-args] context]
-  (let [amr (semantic-graph->ubergraph (get-in context [:amr amr-name]))
-        amr-root (find-root-id amr)
+  (let [amr        (semantic-graph->ubergraph (get-in context [:amr amr-name]))
+        amr-root   (find-root-id amr)
         references (filter (fn [[_ {reference-name :name}]]
                              (contains? amr-args reference-name))
                            (find-nodes amr {:type :reference}))]
@@ -52,32 +52,32 @@
         (substitute-operations (get-amrs-with-args amr))
         (assoc-in [:attrs amr-root :type] :amr-plan)
         (add-edges (cons
-                     [^:edge node amr-root {:role :pointer}]
-                     (for [[reference-id {reference-name :name}] references
-                           {src :src :as in-edge} (graph/in-edges amr reference-id)
-                           {dest :dest} (get amr-args reference-name)]
-                       [^:edge src dest (attrs amr in-edge)])))
+                    [^:edge node amr-root {:role :pointer}]
+                    (for [[reference-id {reference-name :name}] references
+                          {src :src :as in-edge} (graph/in-edges amr reference-id)
+                          {dest :dest} (get amr-args reference-name)]
+                      [^:edge src dest (attrs amr in-edge)])))
         (remove-nodes (map first references)))))
 
 (defn build-operation-graph [g context]
   (let [amrs-with-args (get-amrs-with-args g)]
     (cons
+     (-> g
+         (substitute-operations amrs-with-args)
+         (remove-redundant-edges context amrs-with-args))
+     (->> amrs-with-args
+          (filter (fn [[_ {amr-name :name} _]] (contains? (:amr context) amr-name)))
+          (map #(build-amr % context))))))
+
+(defn attach-amrs [g context]
+  (let [amrs-with-args (get-amrs-with-args g)]
+    (finalize-amr-nodes
+     (apply
+      uber/multidigraph
       (-> g
           (substitute-operations amrs-with-args)
           (remove-redundant-edges context amrs-with-args))
       (->> amrs-with-args
            (filter (fn [[_ {amr-name :name} _]] (contains? (:amr context) amr-name)))
-           (map #(build-amr % context))))))
-
-(defn attach-amrs [g context]
-  (let [amrs-with-args (get-amrs-with-args g)]
-    (finalize-amr-nodes
-      (apply
-        uber/multidigraph
-        (-> g
-            (substitute-operations amrs-with-args)
-            (remove-redundant-edges context amrs-with-args))
-        (->> amrs-with-args
-             (filter (fn [[_ {amr-name :name} _]] (contains? (:amr context) amr-name)))
-             (map (comp #(build-operation-graph % context) #(build-amr % context)))
-             (apply concat))))))
+           (map (comp #(build-operation-graph % context) #(build-amr % context)))
+           (apply concat))))))
diff --git a/core/src/acc_text/nlg/graph/categories.clj b/core/src/acc_text/nlg/graph/categories.clj
index cebd62670..05fe631f0 100644
--- a/core/src/acc_text/nlg/graph/categories.clj
+++ b/core/src/acc_text/nlg/graph/categories.clj
@@ -8,8 +8,8 @@
   (reduce (fn [g node-or-edge-id]
             (let [{current-category :category type :type} (get-in g [:attrs node-or-edge-id])]
               (cond-> g
-                      (and (nil? current-category) (not (contains? #{:quote :data :dictionary-item} type)))
-                      (assoc-in [:attrs node-or-edge-id :category] category))))
+                (and (nil? current-category) (not (contains? #{:quote :data :dictionary-item} type)))
+                (assoc-in [:attrs node-or-edge-id :category] category))))
           g
           (cons node-id (map :id (graph/out-edges g node-id)))))
 
diff --git a/core/src/acc_text/nlg/graph/condition.clj b/core/src/acc_text/nlg/graph/condition.clj
index 2d33f37c4..3278c2584 100644
--- a/core/src/acc_text/nlg/graph/condition.clj
+++ b/core/src/acc_text/nlg/graph/condition.clj
@@ -34,16 +34,16 @@
 (defn normalize [xs]
   (letfn [(extract-number [s] (re-find #"[-\d.]+" s))]
     (sequence
-      (comp
-        (map #(cond-> % (string? %) (str/trim)))
-        (map #(cond-> % (string? %) (-> (extract-number) (or %))))
-        (map #(cond-> % (try
-                          (bigdec %)
-                          (catch Exception _)) (bigdec))))
-      xs)))
+     (comp
+      (map #(cond-> % (string? %) (str/trim)))
+      (map #(cond-> % (string? %) (-> (extract-number) (or %))))
+      (map #(cond-> % (try
+                        (bigdec %)
+                        (catch Exception _)) (bigdec))))
+     xs)))
 
 (defn comparison [operator args]
-  (let [operator-fn (operator->fn operator)
+  (let [operator-fn     (operator->fn operator)
         normalized-args (normalize args)]
     (when (and (< 1 (count args)) (or (contains? #{"=" "==" "!=" "in"} operator)
                                       (and (contains? #{"<" "<=" ">" ">="} operator)
@@ -55,7 +55,7 @@
 (defmethod evaluate-predicate :default [_ _ _] true)
 
 (defmethod evaluate-predicate :comparator [g node-id {:keys [data constants]}]
-  (let [operator (:value (attrs g node-id))
+  (let [operator   (:value (attrs g node-id))
         successors (get-successors g node-id)]
     (when (every? #(contains? #{:data :quote :constant} (:type (attrs g %))) successors)
       (comparison operator (for [{:keys [type value name]} (map #(attrs g %) successors)]
@@ -66,7 +66,7 @@
 
 (defmethod evaluate-predicate :boolean [g node-id context]
   (let [operator-fn (operator->fn (:value (attrs g node-id)))
-        successors (get-successors g node-id)]
+        successors  (get-successors g node-id)]
     (when (every? #(contains? #{:boolean :comparator :data :quote} (:type (attrs g %))) successors)
       (operator-fn (map #(evaluate-predicate g % context) successors)))))
 
@@ -93,12 +93,12 @@
 
 (defn determine-conditions [g context]
   (reduce (fn [g [node-id _]]
-            (let [in-edges (graph/in-edges g node-id)
+            (let [in-edges       (graph/in-edges g node-id)
                   truthful-edges (find-truthful-edges g node-id context)]
               (cond-> (remove-edges g in-edges)
-                      (some? truthful-edges) (add-edges
-                                               (for [in-edge in-edges
-                                                     out-edge truthful-edges]
-                                                 [^:edge (graph/src in-edge) (graph/dest out-edge) (attrs g in-edge)])))))
+                (some? truthful-edges) (add-edges
+                                        (for [in-edge  in-edges
+                                              out-edge truthful-edges]
+                                          [^:edge (graph/src in-edge) (graph/dest out-edge) (attrs g in-edge)])))))
           g
           (find-nodes g {:type :condition})))
diff --git a/core/src/acc_text/nlg/graph/data.clj b/core/src/acc_text/nlg/graph/data.clj
index dbdd1b4e1..ebf1451c4 100644
--- a/core/src/acc_text/nlg/graph/data.clj
+++ b/core/src/acc_text/nlg/graph/data.clj
@@ -9,10 +9,10 @@
 
 (defn find-data-category [g node-id]
   (let [edge-attrs (->> node-id (get-in-edge g) (attrs g))
-        category (get edge-attrs :category
-                      ;; in case the category is not supplied,
-                      ;; make it 'A' if we have modifier, and 'N' otherwise
-                      (if (= :modifier (:role edge-attrs)) "A" "N"))]
+        category   (get edge-attrs :category
+                        ;; in case the category is not supplied,
+                        ;; make it 'A' if we have modifier, and 'N' otherwise
+                        (if (= :modifier (:role edge-attrs)) "A" "N"))]
     (cond
       (contains? #{"A" "A2" "ACard" "AP"} category) "A"
       (contains? #{"AdA" "AdN" "AdV" "Adv" "CAdv"} category) "Adv"
@@ -23,7 +23,7 @@
 (defn resolve-data [g {data :data dictionary :dictionary {lang "*Language"} :constants}]
   (reduce (fn [g [node-id {key :name}]]
             (let [category (find-data-category g node-id)
-                  value (get-data data key)]
+                  value    (get-data data key)]
               (update-in g [:attrs node-id] #(merge % (if (contains? dictionary [value category])
                                                         {:type     :dictionary-item
                                                          :name     (format "%s_%s_%s" value category lang)
diff --git a/core/src/acc_text/nlg/graph/lists.clj b/core/src/acc_text/nlg/graph/lists.clj
index 136bc2d2f..57aa1cf9f 100644
--- a/core/src/acc_text/nlg/graph/lists.clj
+++ b/core/src/acc_text/nlg/graph/lists.clj
@@ -57,15 +57,14 @@
         (remove-edge list-node data-leaf))))
 
 (defn construct-list-structure [g list-node gf-funct]
-  (let [list-parent (first (gut/get-predecessors g gf-funct))
-        g-with-new-list-edges
-        (-> g
-            (add-edge list-parent list-node (attrs-from-edge g list-parent gf-funct))
-            (remove-edge list-parent gf-funct))]
+  (let [list-parent           (first (gut/get-predecessors g gf-funct))
+        g-with-new-list-edges (-> g
+                                  (add-edge list-parent list-node (attrs-from-edge g list-parent gf-funct))
+                                  (remove-edge list-parent gf-funct))]
     (-> (reduce                                             ;;go over children of list node and connect with parent
-          (fn [g child] (rearange-list-connections g list-node gf-funct child))
-          g-with-new-list-edges
-          (gut/get-successors g list-node))
+         (fn [g child] (rearange-list-connections g list-node gf-funct child))
+         g-with-new-list-edges
+         (gut/get-successors g list-node))
         (remove-edge gf-funct list-node)
         (remove-node gf-funct))))
 
@@ -85,11 +84,11 @@
 
 (defn restructure-synonym-node [g node]
   (update-list-categories
-    (reduce (fn [g parent]
-              (construct-list-structure g node parent))
-            g
-            (gf-parent-operations g node))
-    node))
+   (reduce (fn [g parent]
+             (construct-list-structure g node parent))
+           g
+           (gf-parent-operations g node))
+   node))
 
 (defn determine-list-category [g node lang]
   (when (pos-int? (graph/out-degree g node))
@@ -132,24 +131,24 @@
     (if (and (< 1 (graph/out-degree g node)) (some? category))
       (loop [[successor & successors] (gut/get-successors g node)
              list-node (UUID/randomUUID)
-             g (let [conj-node (UUID/randomUUID)]
-                 (-> g
-                     (graph/remove-nodes node)
-                     (uber/add-nodes-with-attrs* [[^:node node (conj-list category)]
-                                                  [^:node conj-node {:type     :operation
-                                                                     :name     "and_Conj"
-                                                                     :category "Conj"
-                                                                     :module   "Syntax"}]
-                                                  [^:node list-node (base-list category)]])
-                     (uber/add-directed-edges* (concat
-                                                 [[^:edge node conj-node {:role     :arg
-                                                                          :index    0
-                                                                          :category "Conj"}]
-                                                  [^:edge node list-node {:role     :arg
-                                                                          :index    1
-                                                                          :category (str "List" category)}]]
-                                                 (for [in-edge (graph/in-edges g node)]
-                                                   [^:edge (graph/src in-edge) node (attrs g in-edge)])))))]
+             g         (let [conj-node (UUID/randomUUID)]
+                         (-> g
+                             (graph/remove-nodes node)
+                             (uber/add-nodes-with-attrs* [[^:node node (conj-list category)]
+                                                          [^:node conj-node {:type     :operation
+                                                                             :name     "and_Conj"
+                                                                             :category "Conj"
+                                                                             :module   "Syntax"}]
+                                                          [^:node list-node (base-list category)]])
+                             (uber/add-directed-edges* (concat
+                                                        [[^:edge node conj-node {:role     :arg
+                                                                                 :index    0
+                                                                                 :category "Conj"}]
+                                                         [^:edge node list-node {:role     :arg
+                                                                                 :index    1
+                                                                                 :category (str "List" category)}]]
+                                                        (for [in-edge (graph/in-edges g node)]
+                                                          [^:edge (graph/src in-edge) node (attrs g in-edge)])))))]
         (if (= 1 (count successors))
           (-> g
               (uber/add-directed-edges* [[^:edge list-node successor {:role     :arg
@@ -160,17 +159,17 @@
                                                                                :category category}]]))
           (let [child-node (UUID/randomUUID)]
             (recur
-              successors
-              child-node
-              (-> g
-                  (uber/add-nodes-with-attrs* [[^:node list-node (cons-list category)]
-                                               [^:node child-node (base-list category)]])
-                  (uber/add-directed-edges* [[^:edge list-node successor {:role     :arg
-                                                                          :index    0
-                                                                          :category category}]
-                                             [^:edge list-node child-node {:role     :arg
-                                                                           :index    1
-                                                                           :category (str "List" category)}]]))))))
+             successors
+             child-node
+             (-> g
+                 (uber/add-nodes-with-attrs* [[^:node list-node (cons-list category)]
+                                              [^:node child-node (base-list category)]])
+                 (uber/add-directed-edges* [[^:edge list-node successor {:role     :arg
+                                                                         :index    0
+                                                                         :category category}]
+                                            [^:edge list-node child-node {:role     :arg
+                                                                          :index    1
+                                                                          :category (str "List" category)}]]))))))
       g)))
 
 (defn build-gf-shuffle-graph [g node lang]
@@ -179,10 +178,10 @@
               (-> g
                   (uber/add-nodes-with-attrs [^:node list-node {:type :sequence}])
                   (uber/add-directed-edges* (cons
-                                              [^:edge node list-node {:role :item}]
-                                              (map-indexed (fn [index successor]
-                                                             [^:edge list-node successor {:role :item :index index}])
-                                                           successors)))
+                                             [^:edge node list-node {:role :item}]
+                                             (map-indexed (fn [index successor]
+                                                            [^:edge list-node successor {:role :item :index index}])
+                                                          successors)))
                   (build-gf-list-graph list-node lang))))
           (-> g
               (graph/remove-edges* (graph/out-edges g node))
@@ -193,11 +192,11 @@
   (reduce (fn [g node]
             (let [{type :type} (attrs g node)]
               (cond-> g
-                      (and
-                        (= :synonyms type)
-                        (has-str-child? g node)) (restructure-synonym-node node)
-                      (= :sequence type) (build-gf-list-graph node lang)
-                      (= :shuffle type) (build-gf-shuffle-graph node lang))))
+                (and
+                 (= :synonyms type)
+                 (has-str-child? g node)) (restructure-synonym-node node)
+                (= :sequence type) (build-gf-list-graph node lang)
+                (= :shuffle type) (build-gf-shuffle-graph node lang))))
           g
           (filter #(let [{type :type} (attrs g %)]
                      (contains? #{:sequence :shuffle :synonyms} type))
diff --git a/core/src/acc_text/nlg/graph/modifier.clj b/core/src/acc_text/nlg/graph/modifier.clj
index 13553cc6c..8c930387e 100644
--- a/core/src/acc_text/nlg/graph/modifier.clj
+++ b/core/src/acc_text/nlg/graph/modifier.clj
@@ -15,12 +15,12 @@
     (if (contains? (get modifier-map lang) synced-cats)
       synced-cats
       (throw
-        (Exception.
-          ^String
-          (cond
-            (nil? child-cat) "Unable to determine child category"
-            (nil? modifier-cat) "Unable to determine modifier category"
-            :else (format "Unable to glue %s with %s" child-cat modifier-cat)))))))
+       (Exception.
+        ^String
+        (cond
+          (nil? child-cat) "Unable to determine child category"
+          (nil? modifier-cat) "Unable to determine modifier category"
+          :else (format "Unable to glue %s with %s" child-cat modifier-cat)))))))
 
 (defn find-modified-node [g modifier-node]
   (some #(when (= :child (:role (attrs g %))) (graph/dest %))
@@ -37,8 +37,8 @@
   (->> node
        (iterate #(let [[fist-child second-child] (get-successors g %)]
                    (or (when (and
-                               (= :modifier (:type (attrs g node)))
-                               (not= "Conj" (:category (attrs g second-child))))
+                              (= :modifier (:type (attrs g node)))
+                              (not= "Conj" (:category (attrs g second-child))))
                          second-child)
                        fist-child)))
        (take-while some?)
@@ -61,31 +61,31 @@
 
 (defn determine-categories [lang [modifier-cat child-cat]]
   (sync-categories
-    lang
-    (cond
-      (= "QCl" child-cat) [modifier-cat "QS"]
-      (and
-        (contains? #{"Cl" "S" "RCl"} child-cat)
-        (not (contains? #{"Adv" "A"} modifier-cat))) [modifier-cat "RS"]
-      :else (case [modifier-cat child-cat]
-              ["Str" "Str"] ["A" "N"]
-              ["A" "Str"] ["A" "N"]
-              ["A" "A"] ["AP" "VP"]
-              ["A" "AP"] ["AP" "VP"]
-              ["A" "Adv"] ["AP" "VP"]
-              ["A" "Cl"] ["AP" "S"]
-              ["N" "Str"] ["CN" "NP"]
-              ["N" "A"] ["NP" "A"]
-              ["V" "V"] ["VV" "VP"]
-              ["V" "VP"] ["VV" "VP"]
-              ["V" "N"] ["VV" "VP"]
-              ["V" "CN"] ["VV" "VP"]
-              ["V" "Str"] ["VV" "VP"]
-              ["Adv" "V"] ["Adv" "S"]
-              ["Adv" "N"] ["Adv" "S"]
-              ["Adv" "Str"] ["Adv" "S"]
-              ["Adv" "A"] ["Adv" "S"]
-              [modifier-cat child-cat]))))
+   lang
+   (cond
+     (= "QCl" child-cat) [modifier-cat "QS"]
+     (and
+      (contains? #{"Cl" "S" "RCl"} child-cat)
+      (not (contains? #{"Adv" "A"} modifier-cat))) [modifier-cat "RS"]
+     :else (case [modifier-cat child-cat]
+             ["Str" "Str"] ["A" "N"]
+             ["A" "Str"] ["A" "N"]
+             ["A" "A"] ["AP" "VP"]
+             ["A" "AP"] ["AP" "VP"]
+             ["A" "Adv"] ["AP" "VP"]
+             ["A" "Cl"] ["AP" "S"]
+             ["N" "Str"] ["CN" "NP"]
+             ["N" "A"] ["NP" "A"]
+             ["V" "V"] ["VV" "VP"]
+             ["V" "VP"] ["VV" "VP"]
+             ["V" "N"] ["VV" "VP"]
+             ["V" "CN"] ["VV" "VP"]
+             ["V" "Str"] ["VV" "VP"]
+             ["Adv" "V"] ["Adv" "S"]
+             ["Adv" "N"] ["Adv" "S"]
+             ["Adv" "Str"] ["Adv" "S"]
+             ["Adv" "A"] ["Adv" "S"]
+             [modifier-cat child-cat]))))
 
 (defn find-nearest-node [g child category]
   (->> child
@@ -96,60 +96,60 @@
 
 (defn resolve-modifier [g node modifier child lang]
   (let [modifier-attrs (attrs g modifier)
-        modifier-cat (find-category g modifier)
-        child-cat (find-category g child)
-        child-node (find-nearest-node g child modifier-cat)]
+        modifier-cat   (find-category g modifier)
+        child-cat      (find-category g child)
+        child-node     (find-nearest-node g child modifier-cat)]
     (uber/build-graph
-      g
-      (cond
-        (= "Punct" modifier-cat) (uber/multidigraph
-                                   [^:node node {:type :operation, :name "mkText", :category "Text", :module "Syntax"}]
-                                   [^:edge node child {:role :arg :index 0 :category "Utt"}]
-                                   [^:edge node modifier {:role :arg :index 1}])
-        (= "Subj" modifier-cat) (uber/multidigraph
-                                  [^:node node {:type :operation, :name "mkAdv", :category "Adv", :module "Syntax"}]
-                                  [^:edge node modifier {:role :arg :index 0 :category "Subj"}]
-                                  [^:edge node child {:role :arg :index 1 :category "S"}])
-        (= "Voc" modifier-cat) (uber/multidigraph
-                                 [^:node node {:type :operation, :name "mkPhr", :category "Phr", :module "Syntax"}]
-                                 [^:edge node child {:role :arg :index 1 :category "Utt"}]
-                                 [^:edge node modifier {:role :arg :index 2 :category "Voc"}])
-        (and
-          (contains? #{"Cl" "S"} modifier-cat)
-          (contains? #{"Cl" "RCl" "RS"} child-cat)) (uber/multidigraph
-                                                      [^:node node {:type :operation, :name "RelS", :category "S", :module "Grammar"}]
-                                                      [^:edge node modifier {:role :arg :index 0 :category "S"}]
-                                                      [^:edge node child {:role :arg :index 1 :category "RS"}])
-        (and
-          (some? child-node)
-          (= "Conj" modifier-cat)) (uber/multidigraph
-                                     [^:node node {:type :modifier :category child-cat}]
-                                     [^:node child-node (dissoc modifier-attrs :position)]
-                                     [^:edge node child {:type :instance :category child-cat}])
-        :else (let [[synced-modifier-cat synced-child-cat] (determine-categories lang [modifier-cat child-cat])]
-                (uber/multidigraph
-                  [^:node node (first (get-in modifier-map [lang [synced-modifier-cat synced-child-cat]]))]
-                  [^:edge node modifier {:role :arg :index 0 :category synced-modifier-cat}]
-                  [^:edge node child {:role :arg :index 1 :category synced-child-cat}]))))))
+     g
+     (cond
+       (= "Punct" modifier-cat) (uber/multidigraph
+                                 [^:node node {:type :operation, :name "mkText", :category "Text", :module "Syntax"}]
+                                 [^:edge node child {:role :arg :index 0 :category "Utt"}]
+                                 [^:edge node modifier {:role :arg :index 1}])
+       (= "Subj" modifier-cat) (uber/multidigraph
+                                [^:node node {:type :operation, :name "mkAdv", :category "Adv", :module "Syntax"}]
+                                [^:edge node modifier {:role :arg :index 0 :category "Subj"}]
+                                [^:edge node child {:role :arg :index 1 :category "S"}])
+       (= "Voc" modifier-cat) (uber/multidigraph
+                               [^:node node {:type :operation, :name "mkPhr", :category "Phr", :module "Syntax"}]
+                               [^:edge node child {:role :arg :index 1 :category "Utt"}]
+                               [^:edge node modifier {:role :arg :index 2 :category "Voc"}])
+       (and
+        (contains? #{"Cl" "S"} modifier-cat)
+        (contains? #{"Cl" "RCl" "RS"} child-cat)) (uber/multidigraph
+                                                   [^:node node {:type :operation, :name "RelS", :category "S", :module "Grammar"}]
+                                                   [^:edge node modifier {:role :arg :index 0 :category "S"}]
+                                                   [^:edge node child {:role :arg :index 1 :category "RS"}])
+       (and
+        (some? child-node)
+        (= "Conj" modifier-cat)) (uber/multidigraph
+                                  [^:node node {:type :modifier :category child-cat}]
+                                  [^:node child-node (dissoc modifier-attrs :position)]
+                                  [^:edge node child {:type :instance :category child-cat}])
+       :else (let [[synced-modifier-cat synced-child-cat] (determine-categories lang [modifier-cat child-cat])]
+               (uber/multidigraph
+                [^:node node (first (get-in modifier-map [lang [synced-modifier-cat synced-child-cat]]))]
+                [^:edge node modifier {:role :arg :index 0 :category synced-modifier-cat}]
+                [^:edge node child {:role :arg :index 1 :category synced-child-cat}]))))))
 
 (defn resolve-modifiers [g {{lang "*Language"} :constants}]
   (reduce (fn [g modifier-node]
             (loop [[modifier & modifiers] (find-modifiers g modifier-node)
                    child (find-modified-node g modifier-node)
-                   g g]
+                   g     g]
               (if (some nil? [modifier child])
                 (cond-> (graph/remove-nodes g modifier-node)
-                        (some? child) (uber/add-directed-edges*
-                                        (for [edge (graph/in-edges g modifier-node)]
-                                          [^:edge (graph/src edge) child (attrs g edge)]))
-                        (some? modifier) (uber/add-directed-edges*
-                                           (for [edge (graph/in-edges g modifier-node)]
-                                             [^:edge (graph/src edge) modifier (attrs g edge)])))
+                  (some? child) (uber/add-directed-edges*
+                                 (for [edge (graph/in-edges g modifier-node)]
+                                   [^:edge (graph/src edge) child (attrs g edge)]))
+                  (some? modifier) (uber/add-directed-edges*
+                                    (for [edge (graph/in-edges g modifier-node)]
+                                      [^:edge (graph/src edge) modifier (attrs g edge)])))
                 (let [node (UUID/randomUUID)]
                   (recur
-                    modifiers
-                    node
-                    (resolve-modifier g node modifier child lang))))))
+                   modifiers
+                   node
+                   (resolve-modifier g node modifier child lang))))))
           g
           (filter #(= :modifier (:type (attrs g %)))
                   (alg/post-traverse g))))
diff --git a/core/src/acc_text/nlg/graph/paths.clj b/core/src/acc_text/nlg/graph/paths.clj
index 69e234e4e..ae74949a6 100644
--- a/core/src/acc_text/nlg/graph/paths.clj
+++ b/core/src/acc_text/nlg/graph/paths.clj
@@ -8,54 +8,54 @@
 
 (defn join-inner-path [g path-g in-edge category]
   (let [sorted-nodes (alg/bf-traverse path-g)
-        start-node (first sorted-nodes)
-        end-node (last sorted-nodes)]
+        start-node   (first sorted-nodes)
+        end-node     (last sorted-nodes)]
     (-> (uber/build-graph g path-g)
         (graph/remove-edges in-edge)
         (graph/add-edges
-          [^:edge (graph/src in-edge) start-node (attrs g in-edge)]
-          [^:edge end-node (graph/dest in-edge) {:role :arg :index 0 :category category}]))))
+         [^:edge (graph/src in-edge) start-node (attrs g in-edge)]
+         [^:edge end-node (graph/dest in-edge) {:role :arg :index 0 :category category}]))))
 
 (defn resolve-inner-paths [g node lang]
   (reduce (fn [g in-edge]
-            (let [category (get (attrs g node) :category "Str")
+            (let [category         (get (attrs g node) :category "Str")
                   in-edge-category (get (attrs g in-edge) :category "Utt")
-                  path-sg (get-in path-map [lang [category in-edge-category]])]
+                  path-sg          (get-in path-map [lang [category in-edge-category]])]
               (cond-> g
-                      (and
-                        (not= category in-edge-category)
-                        (some? path-sg))
-                      (join-inner-path
-                        (semantic-graph->ubergraph path-sg)
-                        in-edge
-                        category))))
+                (and
+                 (not= category in-edge-category)
+                 (some? path-sg))
+                (join-inner-path
+                 (semantic-graph->ubergraph path-sg)
+                 in-edge
+                 category))))
           g
           (graph/in-edges g node)))
 
 (defn join-outer-path [g path-g out-edge out-category]
   (let [sorted-nodes (alg/bf-traverse path-g)
-        start-node (first sorted-nodes)
-        end-node (last sorted-nodes)]
+        start-node   (first sorted-nodes)
+        end-node     (last sorted-nodes)]
     (-> (uber/build-graph g path-g)
         (graph/remove-edges out-edge)
         (graph/add-edges
-          [^:edge (graph/src out-edge) start-node (assoc (attrs g out-edge) :category (:category (attrs path-g start-node)))]
-          [^:edge end-node (graph/dest out-edge) {:role :arg :index 0 :category out-category}]))))
+         [^:edge (graph/src out-edge) start-node (assoc (attrs g out-edge) :category (:category (attrs path-g start-node)))]
+         [^:edge end-node (graph/dest out-edge) {:role :arg :index 0 :category out-category}]))))
 
 (defn resolve-outer-paths [g node lang]
   (reduce (fn [g out-edge]
-            (let [category (get (attrs g node) :category "Utt")
+            (let [category          (get (attrs g node) :category "Utt")
                   out-edge-category (get (attrs g out-edge) :category "Str")
-                  path-sg (get-in path-map [lang [out-edge-category category]])]
+                  path-sg           (get-in path-map [lang [out-edge-category category]])]
               (cond-> g
-                      (and
-                        (not= category out-edge-category)
-                        (not= :operation (:type (attrs g node)))
-                        (some? path-sg))
-                      (join-outer-path
-                        (semantic-graph->ubergraph path-sg)
-                        out-edge
-                        out-edge-category))))
+                (and
+                 (not= category out-edge-category)
+                 (not= :operation (:type (attrs g node)))
+                 (some? path-sg))
+                (join-outer-path
+                 (semantic-graph->ubergraph path-sg)
+                 out-edge
+                 out-edge-category))))
           g
           (graph/out-edges g node)))
 
diff --git a/core/src/acc_text/nlg/graph/polarity.clj b/core/src/acc_text/nlg/graph/polarity.clj
index 045082d0a..111af7bec 100644
--- a/core/src/acc_text/nlg/graph/polarity.clj
+++ b/core/src/acc_text/nlg/graph/polarity.clj
@@ -7,10 +7,10 @@
   (reduce (fn [g [_ node-id _]]
             (let [{:keys [value type]} (attrs g node-id)]
               (cond-> g
-                      (= :quote type) (assoc-in [:attrs node-id] {:type   :operation
-                                                                  :module "Syntax"
-                                                                  :name   (if (true? (string->boolean value))
-                                                                            "positivePol"
-                                                                            "negativePol")}))))
+                (= :quote type) (assoc-in [:attrs node-id] {:type   :operation
+                                                            :module "Syntax"
+                                                            :name   (if (true? (string->boolean value))
+                                                                      "positivePol"
+                                                                      "negativePol")}))))
           g
           (find-edges g {:category "Pol"})))
diff --git a/core/src/acc_text/nlg/graph/segment.clj b/core/src/acc_text/nlg/graph/segment.clj
index 7d97ff609..b7e06c6e6 100644
--- a/core/src/acc_text/nlg/graph/segment.clj
+++ b/core/src/acc_text/nlg/graph/segment.clj
@@ -8,7 +8,7 @@
        (utils/get-successors g node)))
 
 (defn add-paragraph-symbol [g]
-  (let [segments (rest (utils/get-successors g (utils/find-root-id g)))
+  (let [segments    (rest (utils/get-successors g (utils/find-root-id g)))
         symbol-node (UUID/randomUUID)]
     (if (seq segments)
       (reduce (fn [g node]
diff --git a/core/src/acc_text/nlg/graph/utils.clj b/core/src/acc_text/nlg/graph/utils.clj
index c1602caba..8acb87b6d 100644
--- a/core/src/acc_text/nlg/graph/utils.clj
+++ b/core/src/acc_text/nlg/graph/utils.clj
@@ -53,16 +53,16 @@
 (defn prune-detached-nodes [g root-id]
   (apply graph/remove-nodes g
          (set/difference
-           (set (graph/nodes g))
-           (alg/bf-traverse g root-id))))
+          (set (graph/nodes g))
+          (alg/bf-traverse g root-id))))
 
 (defn prune-empty-amrs [g root-id]
   (reduce (fn [g node]
             (let [{node-type :type} (attrs g node)]
               (cond-> g
-                      (and (contains? #{:amr :frame} node-type)
-                           (zero? (count (get-successors g node))))
-                      (graph/remove-nodes node))))
+                (and (contains? #{:amr :frame} node-type)
+                     (zero? (count (get-successors g node))))
+                (graph/remove-nodes node))))
           g
           (alg/post-traverse g root-id)))
 
diff --git a/core/src/acc_text/nlg/semantic_graph.clj b/core/src/acc_text/nlg/semantic_graph.clj
index 6b03be9dc..f79482737 100644
--- a/core/src/acc_text/nlg/semantic_graph.clj
+++ b/core/src/acc_text/nlg/semantic_graph.clj
@@ -9,13 +9,13 @@
 
 (s/def ::concepts
   (s/coll-of
-    (s/keys :req-un [::concept/id ::concept/type]
-            :opt-un [::concept/name ::concept/value ::concept/category ::concept/label ::concept/position])))
+   (s/keys :req-un [::concept/id ::concept/type]
+           :opt-un [::concept/name ::concept/value ::concept/category ::concept/label ::concept/position])))
 
 (s/def ::relations
   (s/coll-of
-    (s/keys :req-un [::relation/from ::relation/to ::relation/role]
-            :opt-un [::relation/index ::relation/category ::relation/name])))
+   (s/keys :req-un [::relation/from ::relation/to ::relation/role]
+           :opt-un [::relation/index ::relation/category ::relation/name])))
 
 (s/def ::name string?)
 
diff --git a/core/src/acc_text/nlg/semantic_graph/utils.clj b/core/src/acc_text/nlg/semantic_graph/utils.clj
index 7cbead31d..d66508ac6 100644
--- a/core/src/acc_text/nlg/semantic_graph/utils.clj
+++ b/core/src/acc_text/nlg/semantic_graph/utils.clj
@@ -17,7 +17,7 @@
           (recur child-ids (set/union descendant-ids child-ids)))))))
 
 (defn get-child-with-relation [{::sg/keys [concepts relations]} {id :id} role]
-  (let [concept-map (zipmap (map :id concepts) concepts)
+  (let [concept-map  (zipmap (map :id concepts) concepts)
         relation-map (group-by :from relations)]
     (->> (get relation-map id)
          (some #(when (= role (:role %)) %))
@@ -88,13 +88,13 @@
          (sort-by :position)
          (map (fn [{:keys [id name category]}]
                 (let [category (or
-                                 category
-                                 (some (fn [{cat :category}]
-                                         (when (some? cat) cat))
-                                       (get to-relation-map id)))]
+                                category
+                                (some (fn [{cat :category}]
+                                        (when (some? cat) cat))
+                                      (get to-relation-map id)))]
                   (cond-> {:id   id
                            :name name}
-                          (some? category) (assoc :category category))))))))
+                    (some? category) (assoc :category category))))))))
 
 (defn merge-semantic-graphs [& graphs]
   (-> (first graphs)
@@ -106,17 +106,17 @@
                          (when (= :document-plan type) category))
                        concepts)]
     (cond-> semantic-graph
-            (some? category) (assoc ::sg/category category))))
+      (some? category) (assoc ::sg/category category))))
 
 (defn remove-nil-categories [semantic-graph]
   (-> semantic-graph
       (update ::sg/concepts #(map (fn [{cat :category :as concept}]
                                     (cond-> concept
-                                            (nil? cat) (dissoc :category)))
+                                      (nil? cat) (dissoc :category)))
                                   %))
       (update ::sg/relations #(map (fn [{cat :category :as relation}]
                                      (cond-> relation
-                                             (nil? cat) (dissoc :category)))
+                                       (nil? cat) (dissoc :category)))
                                    %))))
 
 (defn sort-semantic-graph [semantic-graph]
@@ -130,12 +130,12 @@
 (defn semantic-graph->ubergraph [{::sg/keys [concepts relations]} & {:keys [keep-ids?]}]
   (let [id->uuid (zipmap (map :id concepts) (if-not (true? keep-ids?) (repeatedly #(UUID/randomUUID)) (map :id concepts)))]
     (apply uber/multidigraph (concat
-                               (map (fn [{:keys [id] :as concept}]
-                                      [^:node (id->uuid id) (dissoc concept :id)])
-                                    concepts)
-                               (map (fn [{:keys [from to] :as relation}]
-                                      [^:edge (id->uuid from) (id->uuid to) (dissoc relation :from :to)])
-                                    relations)))))
+                              (map (fn [{:keys [id] :as concept}]
+                                     [^:node (id->uuid id) (dissoc concept :id)])
+                                   concepts)
+                              (map (fn [{:keys [from to] :as relation}]
+                                     [^:edge (id->uuid from) (id->uuid to) (dissoc relation :from :to)])
+                                   relations)))))
 
 (defn vizgraph [semantic-graph]
   (-> semantic-graph
diff --git a/core/src/acc_text/nlp/utils.clj b/core/src/acc_text/nlp/utils.clj
index a9ef72d11..2d98f8cc1 100644
--- a/core/src/acc_text/nlp/utils.clj
+++ b/core/src/acc_text/nlp/utils.clj
@@ -25,12 +25,12 @@
 
 (defn wrap-sentence [s]
   (cond-> (str/trim s)
-          (re-find #"(?U)[^.?!\s]\s*$" s) (str ".")))
+    (re-find #"(?U)[^.?!\s]\s*$" s) (str ".")))
 
 (defn process-sentence [s]
   (if-not (str/blank? s)
     (wrap-sentence
-      (capitalize-first-word s))
+     (capitalize-first-word s))
     ""))
 
 (defn clean-whitespace-before-punct
@@ -49,10 +49,10 @@
 
 (defn annotate [text]
   (loop [[token & tokens] (tokenize-incl-space text)
-         idx 0
+         idx         0
          annotations []]
     (if (nil? token)
       annotations
       (recur tokens (+ idx (count token)) (cond-> annotations
-                                                  (re-matches #"[^\s]+" token) (conj {:text token
-                                                                                      :idx  idx}))))))
+                                            (re-matches #"[^\s]+" token) (conj {:text token
+                                                                                :idx  idx}))))))
diff --git a/utils/src/utils/generate.clj b/utils/src/utils/generate.clj
index 659ab786d..b90dd7ded 100644
--- a/utils/src/utils/generate.clj
+++ b/utils/src/utils/generate.clj
@@ -47,7 +47,7 @@
   first entry is original data and the second is a collection of variants."
   [document-plan language data]
   (log/infof "Generating text for %s data items" (count data))
-  (let [ids (take (count data) (repeatedly #(str (UUID/randomUUID))))
+  (let [ids      (take (count data) (repeatedly #(str (UUID/randomUUID))))
         id->data (zipmap ids data)]
     (->> {:documentPlanName document-plan
           :dataRows         id->data


Test patch:
diff --git a/api/test/api/books_scenario_test.clj b/api/test/api/books_scenario_test.clj
index 5010f39a8..7020a9555 100644
--- a/api/test/api/books_scenario_test.clj
+++ b/api/test/api/books_scenario_test.clj
@@ -20,13 +20,13 @@
 (defn keys-in [m]
   (if (map? m)
     (vec
-      (mapcat (fn [[k v]]
-                (let [sub (keys-in v)
-                      nested (map #(into [k] %) (filter (comp not empty?) sub))]
-                  (if (seq nested)
-                    nested
-                    [[k]])))
-              m))
+     (mapcat (fn [[k v]]
+               (let [sub    (keys-in v)
+                     nested (map #(into [k] %) (filter (comp not empty?) sub))]
+                 (if (seq nested)
+                   nested
+                   [[k]])))
+             m))
     []))
 
 (defn call [req]
@@ -34,32 +34,32 @@
       (update :body #(json/read-value % read-mapper))))
 
 (deftest ^:integration data-file-upload
-  (let [req0 {:uri "/_graphql", :params {}, :body {:operationName "dictionary", :variables {}, :query "query dictionary {\n  dictionary {\n    offset\n    totalCount\n    items {\n      ...dictionaryItemFields\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment dictionaryItemFields on DictionaryItem {\n  id\n  name\n  partOfSpeech\n  concept {\n    ...conceptFields\n    __typename\n  }\n  phrases {\n    ...phraseFields\n    __typename\n  }\n  __typename\n}\n\nfragment conceptFields on Concept {\n  id\n  label\n  helpText\n  roles {\n    ...thematicRoleFields\n    __typename\n  }\n  __typename\n}\n\nfragment phraseFields on Phrase {\n  id\n  text\n  defaultUsage\n  readerFlagUsage {\n    ...readerFlagUsageFields\n    __typename\n  }\n  __typename\n}\n\nfragment thematicRoleFields on ThematicRole {\n  id\n  fieldLabel\n  fieldType\n  __typename\n}\n\nfragment readerFlagUsageFields on ReaderFlagUsage {\n  id\n  flag {\n    ...readerFlagFields\n    __typename\n  }\n  usage\n  __typename\n}\n\nfragment readerFlagFields on ReaderFlag {\n  id\n  name\n  __typename\n}\n"}, :request-method :post}
-        req1 {:uri "/_graphql", :params {}, :body {:operationName "concepts", :variables {}, :query "query concepts {\n  concepts {\n    id\n    concepts {\n      ...conceptFields\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment conceptFields on Concept {\n  id\n  label\n  helpText\n  roles {\n    ...thematicRoleFields\n    __typename\n  }\n  __typename\n}\n\nfragment thematicRoleFields on ThematicRole {\n  id\n  fieldLabel\n  fieldType\n  __typename\n}\n"}, :request-method :post}
-        req2 {:uri "/_graphql", :params {}, :body {:operationName "listDataFiles", :variables {}, :query "query listDataFiles {\n  listDataFiles {\n    offset\n    totalCount\n    limit\n    dataFiles {\n      id\n      fileName\n      fieldNames\n      __typename\n    }\n    __typename\n  }\n}\n"}, :request-method :post}
-        req3 {:uri "/_graphql", :params {}, :body {:operationName "readerFlags", :variables {}, :query "query readerFlags {\n  readerFlags {\n    id\n    flags {\n      ...readerFlagFields\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment readerFlagFields on ReaderFlag {\n  id\n  name\n  __typename\n}\n"}, :request-method :post}
-        req4 {:uri "/_graphql", :params {}, :body {:operationName "documentPlans", :variables {}, :query "query documentPlans {\n  documentPlans {\n    offset\n    totalCount\n    limit\n    items {\n      ...documentPlanFields\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment documentPlanFields on DocumentPlan {\n  id\n  uid\n  name\n  blocklyXml\n  documentPlan\n  dataSampleId\n  dataSampleRow\n  createdAt\n  updatedAt\n  updateCount\n  __typename\n}\n"}, :request-method :post}
-        req5 {:uri "/_graphql", :params {}, :body {:operationName "createDocumentPlan", :variables {:blocklyXml "<xml xmlns=\"http://www.w3.org/1999/xhtml\"><block type=\"Document-plan\" deletable=\"false\"><statement name=\"segments\"><block type=\"Segment\"><mutation value_count=\"2\" value_sequence=\"value_\"></mutation></block></statement></block></xml>", :__typename "DocumentPlan", :uid "06b6a85c-7696-4d1f-9775-84692cace0cd", :name "Untitled plan", :contextId nil, :createdAt 1573023619002, :dataSampleId nil, :documentPlan "{\"type\":\"Document-plan\",\"srcId\":\"new-document-plan\",\"segments\":[{\"type\":\"Segment\",\"srcId\":\"new-segment\",\"children\":[]}]}", :dataSampleRow 0, :updateCount 0}, :query "mutation createDocumentPlan($uid: ID!, $name: String!, $blocklyXml: String!, $documentPlan: String!, $dataSampleId: ID, $dataSampleRow: Int) {\n  createDocumentPlan(uid: $uid, name: $name, blocklyXml: $blocklyXml, documentPlan: $documentPlan, dataSampleId: $dataSampleId, dataSampleRow: $dataSampleRow) {\n    ...documentPlanFields\n    __typename\n  }\n}\n\nfragment documentPlanFields on DocumentPlan {\n  id\n  uid\n  name\n  blocklyXml\n  documentPlan\n  dataSampleId\n  dataSampleRow\n  createdAt\n  updatedAt\n  updateCount\n  __typename\n}\n"}, :request-method :post}
-        req6 {:uri "/_graphql", :params {}, :body {:operationName "documentPlans", :variables {}, :query "query documentPlans {\n  documentPlans {\n    offset\n    totalCount\n    limit\n    items {\n      ...documentPlanFields\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment documentPlanFields on DocumentPlan {\n  id\n  uid\n  name\n  blocklyXml\n  documentPlan\n  dataSampleId\n  dataSampleRow\n  createdAt\n  updatedAt\n  updateCount\n  __typename\n}\n"}, :request-method :post}
-        req7 {:uri "/accelerated-text-data-files/",
-              :params {"key" "books.csv", "acl" "public-read", "file" {:filename "books.csv", :content-type "text/csv", :content "id,isbn-13,title,subtitle,authors,publisher,publishedDate,pageCount,categories,averageRating,ratingsCount,maturityRating,thumbnail,language\n9780615204253,9780615204253,\"Building Search Applications\",\"Lucene, LingPipe, and Gate\",\"Manu Konchady\",Lulu.com,2008,430,Computers,,,NOT_MATURE,http://books.google.com/books/content?id=yNnpAgAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api,en\n9781597497251,9781597497251,\"Moving to the Cloud\",\"Developing Apps in the New World of Cloud Computing\",\"Dinkar Sitaram, Geetha Manjunath\",Elsevier,2011,448,Computers,,,NOT_MATURE,http://books.google.com/books/content?id=Nq4J0_tKOlsC&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api,en\n9780956599315,9780956599315,\"Text Processing with GATE\",\"Version 6\",\"Hamish Cunningham, Kalina Bontcheva, Diana Maynard\",Gate,2011,573,Computers,,,NOT_MATURE,http://books.google.com/books/content?id=vM42KQEACAAJ&printsec=frontcover&img=1&zoom=1&source=gbs_api,en\n9781250065636,9781250065636,\"The Age of Cryptocurrency\",\"How Bitcoin and Digital Money Are Challenging the Global Economic Order\",\"Paul Vigna, Michael J. Casey\",Macmillan,2015-01-27,368,\"Business & Economics\",,,NOT_MATURE,http://books.google.com/books/content?id=Jjy3BQAAQBAJ&printsec=frontcover&img=1&zoom=1&source=gbs_api,en\n9781119300311,9781119300311,\"The Business Blockchain\",\"Promise, Practice, and Application of the Next Internet Technology\",\"William Mougayar\",\"John Wiley & Sons\",2016-05-09,208,\"Business & Economics\",5.0,1,NOT_MATURE,http://books.google.com/books/content?id=X8oXDAAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api,en\n"}},
-              :headers {"origin" "http://localhost:8080",
-                        "host" "0.0.0.0:3001",
-                        "user-agent" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0",
-                        "content-type" "multipart/form-data; boundary=---------------------------704885301643800608931319847",
-                        "content-length" "2075",
-                        "referer" "http://localhost:8080/",
-                        "connection" "keep-alive",
-                        "accept" "*/*",
-                        "accept-language" "en-US,en;q=0.5",
-                        "accept-encoding" "gzip, deflate"}
-              :content-length 2075
-              :content-type "multipart/form-data; boundary=---------------------------704885301643800608931319847",
-              :character-encoding "utf8"
-              :body "-----------------------------20858548701865296731267479087\r\nContent-Disposition: form-data; name=\"key\"\r\n\r\nbooks.csv\r\n-----------------------------20858548701865296731267479087\r\nContent-Disposition: form-data; name=\"acl\"\r\n\r\npublic-read\r\n-----------------------------20858548701865296731267479087\r\nContent-Disposition: form-data; name=\"file\"; filename=\"books.csv\"\r\nContent-Type: text/csv\r\n\r\nid,isbn-13,title,subtitle,authors,publisher,publishedDate,pageCount,categories,averageRating,ratingsCount,maturityRating,thumbnail,language\n9780615204253,9780615204253,\"Building Search Applications\",\"Lucene, LingPipe, and Gate\",\"Manu Konchady\",Lulu.com,2008,430,Computers,,,NOT_MATURE,http://books.google.com/books/content?id=yNnpAgAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api,en\n9781597497251,9781597497251,\"Moving to the Cloud\",\"Developing Apps in the New World of Cloud Computing\",\"Dinkar Sitaram, Geetha Manjunath\",Elsevier,2011,448,Computers,,,NOT_MATURE,http://books.google.com/books/content?id=Nq4J0_tKOlsC&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api,en\n9780956599315,9780956599315,\"Text Processing with GATE\",\"Version 6\",\"Hamish Cunningham, Kalina Bontcheva, Diana Maynard\",Gate,2011,573,Computers,,,NOT_MATURE,http://books.google.com/books/content?id=vM42KQEACAAJ&printsec=frontcover&img=1&zoom=1&source=gbs_api,en\n9781250065636,9781250065636,\"The Age of Cryptocurrency\",\"How Bitcoin and Digital Money Are Challenging the Global Economic Order\",\"Paul Vigna, Michael J. Casey\",Macmillan,2015-01-27,368,\"Business & Economics\",,,NOT_MATURE,http://books.google.com/books/content?id=Jjy3BQAAQBAJ&printsec=frontcover&img=1&zoom=1&source=gbs_api,en\n9781119300311,9781119300311,\"The Business Blockchain\",\"Promise, Practice, and Application of the Next Internet Technology\",\"William Mougayar\",\"John Wiley & Sons\",2016-05-09,208,\"Business & Economics\",5.0,1,NOT_MATURE,http://books.google.com/books/content?id=X8oXDAAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api,en\n\r\n-----------------------------20858548701865296731267479087--\r\n",
-              :request-method :post}
-        req8 {:uri "/_graphql", :params {}, :body {:operationName "listDataFiles", :variables {}, :query "query listDataFiles {\n  listDataFiles {\n    offset\n    totalCount\n    limit\n    dataFiles {\n      id\n      fileName\n      fieldNames\n      __typename\n    }\n    __typename\n  }\n}\n"}, :request-method :post}
-        req9 {:uri "/_graphql", :params {}, :body {:operationName "getDataFile", :variables {:id "11898ba2-bc52-402f-aa78-5b09b1db8ef8"}, :query "query getDataFile($id: ID!) {\n  getDataFile(id: $id) {\n    id\n    fileName\n    fieldNames\n    records {\n      id\n      fields {\n        id\n        fieldName\n        value\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n}\n"}, :request-method :post}
+  (let [req0  {:uri "/_graphql", :params {}, :body {:operationName "dictionary", :variables {}, :query "query dictionary {\n  dictionary {\n    offset\n    totalCount\n    items {\n      ...dictionaryItemFields\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment dictionaryItemFields on DictionaryItem {\n  id\n  name\n  partOfSpeech\n  concept {\n    ...conceptFields\n    __typename\n  }\n  phrases {\n    ...phraseFields\n    __typename\n  }\n  __typename\n}\n\nfragment conceptFields on Concept {\n  id\n  label\n  helpText\n  roles {\n    ...thematicRoleFields\n    __typename\n  }\n  __typename\n}\n\nfragment phraseFields on Phrase {\n  id\n  text\n  defaultUsage\n  readerFlagUsage {\n    ...readerFlagUsageFields\n    __typename\n  }\n  __typename\n}\n\nfragment thematicRoleFields on ThematicRole {\n  id\n  fieldLabel\n  fieldType\n  __typename\n}\n\nfragment readerFlagUsageFields on ReaderFlagUsage {\n  id\n  flag {\n    ...readerFlagFields\n    __typename\n  }\n  usage\n  __typename\n}\n\nfragment readerFlagFields on ReaderFlag {\n  id\n  name\n  __typename\n}\n"}, :request-method :post}
+        req1  {:uri "/_graphql", :params {}, :body {:operationName "concepts", :variables {}, :query "query concepts {\n  concepts {\n    id\n    concepts {\n      ...conceptFields\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment conceptFields on Concept {\n  id\n  label\n  helpText\n  roles {\n    ...thematicRoleFields\n    __typename\n  }\n  __typename\n}\n\nfragment thematicRoleFields on ThematicRole {\n  id\n  fieldLabel\n  fieldType\n  __typename\n}\n"}, :request-method :post}
+        req2  {:uri "/_graphql", :params {}, :body {:operationName "listDataFiles", :variables {}, :query "query listDataFiles {\n  listDataFiles {\n    offset\n    totalCount\n    limit\n    dataFiles {\n      id\n      fileName\n      fieldNames\n      __typename\n    }\n    __typename\n  }\n}\n"}, :request-method :post}
+        req3  {:uri "/_graphql", :params {}, :body {:operationName "readerFlags", :variables {}, :query "query readerFlags {\n  readerFlags {\n    id\n    flags {\n      ...readerFlagFields\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment readerFlagFields on ReaderFlag {\n  id\n  name\n  __typename\n}\n"}, :request-method :post}
+        req4  {:uri "/_graphql", :params {}, :body {:operationName "documentPlans", :variables {}, :query "query documentPlans {\n  documentPlans {\n    offset\n    totalCount\n    limit\n    items {\n      ...documentPlanFields\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment documentPlanFields on DocumentPlan {\n  id\n  uid\n  name\n  blocklyXml\n  documentPlan\n  dataSampleId\n  dataSampleRow\n  createdAt\n  updatedAt\n  updateCount\n  __typename\n}\n"}, :request-method :post}
+        req5  {:uri "/_graphql", :params {}, :body {:operationName "createDocumentPlan", :variables {:blocklyXml "<xml xmlns=\"http://www.w3.org/1999/xhtml\"><block type=\"Document-plan\" deletable=\"false\"><statement name=\"segments\"><block type=\"Segment\"><mutation value_count=\"2\" value_sequence=\"value_\"></mutation></block></statement></block></xml>", :__typename "DocumentPlan", :uid "06b6a85c-7696-4d1f-9775-84692cace0cd", :name "Untitled plan", :contextId nil, :createdAt 1573023619002, :dataSampleId nil, :documentPlan "{\"type\":\"Document-plan\",\"srcId\":\"new-document-plan\",\"segments\":[{\"type\":\"Segment\",\"srcId\":\"new-segment\",\"children\":[]}]}", :dataSampleRow 0, :updateCount 0}, :query "mutation createDocumentPlan($uid: ID!, $name: String!, $blocklyXml: String!, $documentPlan: String!, $dataSampleId: ID, $dataSampleRow: Int) {\n  createDocumentPlan(uid: $uid, name: $name, blocklyXml: $blocklyXml, documentPlan: $documentPlan, dataSampleId: $dataSampleId, dataSampleRow: $dataSampleRow) {\n    ...documentPlanFields\n    __typename\n  }\n}\n\nfragment documentPlanFields on DocumentPlan {\n  id\n  uid\n  name\n  blocklyXml\n  documentPlan\n  dataSampleId\n  dataSampleRow\n  createdAt\n  updatedAt\n  updateCount\n  __typename\n}\n"}, :request-method :post}
+        req6  {:uri "/_graphql", :params {}, :body {:operationName "documentPlans", :variables {}, :query "query documentPlans {\n  documentPlans {\n    offset\n    totalCount\n    limit\n    items {\n      ...documentPlanFields\n      __typename\n    }\n    __typename\n  }\n}\n\nfragment documentPlanFields on DocumentPlan {\n  id\n  uid\n  name\n  blocklyXml\n  documentPlan\n  dataSampleId\n  dataSampleRow\n  createdAt\n  updatedAt\n  updateCount\n  __typename\n}\n"}, :request-method :post}
+        req7  {:uri                "/accelerated-text-data-files/",
+               :params             {"key" "books.csv", "acl" "public-read", "file" {:filename "books.csv", :content-type "text/csv", :content "id,isbn-13,title,subtitle,authors,publisher,publishedDate,pageCount,categories,averageRating,ratingsCount,maturityRating,thumbnail,language\n9780615204253,9780615204253,\"Building Search Applications\",\"Lucene, LingPipe, and Gate\",\"Manu Konchady\",Lulu.com,2008,430,Computers,,,NOT_MATURE,http://books.google.com/books/content?id=yNnpAgAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api,en\n9781597497251,9781597497251,\"Moving to the Cloud\",\"Developing Apps in the New World of Cloud Computing\",\"Dinkar Sitaram, Geetha Manjunath\",Elsevier,2011,448,Computers,,,NOT_MATURE,http://books.google.com/books/content?id=Nq4J0_tKOlsC&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api,en\n9780956599315,9780956599315,\"Text Processing with GATE\",\"Version 6\",\"Hamish Cunningham, Kalina Bontcheva, Diana Maynard\",Gate,2011,573,Computers,,,NOT_MATURE,http://books.google.com/books/content?id=vM42KQEACAAJ&printsec=frontcover&img=1&zoom=1&source=gbs_api,en\n9781250065636,9781250065636,\"The Age of Cryptocurrency\",\"How Bitcoin and Digital Money Are Challenging the Global Economic Order\",\"Paul Vigna, Michael J. Casey\",Macmillan,2015-01-27,368,\"Business & Economics\",,,NOT_MATURE,http://books.google.com/books/content?id=Jjy3BQAAQBAJ&printsec=frontcover&img=1&zoom=1&source=gbs_api,en\n9781119300311,9781119300311,\"The Business Blockchain\",\"Promise, Practice, and Application of the Next Internet Technology\",\"William Mougayar\",\"John Wiley & Sons\",2016-05-09,208,\"Business & Economics\",5.0,1,NOT_MATURE,http://books.google.com/books/content?id=X8oXDAAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api,en\n"}},
+               :headers            {"origin"          "http://localhost:8080",
+                                    "host"            "0.0.0.0:3001",
+                                    "user-agent"      "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0",
+                                    "content-type"    "multipart/form-data; boundary=---------------------------704885301643800608931319847",
+                                    "content-length"  "2075",
+                                    "referer"         "http://localhost:8080/",
+                                    "connection"      "keep-alive",
+                                    "accept"          "*/*",
+                                    "accept-language" "en-US,en;q=0.5",
+                                    "accept-encoding" "gzip, deflate"}
+               :content-length     2075
+               :content-type       "multipart/form-data; boundary=---------------------------704885301643800608931319847",
+               :character-encoding "utf8"
+               :body               "-----------------------------20858548701865296731267479087\r\nContent-Disposition: form-data; name=\"key\"\r\n\r\nbooks.csv\r\n-----------------------------20858548701865296731267479087\r\nContent-Disposition: form-data; name=\"acl\"\r\n\r\npublic-read\r\n-----------------------------20858548701865296731267479087\r\nContent-Disposition: form-data; name=\"file\"; filename=\"books.csv\"\r\nContent-Type: text/csv\r\n\r\nid,isbn-13,title,subtitle,authors,publisher,publishedDate,pageCount,categories,averageRating,ratingsCount,maturityRating,thumbnail,language\n9780615204253,9780615204253,\"Building Search Applications\",\"Lucene, LingPipe, and Gate\",\"Manu Konchady\",Lulu.com,2008,430,Computers,,,NOT_MATURE,http://books.google.com/books/content?id=yNnpAgAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api,en\n9781597497251,9781597497251,\"Moving to the Cloud\",\"Developing Apps in the New World of Cloud Computing\",\"Dinkar Sitaram, Geetha Manjunath\",Elsevier,2011,448,Computers,,,NOT_MATURE,http://books.google.com/books/content?id=Nq4J0_tKOlsC&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api,en\n9780956599315,9780956599315,\"Text Processing with GATE\",\"Version 6\",\"Hamish Cunningham, Kalina Bontcheva, Diana Maynard\",Gate,2011,573,Computers,,,NOT_MATURE,http://books.google.com/books/content?id=vM42KQEACAAJ&printsec=frontcover&img=1&zoom=1&source=gbs_api,en\n9781250065636,9781250065636,\"The Age of Cryptocurrency\",\"How Bitcoin and Digital Money Are Challenging the Global Economic Order\",\"Paul Vigna, Michael J. Casey\",Macmillan,2015-01-27,368,\"Business & Economics\",,,NOT_MATURE,http://books.google.com/books/content?id=Jjy3BQAAQBAJ&printsec=frontcover&img=1&zoom=1&source=gbs_api,en\n9781119300311,9781119300311,\"The Business Blockchain\",\"Promise, Practice, and Application of the Next Internet Technology\",\"William Mougayar\",\"John Wiley & Sons\",2016-05-09,208,\"Business & Economics\",5.0,1,NOT_MATURE,http://books.google.com/books/content?id=X8oXDAAAQBAJ&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api,en\n\r\n-----------------------------20858548701865296731267479087--\r\n",
+               :request-method     :post}
+        req8  {:uri "/_graphql", :params {}, :body {:operationName "listDataFiles", :variables {}, :query "query listDataFiles {\n  listDataFiles {\n    offset\n    totalCount\n    limit\n    dataFiles {\n      id\n      fileName\n      fieldNames\n      __typename\n    }\n    __typename\n  }\n}\n"}, :request-method :post}
+        req9  {:uri "/_graphql", :params {}, :body {:operationName "getDataFile", :variables {:id "11898ba2-bc52-402f-aa78-5b09b1db8ef8"}, :query "query getDataFile($id: ID!) {\n  getDataFile(id: $id) {\n    id\n    fileName\n    fieldNames\n    records {\n      id\n      fields {\n        id\n        fieldName\n        value\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n}\n"}, :request-method :post}
         req10 {:uri "/_graphql", :params {}, :body {:operationName "updateDocumentPlan", :variables {:blocklyXml "<xml xmlns=\"http://www.w3.org/1999/xhtml\"><block type=\"Document-plan\" deletable=\"false\"><statement name=\"segments\"><block type=\"Segment\"><mutation value_count=\"2\" value_sequence=\"value_\"></mutation></block></statement></block></xml>", :updatedAt 1573023619, :__typename "DocumentPlan", :uid "06b6a85c-7696-4d1f-9775-84692cace0cd", :name "Untitled plan", :createdAt 1573023619, :dataSampleId "11898ba2-bc52-402f-aa78-5b09b1db8ef8", :id "e3e784e2-310c-49e9-9ddf-e0bd3bebbce0", :documentPlan "{\"type\":\"Document-plan\",\"segments\":[{\"children\":[],\"type\":\"Segment\",\"srcId\":\"new-segment\"}],\"srcId\":\"new-document-plan\"}", :dataSampleRow 0, :updateCount 0}, :query "mutation updateDocumentPlan($id: ID!, $uid: ID, $name: String, $blocklyXml: String, $documentPlan: String, $dataSampleId: ID, $dataSampleRow: Int) {\n  updateDocumentPlan(id: $id, uid: $uid, name: $name, blocklyXml: $blocklyXml, documentPlan: $documentPlan, dataSampleId: $dataSampleId, dataSampleRow: $dataSampleRow) {\n    ...documentPlanFields\n    __typename\n  }\n}\n\nfragment documentPlanFields on DocumentPlan {\n  id\n  uid\n  name\n  blocklyXml\n  documentPlan\n  dataSampleId\n  dataSampleRow\n  createdAt\n  updatedAt\n  updateCount\n  __typename\n}\n"}, :request-method :post}
         req11 {:uri            "/nlg/",
                :params         {},
@@ -170,7 +170,7 @@
       (is (= [[:id]
               [:message]]
              (-> (call req7) :body keys-in)))
-      (let [resp (call req8)
+      (let [resp         (call req8)
             data-file-id (-> resp :body :data :listDataFiles :dataFiles first :id)]
         (is (= [[:data
                  :listDataFiles
diff --git a/api/test/api/datomic_fixtures.clj b/api/test/api/datomic_fixtures.clj
index d24521348..f5738d69d 100644
--- a/api/test/api/datomic_fixtures.clj
+++ b/api/test/api/datomic_fixtures.clj
@@ -25,26 +25,26 @@
     (scratch-conn db-name)
     (mount/stop)
     (-> (mount/swap-states
-          {#'api.config/conf
-           {:start (fn []
-                     {:db-implementation    :datomic
-                      :enabled-languages    #{"Eng" "Ger"}
-                      :relevant-items-limit 100})}
-           #'data.entities.reader-model/language-conf
-           {:start (fn []
-                     (mapv #(data.entities.reader-model/update! % data.entities.user-group/DUMMY-USER-GROUP-ID)
-                           [#:data.spec.reader-model{:code       "Eng"
-                                                     :flag       "🇬🇧"
-                                                     :type       :language
-                                                     :name       "English"
-                                                     :available? true
-                                                     :enabled?   true}
-                            #:data.spec.reader-model{:code       "Ger"
-                                                     :flag       "🇩🇪"
-                                                     :type       :language
-                                                     :name       "German"
-                                                     :available? true
-                                                     :enabled?   true}]))}})
+         {#'api.config/conf
+          {:start (fn []
+                    {:db-implementation    :datomic
+                     :enabled-languages    #{"Eng" "Ger"}
+                     :relevant-items-limit 100})}
+          #'data.entities.reader-model/language-conf
+          {:start (fn []
+                    (mapv #(data.entities.reader-model/update! % data.entities.user-group/DUMMY-USER-GROUP-ID)
+                          [#:data.spec.reader-model{:code       "Eng"
+                                                    :flag       "🇬🇧"
+                                                    :type       :language
+                                                    :name       "English"
+                                                    :available? true
+                                                    :enabled?   true}
+                           #:data.spec.reader-model{:code       "Ger"
+                                                    :flag       "🇩🇪"
+                                                    :type       :language
+                                                    :name       "German"
+                                                    :available? true
+                                                    :enabled?   true}]))}})
         (mount/only #{#'api.config/conf
                       #'data.entities.data-files/data-files-db
                       #'data.entities.document-plan/document-plans-db
diff --git a/api/test/api/end_to_end_test.clj b/api/test/api/end_to_end_test.clj
index d78ed20a3..334d7cb98 100644
--- a/api/test/api/end_to_end_test.clj
+++ b/api/test/api/end_to_end_test.clj
@@ -28,7 +28,6 @@
                                                    "1" {"authors" "William Mougayar"
                                                         "title"   "The Business Blockchain"}}}))))
 
-
 (deftest ^:integration text-generation-with-simple-plan-using-xlsx
   (is (= ["Building Search Applications is authored by Manu Konchady."]
          (generate-text {:document-plan-name "Authorship"
diff --git a/api/test/api/graphql/data_test.clj b/api/test/api/graphql/data_test.clj
index 3b82bcaff..1aab9c3dc 100644
--- a/api/test/api/graphql/data_test.clj
+++ b/api/test/api/graphql/data_test.clj
@@ -50,6 +50,6 @@
 (deftest ^:integration reading-data-file-contents
   (testing "Read books.csv headers"
     (let [data-file-id (load-data-file "books.csv")
-          result (data-files/read-data-file data-file-id user-group/DUMMY-USER-GROUP-ID)
-          headers (-> result (get ::data-file/content) (str/split-lines) (first) (str/split #",") (set))]
+          result       (data-files/read-data-file data-file-id user-group/DUMMY-USER-GROUP-ID)
+          headers      (-> result (get ::data-file/content) (str/split-lines) (first) (str/split #",") (set))]
       (is (= #{"authors" "categories" "pageCount" "publishedDate" "publisher" "subtitle" "title"} headers)))))
diff --git a/api/test/api/graphql/dictionary_test.clj b/api/test/api/graphql/dictionary_test.clj
index 3c116e4c8..e5c4eed94 100644
--- a/api/test/api/graphql/dictionary_test.clj
+++ b/api/test/api/graphql/dictionary_test.clj
@@ -92,18 +92,17 @@
     (is (contains? (set (map :text phrases)) "t3"))))
 
 (deftest ^:integration get-dictionary-item-test
-  (let [dict-item-id (utils/gen-uuid)
+  (let [dict-item-id                 (utils/gen-uuid)
         create-dictionary-item-query "mutation CreateDictionaryItem($id: ID, $name:String! $partOfSpeech:PartOfSpeech){createDictionaryItem(id: $id name:$name partOfSpeech:$partOfSpeech){name partOfSpeech id}}"
-        _
-        (q "/_graphql" :post {:query create-dictionary-item-query :variables {:id dict-item-id :name "see", :partOfSpeech "V"}})
+        _                            (q "/_graphql" :post {:query create-dictionary-item-query :variables {:id dict-item-id :name "see", :partOfSpeech "V"}})
 
-        create-phrase-query "mutation CreatePhrase($dictionaryItemId:ID! $text:String! $defaultUsage:DefaultUsage){createPhrase(dictionaryItemId:$dictionaryItemId text:$text defaultUsage:$defaultUsage){phrases{id text}}}"
-        _ (q "/_graphql" :post {:query create-phrase-query :variables {:dictionaryItemId dict-item-id
-                                                                       :text             "saw"
-                                                                       :defaultUsage     "YES"
-                                                                       :readerFlagUsage  []}})
+        create-phrase-query          "mutation CreatePhrase($dictionaryItemId:ID! $text:String! $defaultUsage:DefaultUsage){createPhrase(dictionaryItemId:$dictionaryItemId text:$text defaultUsage:$defaultUsage){phrases{id text}}}"
+        _                            (q "/_graphql" :post {:query create-phrase-query :variables {:dictionaryItemId dict-item-id
+                                                                                                  :text             "saw"
+                                                                                                  :defaultUsage     "YES"
+                                                                                                  :readerFlagUsage  []}})
 
-        query "{dictionaryItem(id:\"%s\"){id name partOfSpeech phrases{text} concept{id}}}"
+        query                        "{dictionaryItem(id:\"%s\"){id name partOfSpeech phrases{text} concept{id}}}"
         {{{{:keys [id name partOfSpeech phrases]} :dictionaryItem} :data errors :errors} :body}
         (q "/_graphql" :post {:query (format query dict-item-id)})]
     (is (nil? errors))
@@ -113,20 +112,20 @@
     (is (= #{{:text "see"} {:text "saw"}} (set phrases)))))
 
 (deftest ^:integration list-dictionary-phrases-test
-  (let [query "mutation CreateDictionaryItem($name:String! $partOfSpeech:PartOfSpeech){createDictionaryItem(name:$name partOfSpeech:$partOfSpeech){name partOfSpeech id}}"
+  (let [query               "mutation CreateDictionaryItem($name:String! $partOfSpeech:PartOfSpeech){createDictionaryItem(name:$name partOfSpeech:$partOfSpeech){name partOfSpeech id}}"
         {{{{:keys [id]} :createDictionaryItem} :data errors :errors} :body}
         (q "/_graphql" :post {:query query :variables {:name "see", :partOfSpeech "V"}})
 
         create-phrase-query "mutation CreatePhrase($dictionaryItemId:ID! $text:String! $defaultUsage:DefaultUsage){createPhrase(dictionaryItemId:$dictionaryItemId text:$text defaultUsage:$defaultUsage){phrases{id text}}}"
-        _ (q "/_graphql" :post {:query create-phrase-query :variables {:dictionaryItemId id
-                                                                       :text             "saw"
-                                                                       :defaultUsage     "YES"
-                                                                       :readerFlagUsage  []}})
+        _                   (q "/_graphql" :post {:query create-phrase-query :variables {:dictionaryItemId id
+                                                                                         :text             "saw"
+                                                                                         :defaultUsage     "YES"
+                                                                                         :readerFlagUsage  []}})
         create-phrase-query "mutation CreatePhrase($dictionaryItemId:ID! $text:String! $defaultUsage:DefaultUsage){createPhrase(dictionaryItemId:$dictionaryItemId text:$text defaultUsage:$defaultUsage){phrases{id text}}}"
-        _ (q "/_graphql" :post {:query create-phrase-query :variables {:dictionaryItemId id
-                                                                       :text             "seen"
-                                                                       :defaultUsage     "YES"
-                                                                       :readerFlagUsage  []}})]
+        _                   (q "/_graphql" :post {:query create-phrase-query :variables {:dictionaryItemId id
+                                                                                         :text             "seen"
+                                                                                         :defaultUsage     "YES"
+                                                                                         :readerFlagUsage  []}})]
     (is (nil? errors))
     (is (some? (dict-entity/get-dictionary-item id)))
 
@@ -140,7 +139,7 @@
         (is (= 3 (count phrases)))))))
 
 (deftest ^:integration update-phrase-test
-  (let [query "mutation CreateDictionaryItem($name:String! $partOfSpeech:PartOfSpeech){createDictionaryItem(name:$name partOfSpeech:$partOfSpeech){name partOfSpeech id}}"
+  (let [query               "mutation CreateDictionaryItem($name:String! $partOfSpeech:PartOfSpeech){createDictionaryItem(name:$name partOfSpeech:$partOfSpeech){name partOfSpeech id}}"
         {{{{:keys [id]} :createDictionaryItem} :data} :body}
         (q "/_graphql" :post {:query query :variables {:name "see", :partOfSpeech "V"}})
 
@@ -151,7 +150,7 @@
                                                                      :defaultUsage     "YES"
                                                                      :readerFlagUsage  []}})
 
-        query "mutation UpdatePhrase($id:ID! $text:String!){updatePhrase(id:$id text:$text){text defaultUsage}}"
+        query               "mutation UpdatePhrase($id:ID! $text:String!){updatePhrase(id:$id text:$text){text defaultUsage}}"
         {{{{text :text} :updatePhrase} :data errors :errors} :body}
         (q "/_graphql" :post {:query query :variables {:id   (-> phrases second :id)
                                                        :text "saw"}})]
@@ -159,7 +158,7 @@
     (is (= "saw" text))))
 
 (deftest ^:integration update-phrase-default-usage-test
-  (let [query "mutation CreateDictionaryItem($name:String! $partOfSpeech:PartOfSpeech){createDictionaryItem(name:$name partOfSpeech:$partOfSpeech){name partOfSpeech id}}"
+  (let [query               "mutation CreateDictionaryItem($name:String! $partOfSpeech:PartOfSpeech){createDictionaryItem(name:$name partOfSpeech:$partOfSpeech){name partOfSpeech id}}"
         {{{{:keys [id]} :createDictionaryItem} :data} :body}
         (q "/_graphql" :post {:query query :variables {:name "see", :partOfSpeech "V"}})
 
@@ -170,7 +169,7 @@
                                                                      :defaultUsage     "YES"
                                                                      :readerFlagUsage  []}})
 
-        query "mutation UpdatePhraseDefaultUsage($id:ID! $defaultUsage:DefaultUsage!){updatePhraseDefaultUsage(id:$id defaultUsage:$defaultUsage){text defaultUsage}}"
+        query               "mutation UpdatePhraseDefaultUsage($id:ID! $defaultUsage:DefaultUsage!){updatePhraseDefaultUsage(id:$id defaultUsage:$defaultUsage){text defaultUsage}}"
         {{{{:keys [defaultUsage text]} :updatePhraseDefaultUsage} :data errors :errors} :body}
         (q "/_graphql" :post {:query query :variables {:id           (-> phrases first :id)
                                                        :defaultUsage "YES"}})]
diff --git a/api/test/api/graphql/document_plan_test.clj b/api/test/api/graphql/document_plan_test.clj
index 8f91df486..70f520ae9 100644
--- a/api/test/api/graphql/document_plan_test.clj
+++ b/api/test/api/graphql/document_plan_test.clj
@@ -21,12 +21,12 @@
 
 (deftest ^:integration document-plans-test
   (let [query "mutation createDocumentPlan($uid: ID! $name: String! $kind: String $blocklyXml: String! $documentPlan: String! $dataSampleRow: Int){createDocumentPlan(uid: $uid name: $name kind: $kind blocklyXml: $blocklyXml documentPlan: $documentPlan dataSampleRow: $dataSampleRow){ id uid name blocklyXml documentPlan dataSampleRow createdAt updatedAt updateCount }}"
-        _ (q "/_graphql" :post {:query     query
-                                :variables {:uid          "01"
-                                            :name         "test"
-                                            :kind         "Document"
-                                            :blocklyXml   "<?xml version=\"1.0\" encoding=\"UTF-8\"?><xml/>"
-                                            :documentPlan "\"{}\""}})
+        _     (q "/_graphql" :post {:query     query
+                                    :variables {:uid          "01"
+                                                :name         "test"
+                                                :kind         "Document"
+                                                :blocklyXml   "<?xml version=\"1.0\" encoding=\"UTF-8\"?><xml/>"
+                                                :documentPlan "\"{}\""}})
         query "{documentPlans(offset:%s limit:%s){items{id uid name blocklyXml documentPlan dataSampleId dataSampleRow createdAt updatedAt updateCount} offset limit totalCount}}"
         {{{{:keys [items offset limit totalCount]} :documentPlans} :data errors :errors} :body}
         (q "/_graphql" :post {:query (format query 0 20)})]
@@ -173,12 +173,12 @@
 (deftest ^:integration listing-empty-doc-plans
   (is (= [] (document-plan/list-document-plans user-group/DUMMY-USER-GROUP-ID)))
   (let [query "mutation createDocumentPlan($uid: ID! $name: String! $kind: String $blocklyXml: String! $documentPlan: String! $dataSampleRow: Int){createDocumentPlan(uid: $uid name: $name kind: $kind blocklyXml: $blocklyXml documentPlan: $documentPlan dataSampleRow: $dataSampleRow){ id uid name blocklyXml documentPlan dataSampleRow createdAt updatedAt updateCount }}"
-        _ (q "/_graphql" :post {:query     query
-                                :variables {:uid          "01"
-                                            :name         "test"
-                                            :kind         "Document"
-                                            :blocklyXml   "<?xml version=\"1.0\" encoding=\"UTF-8\"?><xml/>"
-                                            :documentPlan "{}"}})]
+        _     (q "/_graphql" :post {:query     query
+                                    :variables {:uid          "01"
+                                                :name         "test"
+                                                :kind         "Document"
+                                                :blocklyXml   "<?xml version=\"1.0\" encoding=\"UTF-8\"?><xml/>"
+                                                :documentPlan "{}"}})]
     (is (= [{:blocklyXml       "<?xml version=\"1.0\" encoding=\"UTF-8\"?><xml/>"
              :dataSampleId     nil
              :dataSampleMethod nil
diff --git a/api/test/api/graphql/reader_model_test.clj b/api/test/api/graphql/reader_model_test.clj
index cbc9c3929..fac3f107b 100644
--- a/api/test/api/graphql/reader_model_test.clj
+++ b/api/test/api/graphql/reader_model_test.clj
@@ -40,7 +40,6 @@
                                 :variables {:id "Ger"}})]
       (is (= "Cannot find language with code `Ger`." message)))))
 
-
 (deftest ^:integration rw-readers
   (testing "Reader creation"
     (let [query "mutation createReaderFlag($id: ID! $name: String! $flag: String! $defaultUsage: Usage!) { createReaderFlag(id: $id name: $name flag: $flag defaultUsage: $defaultUsage){ id name flag defaultUsage }}"
diff --git a/api/test/api/nlg/enrich/data/data_enrichment_test.clj b/api/test/api/nlg/enrich/data/data_enrichment_test.clj
index dc94bf014..e4b613338 100644
--- a/api/test/api/nlg/enrich/data/data_enrichment_test.clj
+++ b/api/test/api/nlg/enrich/data/data_enrichment_test.clj
@@ -1,32 +1,31 @@
 (ns api.nlg.enrich.data.data-enrichment-test
-  (:require  [clojure.test :refer [deftest is]]
-             [api.nlg.enrich.data :refer [enrich read-rules]]))
+  (:require [clojure.test :refer [deftest is]]
+            [api.nlg.enrich.data :refer [enrich read-rules]]))
 
 (def enrich-config
   [{:filename-pattern #"accounts.csv"
-    :fields
-    [{:name-pattern #"Account"
-      :transformations
-      [{:function :api.nlg.enrich.data.transformations/cleanup
-        :args     {:regex #" \(.*?\)" :replacement ""}}]}
-     {:name-pattern #".*Period .*"
-      :transformations
-      [{:function :api.nlg.enrich.data.transformations/number-approximation
-        :args     {:scale      1000
-                   :language   :en
-                   :formatting :numberwords.domain/bites
-                   :relation   :numberwords.domain/around}}
-       {:function :api.nlg.enrich.data.transformations/add-symbol
-        :args     {:symbol " USD" :position :back}}]}
-     {:name-pattern #"Date"
-      :transformations
-      [{:function :api.nlg.enrich.data.transformations/reformat-date
-        :args     {:input-format  "YYYY-MM-dd HH:mm"
-                   :output-format "YYYY-MM-dd"}}]}
-     {:name-pattern #"Increase"
-      :transformations
-      [{:function :api.nlg.enrich.data.transformations/add-symbol
-        :args     {:symbol "$" :position :front :skip #{\- \+}}}]}]}])
+    :fields           [{:name-pattern #"Account"
+                        :transformations
+                        [{:function :api.nlg.enrich.data.transformations/cleanup
+                          :args     {:regex #" \(.*?\)" :replacement ""}}]}
+                       {:name-pattern #".*Period .*"
+                        :transformations
+                        [{:function :api.nlg.enrich.data.transformations/number-approximation
+                          :args     {:scale      1000
+                                     :language   :en
+                                     :formatting :numberwords.domain/bites
+                                     :relation   :numberwords.domain/around}}
+                         {:function :api.nlg.enrich.data.transformations/add-symbol
+                          :args     {:symbol " USD" :position :back}}]}
+                       {:name-pattern #"Date"
+                        :transformations
+                        [{:function :api.nlg.enrich.data.transformations/reformat-date
+                          :args     {:input-format  "YYYY-MM-dd HH:mm"
+                                     :output-format "YYYY-MM-dd"}}]}
+                       {:name-pattern #"Increase"
+                        :transformations
+                        [{:function :api.nlg.enrich.data.transformations/add-symbol
+                          :args     {:symbol "$" :position :front :skip #{\- \+}}}]}]}])
 
 (def accounts-data
   [{"Account"            "Gross Sales (ID1220)"
@@ -42,15 +41,15 @@
 
 (deftest date-enrichment
   (with-redefs [read-rules (fn [] enrich-config)]
-    (is (= {"Account" "Gross Sales"
+    (is (= {"Account"            "Gross Sales"
             "CurrentPeriod (Q2)" "around 90k USD"
-            "PriorPeriod (Q1)" "around 82k USD"
-            "Increase" "$8429"
-            "Date" "2021-05-03"}
+            "PriorPeriod (Q1)"   "around 82k USD"
+            "Increase"           "$8429"
+            "Date"               "2021-05-03"}
            (enrich "accounts.csv" (first accounts-data))))
-    (is (= {"Account" "Advertising"
+    (is (= {"Account"            "Advertising"
             "CurrentPeriod (Q2)" "around 1k USD"
-            "PriorPeriod (Q1)" "around 1k USD"
-            "Increase" "-$702"
-            "Date" ""}
+            "PriorPeriod (Q1)"   "around 1k USD"
+            "Increase"           "-$702"
+            "Date"               ""}
            (enrich "accounts.csv" (second accounts-data))))))
diff --git a/api/test/api/nlg/enrich/data/transformations_test.clj b/api/test/api/nlg/enrich/data/transformations_test.clj
index 5ddfb23f9..5ddacf488 100644
--- a/api/test/api/nlg/enrich/data/transformations_test.clj
+++ b/api/test/api/nlg/enrich/data/transformations_test.clj
@@ -1,18 +1,18 @@
 (ns api.nlg.enrich.data.transformations-test
-  (:require  [clojure.test :refer [deftest is]]
-             [api.nlg.enrich.data.transformations :as sut]))
+  (:require [clojure.test :refer [deftest is]]
+            [api.nlg.enrich.data.transformations :as sut]))
 
 (deftest cell-approximation
   (is (nil? (sut/number-approximation
-              nil
-              {:scale      100 :language :en
-               :formatting :numberwords.domain/words
-               :relation   :numberwords.domain/around})))
+             nil
+             {:scale      100 :language :en
+              :formatting :numberwords.domain/words
+              :relation   :numberwords.domain/around})))
   (is (= "around 1k" (sut/number-approximation
-              "1040"
-              {:scale      1000 :language :en
-               :formatting :numberwords.domain/bites
-               :relation   :numberwords.domain/around}))))
+                      "1040"
+                      {:scale      1000 :language :en
+                       :formatting :numberwords.domain/bites
+                       :relation   :numberwords.domain/around}))))
 
 (deftest cell-cleanup
   (is (= "product" (sut/cleanup "product (122)" {:regex #" \(.*\)" :replacement ""}))))
diff --git a/api/test/api/resource_test.clj b/api/test/api/resource_test.clj
index 032593bd3..71cfd33e6 100644
--- a/api/test/api/resource_test.clj
+++ b/api/test/api/resource_test.clj
@@ -10,20 +10,20 @@
   (is (= {:id "a bit.1"} (resource/decode-vals {:id "a%20bit.1"}))))
 
 (deftest decode-input
-  (let [request {:httpMethod            "POST",
-                 :queryStringParameters nil,
-                 :headers               {:referer         "http://localhost:8080/",
-                                         :user-agent      "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0",
-                                         :host            "0.0.0.0:3001",
-                                         :content-length  "113",
-                                         :accept-encoding "gzip, deflate",
-                                         :content-type    "application/json",
-                                         :origin          "http://localhost:8080",
-                                         :connection      "keep-alive",
-                                         :accept-language "en-US,en;q=0.5",
-                                         :accept          "*/*",
-                                         :dnt             "1"}
-                 :body                  "{\"documentPlanId\":\"070cd048-b2b9-4890-bdcc-4420ac449c86\",\"readerFlagValues\":{},\"dataId\":\"books.csv\"}",
-                 :pathParameters        {}}
+  (let [request      {:httpMethod            "POST",
+                      :queryStringParameters nil,
+                      :headers               {:referer         "http://localhost:8080/",
+                                              :user-agent      "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0",
+                                              :host            "0.0.0.0:3001",
+                                              :content-length  "113",
+                                              :accept-encoding "gzip, deflate",
+                                              :content-type    "application/json",
+                                              :origin          "http://localhost:8080",
+                                              :connection      "keep-alive",
+                                              :accept-language "en-US,en;q=0.5",
+                                              :accept          "*/*",
+                                              :dnt             "1"}
+                      :body                  "{\"documentPlanId\":\"070cd048-b2b9-4890-bdcc-4420ac449c86\",\"readerFlagValues\":{},\"dataId\":\"books.csv\"}",
+                      :pathParameters        {}}
         input-stream (BufferedInputStream. (ByteArrayInputStream. (.getBytes (json/write-value-as-string request))))]
     (is (some? (resource/decode-input input-stream true)))))
diff --git a/api/test/api/server_test.clj b/api/test/api/server_test.clj
index 89956486f..976dc7c40 100644
--- a/api/test/api/server_test.clj
+++ b/api/test/api/server_test.clj
@@ -18,7 +18,7 @@
       (is (= 200 status))
       (is (= "Failed to parse GraphQL query." message))))
   (testing "NLG endpoint test"
-    (let [data-id (data-files/store! {:filename "test.csv" :content "test\n1"} user-group/DUMMY-USER-GROUP-ID)
+    (let [data-id          (data-files/store! {:filename "test.csv" :content "test\n1"} user-group/DUMMY-USER-GROUP-ID)
           document-plan-id (:id (dp/add-document-plan {:uid "test" :name "test" :documentPlan {}} user-group/DUMMY-USER-GROUP-ID "test"))
           {{result-id :resultId} :body status :status}
           (q "/nlg/" :post {:dataId           data-id
diff --git a/api/test/api/test_utils.clj b/api/test/api/test_utils.clj
index 6c446bb6a..679a489eb 100644
--- a/api/test/api/test_utils.clj
+++ b/api/test/api/test_utils.clj
@@ -49,9 +49,9 @@
 
 (defn load-data-file [filename]
   (data-files/store!
-    {:filename filename
-     :content  (io/file (format "test/resources/data-files/%s" filename))}
-    user-group/DUMMY-USER-GROUP-ID)
+   {:filename filename
+    :content  (io/file (format "test/resources/data-files/%s" filename))}
+   user-group/DUMMY-USER-GROUP-ID)
   filename)
 
 (defn load-document-plan [filename]
@@ -80,7 +80,7 @@
                                                         :dataId           (if (some? data-file-name)
                                                                             (load-data-file data-file-name)
                                                                             "")}
-                                                       (false? async) (assoc :async false)))]
+                                                 (false? async) (assoc :async false)))]
     (when (= 200 status)
       (if (false? async) body (get-result (:resultId body))))))
 
diff --git a/api/test/data/document_plan_test.clj b/api/test/data/document_plan_test.clj
index d85b5db4d..5769abe83 100644
--- a/api/test/data/document_plan_test.clj
+++ b/api/test/data/document_plan_test.clj
@@ -11,12 +11,12 @@
     (let [dp {:uid          "01"
               :name         "title-only"
               :documentPlan {:segments
-                                    [{:children
-                                             [{:name  "title"
-                                               :type  "Cell"
-                                               :srcId "isiyTw"}]
-                                      :type  "Segment"
-                                      :srcId "%!Y"}]
+                             [{:children
+                               [{:name  "title"
+                                 :type  "Cell"
+                                 :srcId "isiyTw"}]
+                               :type  "Segment"
+                               :srcId "%!Y"}]
                              :type  "Document-plan"
                              :srcId "G=Rh"}}
           {id :id :as resp} (document-plan/add-document-plan dp user-group/DUMMY-USER-GROUP-ID)]
@@ -26,9 +26,9 @@
 
       (let [{doc-plan :documentPlan} (document-plan/get-document-plan id)]
         (is (= {:segments
-                       [{:children [{:name "title" :type "Cell" :srcId "isiyTw"}]
-                         :type     "Segment"
-                         :srcId    "%!Y"}]
+                [{:children [{:name "title" :type "Cell" :srcId "isiyTw"}]
+                  :type     "Segment"
+                  :srcId    "%!Y"}]
                 :type  "Document-plan"
                 :srcId "G=Rh"}
                doc-plan))))))
@@ -38,19 +38,19 @@
     (let [dp {:uid          "02"
               :name         "authorship"
               :documentPlan {:segments
-                                    [{:children
-                                             [{:type           "AMR" :srcId "W}lSg%-S(rQ*nmVp3fFV"
-                                               :conceptId      "author"
-                                               :dictionaryItem {:name "author" :type "Dictionary-item" :srcId "jirq-V{WgCd+u[sdVWpd" :itemId "VB-author"}
-                                               :roles          [{:name     "agent"
-                                                                 :children [{:name  "authors"
-                                                                             :type  "Cell"
-                                                                             :srcId "uakxT`=!W@8/xV#^orHk"}]}
-                                                                {:name     "co-agent"
-                                                                 :children [{:name "title" :type "Cell" :srcId "X_CwogT+.Z)N@;Mhz.j/"}]}
-                                                                {:name "theme" :children [nil]}]}]
-                                      :type  "Segment"
-                                      :srcId "}0Ci`hF%i?izegwAT[@J"}]
+                             [{:children
+                               [{:type           "AMR" :srcId "W}lSg%-S(rQ*nmVp3fFV"
+                                 :conceptId      "author"
+                                 :dictionaryItem {:name "author" :type "Dictionary-item" :srcId "jirq-V{WgCd+u[sdVWpd" :itemId "VB-author"}
+                                 :roles          [{:name     "agent"
+                                                   :children [{:name  "authors"
+                                                               :type  "Cell"
+                                                               :srcId "uakxT`=!W@8/xV#^orHk"}]}
+                                                  {:name     "co-agent"
+                                                   :children [{:name "title" :type "Cell" :srcId "X_CwogT+.Z)N@;Mhz.j/"}]}
+                                                  {:name "theme" :children [nil]}]}]
+                               :type  "Segment"
+                               :srcId "}0Ci`hF%i?izegwAT[@J"}]
                              :type  "Document-plan"
                              :srcId "eoPNHZ1PSV{MJBwehL^Z"}}
           {id :id :as resp} (document-plan/add-document-plan dp user-group/DUMMY-USER-GROUP-ID)]
diff --git a/api/test/data/row_selection_test.clj b/api/test/data/row_selection_test.clj
index d140d20a9..e07e084e5 100644
--- a/api/test/data/row_selection_test.clj
+++ b/api/test/data/row_selection_test.clj
@@ -1,6 +1,6 @@
 (ns data.row-selection-test
-    (:require [clojure.test :refer [deftest is]]
-              [data.entities.data-files.row-selection :as row-selection]))
+  (:require [clojure.test :refer [deftest is]]
+            [data.entities.data-files.row-selection :as row-selection]))
 
 (deftest test-jaccard-distance
   (is (= 2/3 (row-selection/jaccard-distance
diff --git a/core/test/acc_text/nlg/core_test.clj b/core/test/acc_text/nlg/core_test.clj
index d151121d6..6976d8f5f 100644
--- a/core/test/acc_text/nlg/core_test.clj
+++ b/core/test/acc_text/nlg/core_test.clj
@@ -6,14 +6,14 @@
 
 (deftest ^:integration multi-language-generation
   (let [semantic-graph (test-utils/load-test-semantic-graph "language-test")
-        context (test-utils/load-test-context "language-test")]
+        context        (test-utils/load-test-context "language-test")]
     (are [lang result] (= result (map :text (core/generate-text semantic-graph context lang)))
-                       "Eng" ["There is a text."]
-                       "Est" ["On olemas text."]
-                       "Ger" ["Es gibt einen text."]
-                       "Lav" ["Ir text."]
-                       "Rus" ["Существует text."]
-                       "Spa" ["Hay un text."])))
+      "Eng" ["There is a text."]
+      "Est" ["On olemas text."]
+      "Ger" ["Es gibt einen text."]
+      "Lav" ["Ir text."]
+      "Rus" ["Существует text."]
+      "Spa" ["Hay un text."])))
 
 (deftest ^:integration list-generation
   (let [context {:data       {"product" "product." "fridge" "fridge."}
@@ -49,7 +49,7 @@
                (into #{} (map :text (core/generate-text semantic-graph {} "Eng")))))))
     (testing "List categories"
       (let [semantic-graph (test-utils/load-test-semantic-graph "list-categories-test")
-            context (test-utils/load-test-context "list-categories-test")]
+            context        (test-utils/load-test-context "list-categories-test")]
         (is (= (set (list (str/join " " ["Cat and house." "Cat and house." "Nobody and nothing." "Big and friendly."
                                          "Everywhere and somewhere." "Where and when. Always and always."
                                          "House such that there is a cat and such that there is an apple."
@@ -57,13 +57,13 @@
                (into #{} (map :text (core/generate-text semantic-graph context "Eng")))))))
     (testing "Nested lists"
       (let [semantic-graph (test-utils/load-test-semantic-graph "nested-lists")
-            context (test-utils/load-test-context "nested-lists")]
+            context        (test-utils/load-test-context "nested-lists")]
         (is (= ["If a house or hills then cats and big cats."]
                (map :text (core/generate-text semantic-graph context "Eng"))))))))
 
 (deftest ^:integration amr-generation
   (let [semantic-graph (test-utils/load-test-semantic-graph "amr-test")
-        context (test-utils/load-test-context "amr-test")]
+        context        (test-utils/load-test-context "amr-test")]
     (is (= #{"There is a bill." "There is a door." "There is a fridge." "There is a noise." "There is a product." "There is an interior."
              "There was a bill." "There was a door." "There was a fridge." "There was a noise." "There was a product." "There was an interior."
              "There will be a bill." "There will be a door." "There will be a fridge." "There will be a noise." "There will be a product." "There will be an interior."}
@@ -71,7 +71,7 @@
 
 (deftest ^:integration amr-combining
   (let [semantic-graph (test-utils/load-test-semantic-graph "amr-combine")
-        context (test-utils/load-test-context "amr-combine")]
+        context        (test-utils/load-test-context "amr-combine")]
     (is (= #{"It publishes and it writes."
              "It publishes and there is an author."
              "It writes and it publishes."
@@ -84,26 +84,26 @@
 
 (deftest ^:integration parallel-edge-test
   (let [semantic-graph (test-utils/load-test-semantic-graph "parallel-edge-test")
-        context (test-utils/load-test-context "parallel-edge-test")]
+        context        (test-utils/load-test-context "parallel-edge-test")]
     (is (= ["There is an item."] (map :text (core/generate-text semantic-graph context "Eng"))))))
 
 (deftest ^:integration one-of-generation
   (let [semantic-graph (test-utils/load-test-semantic-graph "one-of-with-str")
-        context (test-utils/load-test-context "one-of-with-str")]
+        context        (test-utils/load-test-context "one-of-with-str")]
     (is (= #{"Apple is green." "Apple is red."}
            (set (map :text
                      (core/generate-text
-                       semantic-graph context "Eng")))))))
+                      semantic-graph context "Eng")))))))
 
 (deftest ^:integration capitalize-test
   (let [semantic-graph (test-utils/load-test-semantic-graph "capitalize-test")
-        context (test-utils/load-test-context "capitalize-test")]
+        context        (test-utils/load-test-context "capitalize-test")]
     (is (= ["One has one. One has a two.\nOne has a three."] (map :text (core/generate-text semantic-graph context "Eng"))))))
 
 (deftest ^:integration modifier-test
   (testing "Simple modifiers"
     (let [semantic-graph (test-utils/load-test-semantic-graph "modifier-test")
-          context (test-utils/load-test-context "modifier-test")]
+          context        (test-utils/load-test-context "modifier-test")]
       (is (= (->> ["Good eatery" "good chinese eatery" "cafe is nice" "nice cafe"
                    "excellent to find" "it is here that it looks" "to look here" "venue there"
                    "it is here that there is restaurant" "delicious to try" "excellent that eatery is a delicious decent cafe"
@@ -113,7 +113,7 @@
              (map :text (core/generate-text semantic-graph context "Eng"))))))
   (testing "Complex modifiers"
     (let [semantic-graph (test-utils/load-test-semantic-graph "complex-modifiers")
-          context (test-utils/load-test-context "complex-modifiers")]
+          context        (test-utils/load-test-context "complex-modifiers")]
       (is (= #{"Big house because there are these cats please."
                "Big house because there are these cats."
                "Big house such that there is an apple and such that there is a cat?"
@@ -122,14 +122,14 @@
 
 (deftest ^:integration template-amr
   (let [semantic-graph (test-utils/load-test-semantic-graph "template-amr")
-        context (test-utils/load-test-context "template-amr")]
+        context        (test-utils/load-test-context "template-amr")]
     (is (= ["A house is built to last. An object is built to last."]
            (map :text (core/generate-text semantic-graph context "Eng"))))))
 
 (deftest ^:integration empty-amr-pruning
-  (let [semantic-graph (test-utils/load-test-semantic-graph "sequence-with-amrs")
+  (let [semantic-graph                (test-utils/load-test-semantic-graph "sequence-with-amrs")
         semantic-graph-with-empty-amr (test-utils/load-test-semantic-graph "sequence-with-amrs-empty")
-        context (test-utils/load-test-context "sequence-with-amrs")]
+        context                       (test-utils/load-test-context "sequence-with-amrs")]
     (is (= ["There is a thing, there is an other thing and there is a third thing."]
            (map :text (core/generate-text semantic-graph context "Eng"))))
     (is (= ["There is a thing and there is an other thing."]
@@ -147,7 +147,7 @@
 
 (deftest ^:integration complex-amr-generation
   (let [semantic-graph (test-utils/load-test-semantic-graph "complex-amr-test")
-        context (test-utils/load-test-context "complex-amr-test")]
+        context        (test-utils/load-test-context "complex-amr-test")]
     (is (= ["House on the hill. Cat on the hill. Big house on the hill. Big cat on the hill."]
            (map :text (core/generate-text semantic-graph context "Eng"))))))
 
diff --git a/core/test/acc_text/nlg/dictionary_test.clj b/core/test/acc_text/nlg/dictionary_test.clj
index d531f24ef..ad8c351be 100644
--- a/core/test/acc_text/nlg/dictionary_test.clj
+++ b/core/test/acc_text/nlg/dictionary_test.clj
@@ -12,23 +12,23 @@
 
 (deftest ^:integration dictionary-item-generation
   (are [result dict-item]
-    (let [dict-item-graph (resolve-dict-item (add-ns dict-item))
-          document-plan (gen-id)
-          segment (gen-id)
-          semantic-graph (-> dict-item-graph
-                             (update ::sg/concepts concat [{:id   document-plan
-                                                            :type :document-plan}
-                                                           {:id   segment
-                                                            :type :segment}])
-                             (update ::sg/relations concat [{:from  document-plan
-                                                             :to    segment
-                                                             :role  :segment
-                                                             :index 0}
-                                                            {:from  segment
-                                                             :to    (find-root dict-item-graph)
-                                                             :role  :instance
-                                                             :index 0}]))]
-      (is (= result (map :text (generate-text semantic-graph {} "Eng")))))
+       (let [dict-item-graph (resolve-dict-item (add-ns dict-item))
+             document-plan   (gen-id)
+             segment         (gen-id)
+             semantic-graph  (-> dict-item-graph
+                                 (update ::sg/concepts concat [{:id   document-plan
+                                                                :type :document-plan}
+                                                               {:id   segment
+                                                                :type :segment}])
+                                 (update ::sg/relations concat [{:from  document-plan
+                                                                 :to    segment
+                                                                 :role  :segment
+                                                                 :index 0}
+                                                                {:from  segment
+                                                                 :to    (find-root dict-item-graph)
+                                                                 :role  :instance
+                                                                 :index 0}]))]
+         (is (= result (map :text (generate-text semantic-graph {} "Eng")))))
 
     ["Good."] #::dict-item{:key      "good_A"
                            :category "A"
@@ -140,559 +140,559 @@
 
 (deftest ^:integration complex-dict-item-generation
   (testing "V3"
-    (let [dict-item (add-ns #::dict-item{:key        "speak_V3"
-                                         :category   "V3"
-                                         :language   "Eng"
-                                         :forms      ["speak" "spoke" "spoken"]
-                                         :attributes {"Prep" "with"
-                                                      "Post" "about"}})
+    (let [dict-item       (add-ns #::dict-item{:key        "speak_V3"
+                                               :category   "V3"
+                                               :language   "Eng"
+                                               :forms      ["speak" "spoke" "spoken"]
+                                               :attributes {"Prep" "with"
+                                                            "Post" "about"}})
           dict-item-graph (resolve-dict-item dict-item)
-          document-plan (gen-id)
-          segment (gen-id)
-          operation (gen-id)
-          arg2 (gen-id)
-          arg3 (gen-id)
-          semantic-graph (-> dict-item-graph
-                             (update ::sg/concepts concat [{:id   document-plan
-                                                            :type :document-plan}
-                                                           {:id   segment
-                                                            :type :segment}
-                                                           {:id       operation
-                                                            :type     :operation
-                                                            :name     "mkVP"
-                                                            :label    "Syntax.mkVP/V3->NP->NP->VP"
-                                                            :category "VP"
-                                                            :module   "Syntax"}
-                                                           {:id       arg2
-                                                            :type     :operation
-                                                            :name     "everybody_NP"
-                                                            :label    "Syntax.everybody_NP/NP"
-                                                            :category "NP"
-                                                            :module   "Syntax"}
-                                                           {:id       arg3
-                                                            :type     :operation
-                                                            :name     "everything_NP"
-                                                            :label    "Syntax.everything_NP/NP"
-                                                            :category "NP"
-                                                            :module   "Syntax"}])
-                             (update ::sg/relations concat [{:from  document-plan
-                                                             :to    segment
-                                                             :role  :segment
-                                                             :index 0}
-                                                            {:from  segment
-                                                             :to    operation
-                                                             :role  :instance
-                                                             :index 0}
-                                                            {:from     operation
-                                                             :to       (find-root dict-item-graph)
-                                                             :role     :arg
-                                                             :category "V3"
-                                                             :index    0}
-                                                            {:from     operation
-                                                             :to       arg2
-                                                             :role     :arg
+          document-plan   (gen-id)
+          segment         (gen-id)
+          operation       (gen-id)
+          arg2            (gen-id)
+          arg3            (gen-id)
+          semantic-graph  (-> dict-item-graph
+                              (update ::sg/concepts concat [{:id   document-plan
+                                                             :type :document-plan}
+                                                            {:id   segment
+                                                             :type :segment}
+                                                            {:id       operation
+                                                             :type     :operation
+                                                             :name     "mkVP"
+                                                             :label    "Syntax.mkVP/V3->NP->NP->VP"
+                                                             :category "VP"
+                                                             :module   "Syntax"}
+                                                            {:id       arg2
+                                                             :type     :operation
+                                                             :name     "everybody_NP"
+                                                             :label    "Syntax.everybody_NP/NP"
                                                              :category "NP"
-                                                             :index    1}
-                                                            {:from     operation
-                                                             :to       arg3
-                                                             :role     :arg
+                                                             :module   "Syntax"}
+                                                            {:id       arg3
+                                                             :type     :operation
+                                                             :name     "everything_NP"
+                                                             :label    "Syntax.everything_NP/NP"
                                                              :category "NP"
-                                                             :index    2}]))]
+                                                             :module   "Syntax"}])
+                              (update ::sg/relations concat [{:from  document-plan
+                                                              :to    segment
+                                                              :role  :segment
+                                                              :index 0}
+                                                             {:from  segment
+                                                              :to    operation
+                                                              :role  :instance
+                                                              :index 0}
+                                                             {:from     operation
+                                                              :to       (find-root dict-item-graph)
+                                                              :role     :arg
+                                                              :category "V3"
+                                                              :index    0}
+                                                             {:from     operation
+                                                              :to       arg2
+                                                              :role     :arg
+                                                              :category "NP"
+                                                              :index    1}
+                                                             {:from     operation
+                                                              :to       arg3
+                                                              :role     :arg
+                                                              :category "NP"
+                                                              :index    2}]))]
       (is (= ["To speak with everybody about everything."]
              (map :text (generate-text semantic-graph {} "Eng"))))))
 
   (testing "VA"
-    (let [dict-item (add-ns #::dict-item{:key      "become_VA"
-                                         :category "VA"
-                                         :language "Eng"
-                                         :forms    ["become" "became" "become"]})
+    (let [dict-item       (add-ns #::dict-item{:key      "become_VA"
+                                               :category "VA"
+                                               :language "Eng"
+                                               :forms    ["become" "became" "become"]})
           dict-item-graph (resolve-dict-item dict-item)
-          document-plan (gen-id)
-          segment (gen-id)
-          operation (gen-id)
-          arg (gen-id)
-          semantic-graph (-> dict-item-graph
-                             (update ::sg/concepts concat [{:id   document-plan
-                                                            :type :document-plan}
-                                                           {:id   segment
-                                                            :type :segment}
-                                                           {:id       operation
-                                                            :type     :operation
-                                                            :name     "mkVP"
-                                                            :label    "Syntax.mkVP/VA->AP->VP"
-                                                            :category "VP"
-                                                            :module   "Syntax"}
-                                                           {:id       arg
-                                                            :type     :quote
-                                                            :value    "red"
-                                                            :category "Str"
-                                                            :module   "Syntax"}])
-                             (update ::sg/relations concat [{:from  document-plan
-                                                             :to    segment
-                                                             :role  :segment
-                                                             :index 0}
-                                                            {:from  segment
-                                                             :to    operation
-                                                             :role  :instance
-                                                             :index 0}
-                                                            {:from     operation
-                                                             :to       (find-root dict-item-graph)
-                                                             :role     :arg
-                                                             :category "VA"
-                                                             :index    0}
-                                                            {:from     operation
-                                                             :to       arg
-                                                             :role     :arg
-                                                             :category "AP"
-                                                             :index    1}]))]
+          document-plan   (gen-id)
+          segment         (gen-id)
+          operation       (gen-id)
+          arg             (gen-id)
+          semantic-graph  (-> dict-item-graph
+                              (update ::sg/concepts concat [{:id   document-plan
+                                                             :type :document-plan}
+                                                            {:id   segment
+                                                             :type :segment}
+                                                            {:id       operation
+                                                             :type     :operation
+                                                             :name     "mkVP"
+                                                             :label    "Syntax.mkVP/VA->AP->VP"
+                                                             :category "VP"
+                                                             :module   "Syntax"}
+                                                            {:id       arg
+                                                             :type     :quote
+                                                             :value    "red"
+                                                             :category "Str"
+                                                             :module   "Syntax"}])
+                              (update ::sg/relations concat [{:from  document-plan
+                                                              :to    segment
+                                                              :role  :segment
+                                                              :index 0}
+                                                             {:from  segment
+                                                              :to    operation
+                                                              :role  :instance
+                                                              :index 0}
+                                                             {:from     operation
+                                                              :to       (find-root dict-item-graph)
+                                                              :role     :arg
+                                                              :category "VA"
+                                                              :index    0}
+                                                             {:from     operation
+                                                              :to       arg
+                                                              :role     :arg
+                                                              :category "AP"
+                                                              :index    1}]))]
       (is (= ["To become red."]
              (map :text (generate-text semantic-graph {} "Eng"))))))
 
   (testing "V2A"
-    (let [dict-item (add-ns #::dict-item{:key        "paint_V2A"
-                                         :category   "V2A"
-                                         :language   "Eng"
-                                         :forms      ["paint"]
-                                         :attributes {"Prep" "above"
-                                                      "Post" "with"}})
+    (let [dict-item       (add-ns #::dict-item{:key        "paint_V2A"
+                                               :category   "V2A"
+                                               :language   "Eng"
+                                               :forms      ["paint"]
+                                               :attributes {"Prep" "above"
+                                                            "Post" "with"}})
           dict-item-graph (resolve-dict-item dict-item)
-          document-plan (gen-id)
-          segment (gen-id)
-          operation (gen-id)
-          arg2 (gen-id)
-          arg3 (gen-id)
-          semantic-graph (-> dict-item-graph
-                             (update ::sg/concepts concat [{:id   document-plan
-                                                            :type :document-plan}
-                                                           {:id   segment
-                                                            :type :segment}
-                                                           {:id       operation
-                                                            :type     :operation
-                                                            :name     "mkVP"
-                                                            :label    "Syntax.mkVP/V2A->NP->AP->VP"
-                                                            :category "VP"
-                                                            :module   "Syntax"}
-                                                           {:id       arg2
-                                                            :type     :operation
-                                                            :name     "it_NP"
-                                                            :label    "Syntax.it_NP/NP"
-                                                            :category "NP"
-                                                            :module   "Syntax"}
-                                                           {:id       arg3
-                                                            :type     :quote
-                                                            :value    "red"
-                                                            :category "Str"
-                                                            :module   "Syntax"}])
-                             (update ::sg/relations concat [{:from  document-plan
-                                                             :to    segment
-                                                             :role  :segment
-                                                             :index 0}
-                                                            {:from  segment
-                                                             :to    operation
-                                                             :role  :instance
-                                                             :index 0}
-                                                            {:from     operation
-                                                             :to       (find-root dict-item-graph)
-                                                             :role     :arg
-                                                             :category "V2A"
-                                                             :index    0}
-                                                            {:from     operation
-                                                             :to       arg2
-                                                             :role     :arg
+          document-plan   (gen-id)
+          segment         (gen-id)
+          operation       (gen-id)
+          arg2            (gen-id)
+          arg3            (gen-id)
+          semantic-graph  (-> dict-item-graph
+                              (update ::sg/concepts concat [{:id   document-plan
+                                                             :type :document-plan}
+                                                            {:id   segment
+                                                             :type :segment}
+                                                            {:id       operation
+                                                             :type     :operation
+                                                             :name     "mkVP"
+                                                             :label    "Syntax.mkVP/V2A->NP->AP->VP"
+                                                             :category "VP"
+                                                             :module   "Syntax"}
+                                                            {:id       arg2
+                                                             :type     :operation
+                                                             :name     "it_NP"
+                                                             :label    "Syntax.it_NP/NP"
                                                              :category "NP"
-                                                             :index    1}
-                                                            {:from     operation
-                                                             :to       arg3
-                                                             :role     :arg
-                                                             :category "AP"
-                                                             :index    2}]))]
+                                                             :module   "Syntax"}
+                                                            {:id       arg3
+                                                             :type     :quote
+                                                             :value    "red"
+                                                             :category "Str"
+                                                             :module   "Syntax"}])
+                              (update ::sg/relations concat [{:from  document-plan
+                                                              :to    segment
+                                                              :role  :segment
+                                                              :index 0}
+                                                             {:from  segment
+                                                              :to    operation
+                                                              :role  :instance
+                                                              :index 0}
+                                                             {:from     operation
+                                                              :to       (find-root dict-item-graph)
+                                                              :role     :arg
+                                                              :category "V2A"
+                                                              :index    0}
+                                                             {:from     operation
+                                                              :to       arg2
+                                                              :role     :arg
+                                                              :category "NP"
+                                                              :index    1}
+                                                             {:from     operation
+                                                              :to       arg3
+                                                              :role     :arg
+                                                              :category "AP"
+                                                              :index    2}]))]
       (is (= ["To paint above it with red."]
              (map :text (generate-text semantic-graph {} "Eng"))))))
 
   (testing "VQ"
-    (let [dict-item (add-ns #::dict-item{:key      "wonder_VQ"
-                                         :category "VQ"
-                                         :language "Eng"
-                                         :forms    ["wonder" "wondered"]})
+    (let [dict-item       (add-ns #::dict-item{:key      "wonder_VQ"
+                                               :category "VQ"
+                                               :language "Eng"
+                                               :forms    ["wonder" "wondered"]})
           dict-item-graph (resolve-dict-item dict-item)
-          document-plan (gen-id)
-          segment (gen-id)
-          operation (gen-id)
-          arg (gen-id)
-          semantic-graph (-> dict-item-graph
-                             (update ::sg/concepts concat [{:id   document-plan
-                                                            :type :document-plan}
-                                                           {:id   segment
-                                                            :type :segment}
-                                                           {:id       operation
-                                                            :type     :operation
-                                                            :name     "mkVP"
-                                                            :label    "Syntax.mkVP/VQ->QS->VP"
-                                                            :category "VP"
-                                                            :module   "Syntax"}
-                                                           {:id       arg
-                                                            :type     :operation
-                                                            :name     "it_NP"
-                                                            :label    "Syntax.it_NP/NP"
-                                                            :category "NP"
-                                                            :module   "Syntax"}])
-                             (update ::sg/relations concat [{:from  document-plan
-                                                             :to    segment
-                                                             :role  :segment
-                                                             :index 0}
-                                                            {:from  segment
-                                                             :to    operation
-                                                             :role  :instance
-                                                             :index 0}
-                                                            {:from     operation
-                                                             :to       (find-root dict-item-graph)
-                                                             :role     :arg
-                                                             :category "VQ"
-                                                             :index    0}
-                                                            {:from     operation
-                                                             :to       arg
-                                                             :role     :arg
-                                                             :category "QS"
-                                                             :index    1}]))]
+          document-plan   (gen-id)
+          segment         (gen-id)
+          operation       (gen-id)
+          arg             (gen-id)
+          semantic-graph  (-> dict-item-graph
+                              (update ::sg/concepts concat [{:id   document-plan
+                                                             :type :document-plan}
+                                                            {:id   segment
+                                                             :type :segment}
+                                                            {:id       operation
+                                                             :type     :operation
+                                                             :name     "mkVP"
+                                                             :label    "Syntax.mkVP/VQ->QS->VP"
+                                                             :category "VP"
+                                                             :module   "Syntax"}
+                                                            {:id       arg
+                                                             :type     :operation
+                                                             :name     "it_NP"
+                                                             :label    "Syntax.it_NP/NP"
+                                                             :category "NP"
+                                                             :module   "Syntax"}])
+                              (update ::sg/relations concat [{:from  document-plan
+                                                              :to    segment
+                                                              :role  :segment
+                                                              :index 0}
+                                                             {:from  segment
+                                                              :to    operation
+                                                              :role  :instance
+                                                              :index 0}
+                                                             {:from     operation
+                                                              :to       (find-root dict-item-graph)
+                                                              :role     :arg
+                                                              :category "VQ"
+                                                              :index    0}
+                                                             {:from     operation
+                                                              :to       arg
+                                                              :role     :arg
+                                                              :category "QS"
+                                                              :index    1}]))]
       (is (= ["To wonder if there is it."]
              (map :text (generate-text semantic-graph {} "Eng"))))))
 
   (testing "V2Q"
-    (let [dict-item (add-ns #::dict-item{:key        "ask_V2Q"
-                                         :category   "V2Q"
-                                         :language   "Eng"
-                                         :forms      ["ask"]
-                                         :attributes {"Prep" "about"}})
+    (let [dict-item       (add-ns #::dict-item{:key        "ask_V2Q"
+                                               :category   "V2Q"
+                                               :language   "Eng"
+                                               :forms      ["ask"]
+                                               :attributes {"Prep" "about"}})
           dict-item-graph (resolve-dict-item dict-item)
-          document-plan (gen-id)
-          segment (gen-id)
-          operation (gen-id)
-          arg2 (gen-id)
-          arg3 (gen-id)
-          semantic-graph (-> dict-item-graph
-                             (update ::sg/concepts concat [{:id   document-plan
-                                                            :type :document-plan}
-                                                           {:id   segment
-                                                            :type :segment}
-                                                           {:id       operation
-                                                            :type     :operation
-                                                            :name     "mkVP"
-                                                            :label    "Syntax.mkVP/V2Q->NP->QS->VP"
-                                                            :category "VP"
-                                                            :module   "Syntax"}
-                                                           {:id       arg2
-                                                            :type     :operation
-                                                            :name     "she_NP"
-                                                            :label    "Syntax.she_NP/NP"
-                                                            :category "NP"
-                                                            :module   "Syntax"}
-                                                           {:id       arg3
-                                                            :type     :operation
-                                                            :name     "it_NP"
-                                                            :label    "Syntax.it_NP/NP"
-                                                            :category "NP"
-                                                            :module   "Syntax"}])
-                             (update ::sg/relations concat [{:from  document-plan
-                                                             :to    segment
-                                                             :role  :segment
-                                                             :index 0}
-                                                            {:from  segment
-                                                             :to    operation
-                                                             :role  :instance
-                                                             :index 0}
-                                                            {:from     operation
-                                                             :to       (find-root dict-item-graph)
-                                                             :role     :arg
-                                                             :category "V2Q"
-                                                             :index    0}
-                                                            {:from     operation
-                                                             :to       arg2
-                                                             :role     :arg
+          document-plan   (gen-id)
+          segment         (gen-id)
+          operation       (gen-id)
+          arg2            (gen-id)
+          arg3            (gen-id)
+          semantic-graph  (-> dict-item-graph
+                              (update ::sg/concepts concat [{:id   document-plan
+                                                             :type :document-plan}
+                                                            {:id   segment
+                                                             :type :segment}
+                                                            {:id       operation
+                                                             :type     :operation
+                                                             :name     "mkVP"
+                                                             :label    "Syntax.mkVP/V2Q->NP->QS->VP"
+                                                             :category "VP"
+                                                             :module   "Syntax"}
+                                                            {:id       arg2
+                                                             :type     :operation
+                                                             :name     "she_NP"
+                                                             :label    "Syntax.she_NP/NP"
+                                                             :category "NP"
+                                                             :module   "Syntax"}
+                                                            {:id       arg3
+                                                             :type     :operation
+                                                             :name     "it_NP"
+                                                             :label    "Syntax.it_NP/NP"
                                                              :category "NP"
-                                                             :index    1}
-                                                            {:from     operation
-                                                             :to       arg3
-                                                             :role     :arg
-                                                             :category "QS"
-                                                             :index    2}]))]
+                                                             :module   "Syntax"}])
+                              (update ::sg/relations concat [{:from  document-plan
+                                                              :to    segment
+                                                              :role  :segment
+                                                              :index 0}
+                                                             {:from  segment
+                                                              :to    operation
+                                                              :role  :instance
+                                                              :index 0}
+                                                             {:from     operation
+                                                              :to       (find-root dict-item-graph)
+                                                              :role     :arg
+                                                              :category "V2Q"
+                                                              :index    0}
+                                                             {:from     operation
+                                                              :to       arg2
+                                                              :role     :arg
+                                                              :category "NP"
+                                                              :index    1}
+                                                             {:from     operation
+                                                              :to       arg3
+                                                              :role     :arg
+                                                              :category "QS"
+                                                              :index    2}]))]
       (is (= ["To ask about her if there is it."]
              (map :text (generate-text semantic-graph {} "Eng"))))))
 
   (testing "VS"
-    (let [dict-item (add-ns #::dict-item{:key      "hope_VS"
-                                         :category "VS"
-                                         :language "Eng"
-                                         :forms    ["hope"]})
+    (let [dict-item       (add-ns #::dict-item{:key      "hope_VS"
+                                               :category "VS"
+                                               :language "Eng"
+                                               :forms    ["hope"]})
           dict-item-graph (resolve-dict-item dict-item)
-          document-plan (gen-id)
-          segment (gen-id)
-          operation (gen-id)
-          arg (gen-id)
-          semantic-graph (-> dict-item-graph
-                             (update ::sg/concepts concat [{:id   document-plan
-                                                            :type :document-plan}
-                                                           {:id   segment
-                                                            :type :segment}
-                                                           {:id       operation
-                                                            :type     :operation
-                                                            :name     "mkVP"
-                                                            :label    "Syntax.mkVP/VS->S->VP"
-                                                            :category "VP"
-                                                            :module   "Syntax"}
-                                                           {:id       arg
-                                                            :type     :operation
-                                                            :name     "something_NP"
-                                                            :label    "Syntax.something_NP/NP"
-                                                            :category "NP"
-                                                            :module   "Syntax"}])
-                             (update ::sg/relations concat [{:from  document-plan
-                                                             :to    segment
-                                                             :role  :segment
-                                                             :index 0}
-                                                            {:from  segment
-                                                             :to    operation
-                                                             :role  :instance
-                                                             :index 0}
-                                                            {:from     operation
-                                                             :to       (find-root dict-item-graph)
-                                                             :role     :arg
-                                                             :category "VS"
-                                                             :index    0}
-                                                            {:from     operation
-                                                             :to       arg
-                                                             :role     :arg
-                                                             :category "S"
-                                                             :index    1}]))]
+          document-plan   (gen-id)
+          segment         (gen-id)
+          operation       (gen-id)
+          arg             (gen-id)
+          semantic-graph  (-> dict-item-graph
+                              (update ::sg/concepts concat [{:id   document-plan
+                                                             :type :document-plan}
+                                                            {:id   segment
+                                                             :type :segment}
+                                                            {:id       operation
+                                                             :type     :operation
+                                                             :name     "mkVP"
+                                                             :label    "Syntax.mkVP/VS->S->VP"
+                                                             :category "VP"
+                                                             :module   "Syntax"}
+                                                            {:id       arg
+                                                             :type     :operation
+                                                             :name     "something_NP"
+                                                             :label    "Syntax.something_NP/NP"
+                                                             :category "NP"
+                                                             :module   "Syntax"}])
+                              (update ::sg/relations concat [{:from  document-plan
+                                                              :to    segment
+                                                              :role  :segment
+                                                              :index 0}
+                                                             {:from  segment
+                                                              :to    operation
+                                                              :role  :instance
+                                                              :index 0}
+                                                             {:from     operation
+                                                              :to       (find-root dict-item-graph)
+                                                              :role     :arg
+                                                              :category "VS"
+                                                              :index    0}
+                                                             {:from     operation
+                                                              :to       arg
+                                                              :role     :arg
+                                                              :category "S"
+                                                              :index    1}]))]
       (is (= ["To hope that there is something."]
              (map :text (generate-text semantic-graph {} "Eng"))))))
 
   (testing "V2S"
-    (let [dict-item (add-ns #::dict-item{:key        "answer_V2S"
-                                         :category   "V2S"
-                                         :language   "Eng"
-                                         :forms      ["answer"]
-                                         :attributes {"Prep" "about"}})
+    (let [dict-item       (add-ns #::dict-item{:key        "answer_V2S"
+                                               :category   "V2S"
+                                               :language   "Eng"
+                                               :forms      ["answer"]
+                                               :attributes {"Prep" "about"}})
           dict-item-graph (resolve-dict-item dict-item)
-          document-plan (gen-id)
-          segment (gen-id)
-          operation (gen-id)
-          arg2 (gen-id)
-          arg3 (gen-id)
-          semantic-graph (-> dict-item-graph
-                             (update ::sg/concepts concat [{:id   document-plan
-                                                            :type :document-plan}
-                                                           {:id   segment
-                                                            :type :segment}
-                                                           {:id       operation
-                                                            :type     :operation
-                                                            :name     "mkVP"
-                                                            :label    "Syntax.mkVP/V2S->NP->S->VP"
-                                                            :category "VP"
-                                                            :module   "Syntax"}
-                                                           {:id       arg2
-                                                            :type     :operation
-                                                            :name     "she_NP"
-                                                            :label    "Syntax.she_NP/NP"
-                                                            :category "NP"
-                                                            :module   "Syntax"}
-                                                           {:id       arg3
-                                                            :type     :operation
-                                                            :name     "it_NP"
-                                                            :label    "Syntax.it_NP/NP"
-                                                            :category "NP"
-                                                            :module   "Syntax"}])
-                             (update ::sg/relations concat [{:from  document-plan
-                                                             :to    segment
-                                                             :role  :segment
-                                                             :index 0}
-                                                            {:from  segment
-                                                             :to    operation
-                                                             :role  :instance
-                                                             :index 0}
-                                                            {:from     operation
-                                                             :to       (find-root dict-item-graph)
-                                                             :role     :arg
-                                                             :category "V2S"
-                                                             :index    0}
-                                                            {:from     operation
-                                                             :to       arg2
-                                                             :role     :arg
+          document-plan   (gen-id)
+          segment         (gen-id)
+          operation       (gen-id)
+          arg2            (gen-id)
+          arg3            (gen-id)
+          semantic-graph  (-> dict-item-graph
+                              (update ::sg/concepts concat [{:id   document-plan
+                                                             :type :document-plan}
+                                                            {:id   segment
+                                                             :type :segment}
+                                                            {:id       operation
+                                                             :type     :operation
+                                                             :name     "mkVP"
+                                                             :label    "Syntax.mkVP/V2S->NP->S->VP"
+                                                             :category "VP"
+                                                             :module   "Syntax"}
+                                                            {:id       arg2
+                                                             :type     :operation
+                                                             :name     "she_NP"
+                                                             :label    "Syntax.she_NP/NP"
+                                                             :category "NP"
+                                                             :module   "Syntax"}
+                                                            {:id       arg3
+                                                             :type     :operation
+                                                             :name     "it_NP"
+                                                             :label    "Syntax.it_NP/NP"
                                                              :category "NP"
-                                                             :index    1}
-                                                            {:from     operation
-                                                             :to       arg3
-                                                             :role     :arg
-                                                             :category "S"
-                                                             :index    2}]))]
+                                                             :module   "Syntax"}])
+                              (update ::sg/relations concat [{:from  document-plan
+                                                              :to    segment
+                                                              :role  :segment
+                                                              :index 0}
+                                                             {:from  segment
+                                                              :to    operation
+                                                              :role  :instance
+                                                              :index 0}
+                                                             {:from     operation
+                                                              :to       (find-root dict-item-graph)
+                                                              :role     :arg
+                                                              :category "V2S"
+                                                              :index    0}
+                                                             {:from     operation
+                                                              :to       arg2
+                                                              :role     :arg
+                                                              :category "NP"
+                                                              :index    1}
+                                                             {:from     operation
+                                                              :to       arg3
+                                                              :role     :arg
+                                                              :category "S"
+                                                              :index    2}]))]
       (is (= ["To answer about her that there is it."]
              (map :text (generate-text semantic-graph {} "Eng"))))))
 
   (testing "VV"
-    (let [dict-item (add-ns #::dict-item{:key      "want_VV"
-                                         :category "VV"
-                                         :language "Eng"
-                                         :forms    ["want"]})
+    (let [dict-item       (add-ns #::dict-item{:key      "want_VV"
+                                               :category "VV"
+                                               :language "Eng"
+                                               :forms    ["want"]})
           dict-item-graph (resolve-dict-item dict-item)
-          document-plan (gen-id)
-          segment (gen-id)
-          operation (gen-id)
-          arg (gen-id)
-          semantic-graph (-> dict-item-graph
-                             (update ::sg/concepts concat [{:id   document-plan
-                                                            :type :document-plan}
-                                                           {:id   segment
-                                                            :type :segment}
-                                                           {:id       operation
-                                                            :type     :operation
-                                                            :name     "mkVP"
-                                                            :label    "Syntax.mkVP/VV->VP->VP"
-                                                            :category "VP"
-                                                            :module   "Syntax"}
-                                                           {:id       arg
-                                                            :type     :operation
-                                                            :name     "have_V2"
-                                                            :label    "Syntax.have_V2/V2"
-                                                            :category "V2"
-                                                            :module   "Syntax"}])
-                             (update ::sg/relations concat [{:from  document-plan
-                                                             :to    segment
-                                                             :role  :segment
-                                                             :index 0}
-                                                            {:from  segment
-                                                             :to    operation
-                                                             :role  :instance
-                                                             :index 0}
-                                                            {:from     operation
-                                                             :to       (find-root dict-item-graph)
-                                                             :role     :arg
-                                                             :category "VV"
-                                                             :index    0}
-                                                            {:from     operation
-                                                             :to       arg
-                                                             :role     :arg
+          document-plan   (gen-id)
+          segment         (gen-id)
+          operation       (gen-id)
+          arg             (gen-id)
+          semantic-graph  (-> dict-item-graph
+                              (update ::sg/concepts concat [{:id   document-plan
+                                                             :type :document-plan}
+                                                            {:id   segment
+                                                             :type :segment}
+                                                            {:id       operation
+                                                             :type     :operation
+                                                             :name     "mkVP"
+                                                             :label    "Syntax.mkVP/VV->VP->VP"
                                                              :category "VP"
-                                                             :index    1}]))]
+                                                             :module   "Syntax"}
+                                                            {:id       arg
+                                                             :type     :operation
+                                                             :name     "have_V2"
+                                                             :label    "Syntax.have_V2/V2"
+                                                             :category "V2"
+                                                             :module   "Syntax"}])
+                              (update ::sg/relations concat [{:from  document-plan
+                                                              :to    segment
+                                                              :role  :segment
+                                                              :index 0}
+                                                             {:from  segment
+                                                              :to    operation
+                                                              :role  :instance
+                                                              :index 0}
+                                                             {:from     operation
+                                                              :to       (find-root dict-item-graph)
+                                                              :role     :arg
+                                                              :category "VV"
+                                                              :index    0}
+                                                             {:from     operation
+                                                              :to       arg
+                                                              :role     :arg
+                                                              :category "VP"
+                                                              :index    1}]))]
       (is (= ["To want to have itself."]
              (map :text (generate-text semantic-graph {} "Eng"))))))
 
   (testing "V2V"
-    (let [dict-item (add-ns #::dict-item{:key        "beg_V2V"
-                                         :category   "V2V"
-                                         :language   "Eng"
-                                         :forms      ["beg"]
-                                         :attributes {"Prep" "for"
-                                                      "Post" "to"}})
+    (let [dict-item       (add-ns #::dict-item{:key        "beg_V2V"
+                                               :category   "V2V"
+                                               :language   "Eng"
+                                               :forms      ["beg"]
+                                               :attributes {"Prep" "for"
+                                                            "Post" "to"}})
           dict-item-graph (resolve-dict-item dict-item)
-          document-plan (gen-id)
-          segment (gen-id)
-          operation (gen-id)
-          arg2 (gen-id)
-          arg3 (gen-id)
-          semantic-graph (-> dict-item-graph
-                             (update ::sg/concepts concat [{:id   document-plan
-                                                            :type :document-plan}
-                                                           {:id   segment
-                                                            :type :segment}
-                                                           {:id       operation
-                                                            :type     :operation
-                                                            :name     "mkVP"
-                                                            :label    "Syntax.mkVP/V2V->NP->VP->VP"
-                                                            :category "VP"
-                                                            :module   "Syntax"}
-                                                           {:id       arg2
-                                                            :type     :operation
-                                                            :name     "she_NP"
-                                                            :label    "Syntax.she_NP/NP"
-                                                            :category "NP"
-                                                            :module   "Syntax"}
-                                                           {:id       arg3
-                                                            :type     :operation
-                                                            :name     "have_V2"
-                                                            :label    "Syntax.have_V2/V2"
-                                                            :category "V2"
-                                                            :module   "Syntax"}])
-                             (update ::sg/relations concat [{:from  document-plan
-                                                             :to    segment
-                                                             :role  :segment
-                                                             :index 0}
-                                                            {:from  segment
-                                                             :to    operation
-                                                             :role  :instance
-                                                             :index 0}
-                                                            {:from     operation
-                                                             :to       (find-root dict-item-graph)
-                                                             :role     :arg
-                                                             :category "V2V"
-                                                             :index    0}
-                                                            {:from     operation
-                                                             :to       arg2
-                                                             :role     :arg
-                                                             :category "NP"
-                                                             :index    1}
-                                                            {:from     operation
-                                                             :to       arg3
-                                                             :role     :arg
+          document-plan   (gen-id)
+          segment         (gen-id)
+          operation       (gen-id)
+          arg2            (gen-id)
+          arg3            (gen-id)
+          semantic-graph  (-> dict-item-graph
+                              (update ::sg/concepts concat [{:id   document-plan
+                                                             :type :document-plan}
+                                                            {:id   segment
+                                                             :type :segment}
+                                                            {:id       operation
+                                                             :type     :operation
+                                                             :name     "mkVP"
+                                                             :label    "Syntax.mkVP/V2V->NP->VP->VP"
                                                              :category "VP"
-                                                             :index    2}]))]
+                                                             :module   "Syntax"}
+                                                            {:id       arg2
+                                                             :type     :operation
+                                                             :name     "she_NP"
+                                                             :label    "Syntax.she_NP/NP"
+                                                             :category "NP"
+                                                             :module   "Syntax"}
+                                                            {:id       arg3
+                                                             :type     :operation
+                                                             :name     "have_V2"
+                                                             :label    "Syntax.have_V2/V2"
+                                                             :category "V2"
+                                                             :module   "Syntax"}])
+                              (update ::sg/relations concat [{:from  document-plan
+                                                              :to    segment
+                                                              :role  :segment
+                                                              :index 0}
+                                                             {:from  segment
+                                                              :to    operation
+                                                              :role  :instance
+                                                              :index 0}
+                                                             {:from     operation
+                                                              :to       (find-root dict-item-graph)
+                                                              :role     :arg
+                                                              :category "V2V"
+                                                              :index    0}
+                                                             {:from     operation
+                                                              :to       arg2
+                                                              :role     :arg
+                                                              :category "NP"
+                                                              :index    1}
+                                                             {:from     operation
+                                                              :to       arg3
+                                                              :role     :arg
+                                                              :category "VP"
+                                                              :index    2}]))]
       (is (= ["To beg for her to have herself."]
              (map :text (generate-text semantic-graph {} "Eng"))))))
 
   (testing "Conj"
-    (let [dict-item (add-ns #::dict-item{:key        "and_Conj"
-                                         :category   "Conj"
-                                         :language   "Eng"
-                                         :forms      ["and"]})
+    (let [dict-item       (add-ns #::dict-item{:key      "and_Conj"
+                                               :category "Conj"
+                                               :language "Eng"
+                                               :forms    ["and"]})
           dict-item-graph (resolve-dict-item dict-item)
-          document-plan (gen-id)
-          segment (gen-id)
-          operation (gen-id)
-          arg2 (gen-id)
-          arg3 (gen-id)
-          semantic-graph (-> dict-item-graph
-                             (update ::sg/concepts concat [{:id   document-plan
-                                                            :type :document-plan}
-                                                           {:id   segment
-                                                            :type :segment}
-                                                           {:id       operation
-                                                            :type     :operation
-                                                            :name     "mkAdv"
-                                                            :label    "Syntax.mkAdv/Conj->Adv->Adv->Adv"
-                                                            :category "Adv"
-                                                            :module   "Syntax"}
-                                                           {:id       arg2
-                                                            :type     :operation
-                                                            :name     "here_Adv"
-                                                            :label    "Syntax.here_Adv/Adv"
-                                                            :category "Adv"
-                                                            :module   "Syntax"}
-                                                           {:id       arg3
-                                                            :type     :operation
-                                                            :name     "there_Adv"
-                                                            :label    "Syntax.there_Adv/Adv"
-                                                            :category "Adv"
-                                                            :module   "Syntax"}])
-                             (update ::sg/relations concat [{:from  document-plan
-                                                             :to    segment
-                                                             :role  :segment
-                                                             :index 0}
-                                                            {:from  segment
-                                                             :to    operation
-                                                             :role  :instance
-                                                             :index 0}
-                                                            {:from     operation
-                                                             :to       (find-root dict-item-graph)
-                                                             :role     :arg
-                                                             :category "Conj"
-                                                             :index    0}
-                                                            {:from     operation
-                                                             :to       arg2
-                                                             :role     :arg
+          document-plan   (gen-id)
+          segment         (gen-id)
+          operation       (gen-id)
+          arg2            (gen-id)
+          arg3            (gen-id)
+          semantic-graph  (-> dict-item-graph
+                              (update ::sg/concepts concat [{:id   document-plan
+                                                             :type :document-plan}
+                                                            {:id   segment
+                                                             :type :segment}
+                                                            {:id       operation
+                                                             :type     :operation
+                                                             :name     "mkAdv"
+                                                             :label    "Syntax.mkAdv/Conj->Adv->Adv->Adv"
+                                                             :category "Adv"
+                                                             :module   "Syntax"}
+                                                            {:id       arg2
+                                                             :type     :operation
+                                                             :name     "here_Adv"
+                                                             :label    "Syntax.here_Adv/Adv"
                                                              :category "Adv"
-                                                             :index    1}
-                                                            {:from     operation
-                                                             :to       arg3
-                                                             :role     :arg
+                                                             :module   "Syntax"}
+                                                            {:id       arg3
+                                                             :type     :operation
+                                                             :name     "there_Adv"
+                                                             :label    "Syntax.there_Adv/Adv"
                                                              :category "Adv"
-                                                             :index    2}]))]
+                                                             :module   "Syntax"}])
+                              (update ::sg/relations concat [{:from  document-plan
+                                                              :to    segment
+                                                              :role  :segment
+                                                              :index 0}
+                                                             {:from  segment
+                                                              :to    operation
+                                                              :role  :instance
+                                                              :index 0}
+                                                             {:from     operation
+                                                              :to       (find-root dict-item-graph)
+                                                              :role     :arg
+                                                              :category "Conj"
+                                                              :index    0}
+                                                             {:from     operation
+                                                              :to       arg2
+                                                              :role     :arg
+                                                              :category "Adv"
+                                                              :index    1}
+                                                             {:from     operation
+                                                              :to       arg3
+                                                              :role     :arg
+                                                              :category "Adv"
+                                                              :index    2}]))]
       (is (= ["Here and there."]
              (map :text (generate-text semantic-graph {} "Eng")))))))
diff --git a/core/test/acc_text/nlg/graph/condition_test.clj b/core/test/acc_text/nlg/graph/condition_test.clj
index 3d688569d..5586e9d3a 100644
--- a/core/test/acc_text/nlg/graph/condition_test.clj
+++ b/core/test/acc_text/nlg/graph/condition_test.clj
@@ -12,7 +12,7 @@
 (deftest comparison
   (testing "Result is true"
     (are [operator args]
-      (true? (condition/comparison operator args))
+         (true? (condition/comparison operator args))
       "=" [1 "1" "1.0"]
       "=" ["" "" " "]
       "=" ["Abc" "Abc"]
@@ -30,7 +30,7 @@
       ">=" [2.1 "2"]))
   (testing "Result is false"
     (are [operator args]
-      (false? (condition/comparison operator args))
+         (false? (condition/comparison operator args))
       "=" [1 "1" "1.0001"]
       "=" ["" " " "."]
       "=" ["Abc" "abc"]
diff --git a/core/test/acc_text/nlg/graph/graph_test.clj b/core/test/acc_text/nlg/graph/graph_test.clj
index 01e63f27b..e071db533 100644
--- a/core/test/acc_text/nlg/graph/graph_test.clj
+++ b/core/test/acc_text/nlg/graph/graph_test.clj
@@ -48,12 +48,12 @@
         (resolve-data ctx))))
 
 (deftest list-with-quotes-attached
-  (let [g     (load-graph "one-of-with-str")
-        red   (-> g (utils/find-nodes {:value "red"}) (ffirst))
-        green (-> g (utils/find-nodes {:value "green"}) (ffirst))
+  (let [g                (load-graph "one-of-with-str")
+        red              (-> g (utils/find-nodes {:value "red"}) (ffirst))
+        green            (-> g (utils/find-nodes {:value "green"}) (ffirst))
 
-        mkA->red   (utils/get-predecessors g red)
-        mkA->green (utils/get-predecessors g green)
+        mkA->red         (utils/get-predecessors g red)
+        mkA->green       (utils/get-predecessors g green)
 
         list->mkA-red    (utils/get-predecessors g (first mkA->red))
         list->mkA-green  (utils/get-predecessors g (first mkA->green))
@@ -91,15 +91,15 @@
 (deftest list-with-the-quotes-attached
   ;;Different from the test above in that that data nodes will have determiners
   ;;in front of them. That is not 'Apple is red' but 'Murderer is in *the* city'
-  (let [g    (load-graph "one-of-with-the-str")
-        city (-> g (utils/find-nodes {:value "city"}) (ffirst))
-        town (-> g (utils/find-nodes {:value "town"}) (ffirst))
+  (let [g          (load-graph "one-of-with-the-str")
+        city       (-> g (utils/find-nodes {:value "city"}) (ffirst))
+        town       (-> g (utils/find-nodes {:value "town"}) (ffirst))
 
         mkNP->city (utils/get-predecessors g city)
         mkNP->town (utils/get-predecessors g town)
 
-        det->city (subset-of-edges-from g (first mkNP->city) #{city})
-        det->town (subset-of-edges-from g (first mkNP->town) #{town})]
+        det->city  (subset-of-edges-from g (first mkNP->city) #{city})
+        det->town  (subset-of-edges-from g (first mkNP->town) #{town})]
 
     (is (not (nil? city)))
     (is (not (nil? town)))
diff --git a/core/test/acc_text/nlg/graph/paths_test.clj b/core/test/acc_text/nlg/graph/paths_test.clj
index 4484af6d2..fd7ff134b 100644
--- a/core/test/acc_text/nlg/graph/paths_test.clj
+++ b/core/test/acc_text/nlg/graph/paths_test.clj
@@ -5,7 +5,7 @@
 
 (deftest ^:integration path-completion
   (let [semantic-graph (load-test-semantic-graph "path-test")
-        context (load-test-context "path-test")]
+        context        (load-test-context "path-test")]
     (is (= #{"To be made of steel."
              "To be made."
              "To make itself."
diff --git a/core/test/acc_text/nlg/semantic_graph/utils_test.clj b/core/test/acc_text/nlg/semantic_graph/utils_test.clj
index c9b0c5e09..148e0a599 100644
--- a/core/test/acc_text/nlg/semantic_graph/utils_test.clj
+++ b/core/test/acc_text/nlg/semantic_graph/utils_test.clj
@@ -7,7 +7,7 @@
 (deftest descendant-search
   (let [semantic-graph (utils/load-test-semantic-graph "author-amr-with-adj")]
     (are [parent-ids descendant-ids]
-      (= descendant-ids (sg-utils/find-descendant-ids semantic-graph parent-ids))
+         (= descendant-ids (sg-utils/find-descendant-ids semantic-graph parent-ids))
       #{:01} #{:02 :03 :04 :05 :06 :07 :08}
       #{:02} #{:03 :04 :05 :06 :07 :08}
       #{:03} #{:04 :05 :06 :07 :08}
@@ -20,14 +20,14 @@
 (deftest child-with-relation-search
   (let [semantic-graph (utils/load-test-semantic-graph "author-amr-with-adj")]
     (are [concept role child]
-      (= child (sg-utils/get-child-with-relation semantic-graph concept role))
+         (= child (sg-utils/get-child-with-relation semantic-graph concept role))
       {:id :05 :type :data :value "authors"} :modifier {:id :07 :type :dictionary-item :value "good" :category "A"}
       {:id :02 :type :segment} :function nil)))
 
 (deftest child-concept-search
   (let [semantic-graph (utils/load-test-semantic-graph "author-amr-with-adj")]
     (are [concept children]
-      (= children (sg-utils/get-children semantic-graph concept))
+         (= children (sg-utils/get-children semantic-graph concept))
       {:id :03 :type :amr :value "author"} [{:id :04 :type :dictionary-item :value "written" :category "V"}
                                             {:id :05 :type :modifier}
                                             {:id :08 :type :data :value "title"}]
@@ -36,7 +36,7 @@
 (deftest concept-with-type-search
   (let [semantic-graph (utils/load-test-semantic-graph "author-amr-with-adj")]
     (are [type concepts]
-      (= concepts (sg-utils/get-concepts-with-type semantic-graph type))
+         (= concepts (sg-utils/get-concepts-with-type semantic-graph type))
       :data [{:id :06 :type :data :value "authors"}
              {:id :08 :type :data :value "title"}]
       :boolean [])))