       virtual-dom
 
       :default
-      (let [  ;;virtual-dom (normalize-virtual-element virtual-dom)
-            node (create-dom-node (first virtual-dom))
+      (let [node (create-dom-node (first virtual-dom))
             state (init-element-state! node elem-spec)
             attrs? (second virtual-dom)
             attrs (when (map? attrs?) attrs?)

            (.toString attr-value))
          "")))))

(defn- bind-attr! [element attr-name attr-value node-state]
  (let [attr-name (name attr-name)]
    (cond
      (identical? "style" attr-name)
      (bind-style! element attr-value node-state)

      (identical? 0 (.indexOf attr-name "on-"))
      (bind-event-listener! element (.substring attr-name 3) attr-value node-state)

      :default
      (bind-prop-attr! (get-attr-setter element attr-name)
                       element attr-name attr-value node-state))))

(defn- dispose-child-state [node-state child-key]
  (when-let [child-states (.-child-states node-state)]
      (when-let [state (aget child-states child-key)]
        (set! (.-disposed state) true)
        (when-let [disposed-callback (.-disposed-callback state)]
          (disposed-callback))
        (js-delete child-states child-key))))

(defn- unbind-attr!* [node-state prefix attr-name]
  (let [attr-key (str "-" prefix "." attr-name)]

                           (init-element-state! parent nil))]
      (let [state (get-element-state new-elem)]
        (set! (.-parent-state state) parent-state)
        (register-with-parent-state parent-state (get-node-id new-elem) state)
        state))))

(defn- on-attached [state node]
  (when state
    (when-let [node-attached (.-node-attached state)]
      (node-attached node))))

(defn- replace-node-completely [parent new-elem-spec cur-dom-node top-level]
  (let [new-elem
