 
 (defn check-solution []
   "Returns true if current state of puzzle is a valid solution, false otherwise"
-  (let [problem (cljs.reader/read-string (dommy/attr (sel1 :#puzzle-table) "problem-def"))
+  (let [problem (cljs.reader/read-string (attr (sel1 :#puzzle-table) "problem-def"))
         hor-prob (get problem :left)
         ver-prob (get problem :top)
         hor-size (count ver-prob)

    :empty (do (dommy/remove-class! cell "cell-clicked")
               (dommy/remove-class! cell "cell-rightclicked"))))

(defn cell-style [cell]
  (cond (dommy/has-class? cell "cell-clicked") :filled
        (dommy/has-class? cell "cell-rightclicked") :crossed

(defn ^:export init []
  (when (and js/document
             (aget js/document "getElementById"))
    (dommy/prepend! (sel1 :#puzzle-view) (node [:div#puzzle-table]))
    (show (nonojure.random/generate-puzzle 8 10))))
