 
 ;; Html
 
-(defrecord Html [html])
+(defrecord Html [html]
 
-(extend-protocol mc/PMimeConvertible
-  Html
-  (to-mime [self]
-      (mc/stream-to-string
-       {:text/html (:html self)})))
+  mc/PMimeConvertible
+  (to-mime [_]
+    (mc/stream-to-string
+     {:text/html html})))
 
 (defn make-html [html]
   (Html. html))
 
 ;; Latex
 
-(defrecord Latex [latex])
+(defrecord Latex [latex]
 
-(extend-protocol mc/PMimeConvertible
-  Latex
-  (to-mime [self]
+  mc/PMimeConvertible
+  (to-mime [_]
     (mc/stream-to-string
-      {:text/latex (:latex self)})))
+     {:text/latex latex})))
 
 (defn make-latex [latex]
   (Latex. latex))


;; Markdown

(defrecord Markdown [markdown])

(extend-protocol mc/PMimeConvertible
  Markdown
  (to-mime [self]
    (mc/stream-to-string
      {:text/markdown (:markdown self)})))

(defn make-markdown [latex]
  (Markdown. latex))


;; Incanter Plot

(defrecord IncanterPlot [chart width height]

  mc/PMimeConvertible
  (to-mime [plot]
    (let [out (io/java.io.ByteArrayOutputStream.)
          {:keys [chart width height]} plot]
