   (:require-macros [cljs.core.async.macros :refer [go]])
   (:require [om.core :as om :include-macros true]
             [om.dom :as dom :include-macros true]
-            [cljs.core.async :refer [put! chan <!]]))
+            [cljs.core.async :refer [put! chan <!]]
+            [clojure.string :as string]))
 
 (enable-console-print!)
-
-(println "Edits to this text should show up in your developer console.")
-
-;; define your app data so that it doesn't get over-written on reload
 
 (defonce app-state (atom
     {:contacts

                    (dom/span nil (display-name contact))
                    (dom/button #js {:onClick (fn [e] (put! delete @contact))} "Delete")))))

(defn contacts-view [data owner]
  (reify
    om/IInitState

                     (dom/h2 nil "Contact List")
                     (apply dom/ul nil
                            (om/build-all contact-view (:contacts data)
                                          {:init-state {:delete delete}}))
                     (dom/div nil
                              (dom/input #js {:type "text" :ref "new-contact"})
                              (dom/button #js {:onClick #(add-contact data owner)} "Add Contact"))))))

(om/root contacts-view app-state
  {:target (. js/document (getElementById "contacts"))})
