Fixed protocols to be closer to clojure style.