Removed all unrelated code from the clojure side, cleaned things up, and
made it comprehensible.