anchor.diff:          {SessionId, Headers} ->
               Headers
       end.
  +
  +replaceLastMsg(LastMsg, Html) ->
  +    replaceLastMsg(LastMsg, Html, []).
  +
  +replaceLastMsg([], _Html, Acc) ->
  +    Acc;
  +replaceLastMsg([{SessionId, _OldHtml}|Rest], Html, Acc) ->
  +    replaceLastMsg(Rest, Html, [{SessionId, Html}|Acc]).
positive.code:     {list_to_integer(Year), list_to_integer(Month), list_to_integer(Day)}.
  
  keepAliveSessions(SessionTuple) ->
      lists:filter(fun ({Pid, _}) -> is_process_alive(Pid) end, SessionTuple).
  
  getSessionId({_Message, SessionId, _Env, _Input}) ->
      SessionId;
  
negative.code:                                                  messages    = Messages}) ->
      {noreply, State#state{messages = [flattenMsg(Html)|Messages]}};
  handle_cast({appendToPage, Html}, State = #state{subscribers = Subs,
                                                   messages    = Messages,
                                                   lastMsg     = LastMsg}) ->
      FlatMsg   = flattenMsg(Html),
      Messages2 = [FlatMsg|Messages],
      [gen_server:reply(From, Messages2) || From <- Subs],
  
      LastMsg2 = replaceLastMsg(LastMsg, FlatMsg),
      {noreply, State#state{messages    = Messages2,
                            lastMsg     = LastMsg2,
                            subscribers = []}};
  handle_cast(clearPage, State) ->
      {noreply, State#state{messages = [], subscribers = [], lastMsg = []}};
  