WIP switching to clojure API
Done switching to clojure API for existing API
Delete most of type castings