   end
 
   @spec start_link(root :: atom | boolean, parent :: nil | pid | atom, interval :: ITC.t) :: {:ok, pid} | {:error, reason :: term}
-  def start_link(false, parent, interval) do
-    :gen_server.start_link(__MODULE__, {false, parent, interval}, [])
+  def start_link(false, parent, clock) do
+    :gen_server.start_link(__MODULE__, {false, parent, clock}, [])
   end
-  def start_link(true, parent, interval) do
-    :gen_server.start_link(__MODULE__, {true, parent, interval}, [])
+  def start_link(true, parent, clock) do
+    :gen_server.start_link(__MODULE__, {true, parent, clock}, [])
   end
-  def start_link(name, parent, interval) do
-    :gen_server.start_link({:local, name}, __MODULE__, {true, parent, interval}, [])
+  def start_link(name, parent, clock) do
+    :gen_server.start_link({:local, name}, __MODULE__, {true, parent, clock}, [])
   end
 
   defrecord State, root: false, parent: nil,
-                   interval: nil,
-                   snapshot: nil, children: nil do
+                   clock: nil,
+                   snapshot: nil, log: [],
+                   children: nil do
 
     record_type root: boolean, parent: nil | pid | atom,
-                interval: nil | ITC.t,
-                snapshot: nil | :ets.tid, children: nil | :ets.tid
+                clock: nil | ITC.t,
+                snapshot: nil | :ets.tid, log: [Genomu.Transaction.entry],
+                children: nil | :ets.tid
 
     def blank(opts) do
       snapshot = :ets.new(__MODULE__.Snapshot, [:ordered_set])

  @spec fork(pid | atom, root :: atom | boolean) :: ITC.t
  def fork(server), do: fork(server, false)

  defcall fork(root), state: State[interval: i, children: c] = state do
    {new_interval, channel_interval} = ITC.fork(i)
    {:ok, channel} = :supervisor.start_child(Genomu.Sup.Channels, [root, self, channel_interval])
    Process.monitor(channel)
    :ets.insert(c, [{channel, channel_interval},
                    {channel_interval, channel}])
    state = state.interval(new_interval)
    {:reply, {:ok, channel}, state}
  end

  defcast update(channel, new_interval), state: State[children: c] = state do
    case :ets.lookup(c, channel) do
      [{^channel, interval}] ->
        :ets.insert(c, [{channel, new_interval}, {new_interval, channel}])
        :ets.delete(c, interval)
      [] -> 
        :ok # TODO: log a warning?
    end

    {:stop, :normal, state}
  end

  @spec next_clock(ITC.t, Genomu.command) :: ITC.t
  defp next_clock(clock, {:get, _}), do: clock
  defp next_clock(clock, _), do: ITC.event(clock)

  @spec memoize(Genomu.key, Genomu.command, ITC.t, State.t) :: State.t
  defp memoize(_key, {:get, _}, _clock, state) do
    state
  end
  defp memoize(key, _cmd, clock, State[] = state) do
    state.clock(clock).memoize(key)
  end

end