    [:button {:on-click (fn []
                          (reset! score "")
                          (clear-message))} "Clear"]
-   [:button {:on-click (fn []
-                         (let [new-score (js/parseInt @score)
-                               points (points @current-player)]
-                           (if (valid-score? new-score points)
-                             (record-score @current-player @score)
-                             (reset! message "Score not valid"))))} "Enter"]])
+   [:button {:on-click submit-score} "Enter"]])
 
 
 

    [:br]
    [:input {:type :text
             :value @score
             :on-change (fn [e] (let [value (str (-> e .-target .-value))
                                      value (apply str (filter #(contains? #{\1 \2 \3 \4 \5 \6 \7 \8 \9 \0} %)
                                                               value))]

(defn clear-message []
  (reset! message ""))

(defn submit-score []
  (let [new-score (js/parseInt @score)
        points (points @current-player)]
    (if (valid-score? new-score points)
      (record-score @current-player @score)
      (reset! message "Score not valid"))))

(defn numpad []
  [:div
   (map (fn [n]
