      (require an-ns)
      (start-system! an-ns)))
   ([an-ns]
-  (do
-    (printf "!! Starting %s\n" an-ns)
-    (if (get @system-status an-ns)
-      (println "!! System possibly running" an-ns)
-      (do
-        (println "!! Refreshing and reloading " an-ns)
-        (remove-ns an-ns)
-        (refresh)
-        (require [an-ns] :reload)
-        (if-let [f (ns-resolve an-ns 'start)]
-          (do
-            (f)
-            (swap! system-status (fn [s] (assoc s an-ns true))))))))))
+   (do
+     (printf "!! Starting %s\n" an-ns)
+     (if (get @system-status an-ns)
+       (println "!! System possibly running" an-ns)
+       (do
+         (println "!! Refreshing and reloading " an-ns)
+         (remove-ns an-ns)
+         (refresh)
+         (require [an-ns] :reload)
+         (if-let [f (ns-resolve an-ns 'start)]
+           (do
+             (f)
+             (swap! system-status (fn [s] (assoc s an-ns true))))))))))
+
 
 (defn stop-system!
   "Given a namespace, usually some-service.user, stop the system. If not passed, stops currently running system"
   ([]
    (stop-system! (first (keys @system-status))))
   ([an-ns]
-  (let [f (ns-resolve an-ns 'stop)]
-    (f)
-    (swap! system-status (fn [s] (assoc s an-ns false))))))
+   (let [f (ns-resolve an-ns 'stop)]
+     (f)
+     (swap! system-status (fn [s] (assoc s an-ns false))))))
+
 
 (defn sys
   "Pull out the system for passing around"
   []
-   (var-get (ns-resolve (first (keys @system-status)) 'SYS)))
+  (var-get (ns-resolve (first (keys @system-status)) 'SYS)))
+
 
 (defn c
   "Pul out a compont from a running system"

  ([]
   (list-ns "./src/")))

(defn find-ns
  "Find namespace vars by a regex"
  [re]
  (filter #(re-find re (str %)) (list-ns)))

(defn find-test-ns
  "Find test namespace vars by a regex"
  [re]
  (filter #(re-find re (str %)) (list-ns "./test/")))

(defn t
  "Run tests via kaocha - either all or a list of vars"
  ([]
   (kaocha.repl/run :unit))
  ([ns-list]
   (apply kaocha.repl/run ns-list)))

(defn t!
  "Run tests via kaocha, but refresh first - runs all tests or a list of vars"
  ([]
   (refresh)
   (kaocha.repl/run :unit))
  ([ns-list]
   (refresh)
   (apply kaocha.repl/run ns-list)))

(def system-status (atom {}))

(defn start-system!
  "Given a namespace, usually some-service, do the following:

          (println v)) (ns-publics 'R))
  ::ok)


(defn init! []
  (ns.repl/disable-reload! *ns*)
  (ns.repl/set-refresh-dirs "src" "test")
  (help))


(defn list-ns
  "Return list of symbols of namespaces found in src dir"
