 (defn reset
   "Resets state."
   [{:keys [cmp-state]}]
-  (reset! cmp-state initial-state))
-
-(defn show-component
-  "Shows eitehr a messages, or snapshots panel."
-  [{:keys [cmp-state msg-payload]}]
-  (swap! cmp-state assoc :view msg-payload)
-  (.setAttribute (.. js/document -body) "view" (name msg-payload)))
+  (reset! cmp-state (initial-state)))
 
 (defn next-younger-message
   [{:keys [cmp-state]}]

(defn persist-settings
  [cmp-state]
  (reset! settings (select-keys @cmp-state persistent-settings)))

(defn correlate-sender-with-receiver
  "Matches message sent over a channel with a received one on the other and (by another component),

                      correlate-sender-with-receiver
                      (assign-message-idx total-messages-count))
        messages-filtered (apply-message-filters cmp-state messages)]
   (when (= :probe-error view) (show-component {:cmp-state cmp-state :msg-payload :cmp/messages}))
   (when (zero? first-message-ts) (swap! cmp-state assoc :first-message-ts (-> messages first :ts)))
   (swap! cmp-state update-in [:total-messages-count] (partial + (count messages)))
   (swap! cmp-state update-in [:messages] (fn [msgs]
