Adapted for clojure

Some review on the code to match this...