    ["-s" "--sort" "Sort paths in alphabetical order"]
    ["-j" "--jobs JOBS" "Number of jobs to run simultaneously"
     :parse-fn #(Integer/parseInt %)
-    :validate [#(< 0 %) "Must be a number > 0"]]
+    :validate [pos? "Must be a number > 0"]]
    [nil "--cassandra-keyspace KEYSPACE"
     (str "Cassandra keyspace. Default: " mstore/default-cassandra-keyspace)]
    ["-O" "--cassandra-options OPTIONS"
     "Cassandra options. Example: \"{:compression :lz4}\""
-    :parse-fn #(read-string %)
+    :parse-fn read-string
     :validate [#(= clojure.lang.PersistentArrayMap (type %))]]
    [nil "--cassandra-channel-size SIZE"
     (str "Cassandra channel size. Default: "
          mstore/default-cassandra-channel-size)
     :parse-fn #(Integer/parseInt %)
-    :validate [#(< 0 %) "Must be a number > 0"]]
+    :validate [pos? "Must be a number > 0"]]
    [nil "--cassandra-batch-size SIZE"
     (str "Cassandra batch size. Default: " mstore/default-cassandra-batch-size)
     :parse-fn #(Integer/parseInt %)
-    :validate [#(< 0 %) "Must be a number > 0"]]
+    :validate [pos? "Must be a number > 0"]]
    [nil "--cassandra-batch-rate RATE" "Cassandra batch rate (batches per second)"
     :parse-fn #(Integer/parseInt %)
-    :validate [#(< 0 %) "Must be a number > 0"]]
+    :validate [pos? "Must be a number > 0"]]
    [nil "--elasticsearch-index INDEX"
     (str "Elasticsearch index. Default: " pstore/default-es-index)]
    [nil "--elasticsearch-scroll-batch-size SIZE"
     (str "Elasticsearch scroll batch size. Default: "
          pstore/default-es-scroll-batch-size)
     :parse-fn #(Integer/parseInt %)
-    :validate [#(< 0 %) "Must be a number > 0"]]
+    :validate [pos? "Must be a number > 0"]]
    [nil "--elasticsearch-scroll-batch-rate RATE"
     "Elasticsearch scroll batch rate (batches per second)"
     :parse-fn #(Integer/parseInt %)
-    :validate [#(< 0 %) "Must be a number > 0"]]
+    :validate [pos? "Must be a number > 0"]]
    [nil "--elasticsearch-delete-request-rate RATE"
     "Elasticsearch delete request rate (requests per second)"
     :parse-fn #(Integer/parseInt %)
-    :validate [#(< 0 %) "Must be a number > 0"]]
+    :validate [pos? "Must be a number > 0"]]
    ["-l" "--log-file FILE" (str "Log file. Default: " clog/default-log-file)]
    ["-L" "--log-level LEVEL"
     (str "Log level (all, trace, debug, info, warn, error, fatal, off). "
          "Default: " clog/default-log-level)
-    :validate [#(or (= (count %) 0)
+    :validate [#(or (zero? (count %))
                     (not= (get logconfig/levels % :not-found) :not-found))
                "Invalid log level"]]
    ["-S" "--stop-on-error" "Stop on first non-fatal error"]

  "Run command."
  [arguments options summary]
  (let [command (first arguments)]
    (when (not (contains? cli-commands command))
      (exit 1 (error-msg [(format "Unknown command: \"%s\"" command)])))
    (apply (resolve (symbol (str "cyanite-remover.cli/run-" command)))
           [command (drop 1 arguments) options summary])))

  [command valid-options options]
  (doseq [option (keys options)]
    (when (and (not (contains? valid-options option))
               (not= option :raw-arguments))
      (exit 1 (error-msg
               [(format "Option \"--%s\" conflicts with the command \"%s\""
                        (name option) command)])))))
