         (swap! addrs #(assoc-in % [(:client-addr stream) :outs
                                    [(:accept-addr stream) (:accept-port stream)]
                                    [(:client-port stream)
-                                    (:server-addr stream) (:server-port stream)]] (:msgs stream)))
+                                    (:server-addr stream) (:server-port stream)]]
+                                (:msgs stream)))
         (swap! addrs #(assoc-in % [(:server-addr stream) :outs
                                    [(:accept-addr stream) (:accept-port stream)]
                                    [(:server-port stream)
-                                    (:client-addr stream) (:client-port stream)]] (:msgs stream)))))
+                                    (:client-addr stream) (:client-port stream)]]
+                                (:msgs stream)))))
     (let [naddrs (count @addrs) ; Assign coords.
           conns (sort (mapcat (fn [[addr addr-v]]
-                                (mapcat (fn [[[accept-addr accept-port] accept-addr-port-v]]
+                                (mapcat (fn [[[accept-addr accept-port]
+                                              accept-addr-port-v]]
                                           (map (fn [[[from-port to-addr to-port] msgs]]
                                                  [(not= addr accept-addr)
-                                                  addr accept-addr accept-port from-port])
+                                                  addr accept-addr accept-port
+                                                  from-port])
                                                accept-addr-port-v))
                                         (:outs addr-v)))
                               @addrs))]
       (doall (map-indexed (fn [addr-idx [addr addr-v]]
-                            (swap! coords #(assoc % addr
-                                                  [addr-idx (rem (* (dec naddrs) addr-idx) naddrs)])))
+                            (swap! coords
+                                   #(assoc % addr
+                                           [addr-idx (rem (* (dec naddrs) addr-idx)
+                                                          naddrs)])))
               (sort-by first @addrs)))
       (reduce (fn [prev [is-client addr accept-addr accept-port port]]
                 (let [idx (if (= (first prev) addr) (second prev) 0)]

              (rest prev-msgs)
              moving
              (conj out (render-msg prev-msg "msg-exit"
                                    ["top:" (max 40 (- dist (* line-height (count out)) 70)) "px;"])))
       :else
       (recur (rest curr-msgs)
              prev-msgs

                                 (when (and (= accept-addr addr)
                                            (get (:listens addr-v) accept-port))
                                   ["<div class='listen'>" accept-port "</div>"])
                                 (mapv
                                  (fn [[[from-port to-addr to-port] msgs]]
                                    (let [from-x addr-x
                                          from-y (+ addr-y
                                                    (* line-height
                                                       (get coords [addr from-port])))
                                          [to-addr-x to-addr-y] (calc-xy to-addr)
                                          to-x to-addr-x
                                          to-y (+ to-addr-y
                                                  (* line-height
                                                     (get coords [to-addr to-port])))
                                          dx (- from-x to-x)
                                          dy (- to-y from-y)
                                          rad (Math/atan2 dx dy)
                                          dist (Math/abs (Math/sqrt (+ (* dx dx)
                                                                       (* dy dy))))
                                          prev-msgs (get-in
                                                     @prev-addrs
                                                     [addr :outs
                                                      [accept-addr accept-port]
                                                      [from-port to-addr to-port]])]
                                      ["<div class='port'>"
                                       " <div class='port-info'>"
                                       from-port " --&gt; "
                                       to-addr ":" to-port "</div>"
                                       " <div class='msgs-container'>"
                                       "  <div class='msgs"
                                       (when (= accept-addr addr)
                                         " to-client")
                                       "' style='min-height:" (- dist 60) "px;"
                                       "transform-origin:top left;"
                                       "-ms-transform-origin:top left;"
                                       "-webkit-transform-origin:top left;"
                                       "transform:rotate(" rad "rad);"
                                       "-ms-transform:rotate(" rad "rad);"
                                       "-webkit-transform:rotate(" rad "rad);'>"
                                       (render-msgs msgs prev-msgs dist line-height)
                                       "  </div>"
                                       " </div>"
                                       "</div>"]))
                                  (sort-by first accept-addr-port-v))
                                 "</div>"])
                              (sort-by first (:outs addr-v)))
                        "</div>"]))
