   (js/m tag (clj->js attrs) (clj->js values)))
 
 (defn nm
-  "Mithril in Cljs supporting different arguments amounts"
-  ([x]
-   '("Lone tag"))
-  ([x y]
-   (if (= (type y) (type []))
-     '("Tag with children")
-     (if (= (type y) (type {}))
-       '("Lone tag with attrs")
-       '("Tag with text worthy content, I hope"))))
-  ([x y z]
-   (if (= (type z) (type []))
-     '("Tag with attrs and children")
-     '("Tag with attrs and text worthy content, I hope"))))
+  "Mithril in Cljs supporting different call methods"
+  ([tag]
+   (m tag nil nil))
+  ([tag par2]
+   (if (= (type par2) (type []))
+     (m tag nil par2)
+     (if (= (type par2) (type {}))
+       (m tag par2 nil)
+       (m tag nil par2))))
+  ([tag par2 par3]
+   (m tag par2 par3)))
 
 (defn route_param [param]
   "Get param from route params"

                comment (get item "comment" "")
                time (get item "time" "")
                pos (+ start i)]
              (m "tr" nil [(m "td.itemtitle" nil title)
                           (m "td" nil (m "a.link" {:href url} "Link"))
                           (m "td" nil (if (not(= "" referer)) (m "a.link" {:href referer} "Referer")))
                           (m "td" nil (format_time (new js/Date time)))
                           (m "td" nil comment)
                           (m "td" nil
                              [(m "button.pure-button" {:onclick #(edit item pos)} "Edit")
                               (m "button.pure-button" {:onclick #(delete pos)} "Remove")])])))
        (if (< PAGESIZE (count data))
          (subvec data start (+ start PAGESIZE))
          data))]))

        (data_from_db DB))))

(defn viewer [c]
  (nm "div"
     [(nm "div" [(nm "h1" {:style {:color "green"}} "NoteTapp")])
      (nm "#nav"
         [(nm "div"
             (nm "button.pure-button.button-success" {:onclick #(data_to_db DB)} "Save"))])
      (nm "#editor" [(editor (:editing db))])
      (pages)
      (nm "div" [(notes (:data db) (:start db))])]))

(def app {:controller ctrl :view viewer})

;; Routing mode
(aset (.-route js/m) "mode" "hash")
