fix clojure formatting- move most non-reused functions to defns