     (map->Signal {:init (:init source)
                   :deps [source]
                   :event-sources {topic events-channel-fn}
-                  :relayed-events #{topic}})))
+                  :message-emitter (event-relay #{topic})})))
 
 (defn mergeseq
   [sigs]
   (map->Signal {:init (:init (first sigs))
                 :message-emitter {:sources sigs
                                   :msg-fn (fn [prev messages]
-                                        (or (first (filter fresh? messages))
-                                            (->Cached (:value prev))))}}))
+                                            (or (first (filter fresh? messages))
+                                                (->Cached (:value prev))))}}))
 
 (defn merge
   [& sigs]

  [x]
  (satisfies? SignalProtocol x))

(defn- relayed-events-message-emitter
  [topics]
  (let [topics (if (set? topics) topics (set topics))]
    (fn [prev [event]]
      (if (contains? topics (:topic event))
        (->Fresh (:value event))
        (->Cached (:value prev))))))

(defrecord Signal
  [init message-emitter relayed-events deps event-sources]
  SignalProtocol
  (signal-deps [_]
    (into #{}
          (filter signal?)
          (or deps (:sources message-emitter))))
  (message-emitter [_]
    (cond
      message-emitter message-emitter
      relayed-events {:sources [:events]
                      :msg-fn (relayed-events-message-emitter relayed-events)})))

(defn values-fn->events-fn
  [value-channel-fn topic]

  ([init] (input init (gen-topic)))
  ([init topic]
   (map->Signal {:init init
                 :message-emitter (event-relay #{topic})}))
  ([init topic value-channel-fn]
   (let [event-channel-fn (values-fn->events-fn value-channel-fn
                                                topic)]
     (map->Signal {:init init
                   :message-emitter (event-relay #{topic})
                   :event-sources {topic event-channel-fn}}))))

(defn constant
