anchor.diff:  start_link(SiteProps) when is_list(SiteProps) ->
       {host, Host} = proplists:lookup(host, SiteProps),
       Name = z_utils:name_for_host(?MODULE, Host),
  -    gen_server:start_link({local, Name}, ?MODULE, SiteProps, []).
  -
  +
  +    %% If the notifier crashes the supervisor gets ownership
  +    %% of the observer table. When it restarts the notifier
  +    %% it will give ownership back to the notifier.
  +    ObserverTable = ensure_observer_table(Host),
  +
  +    case gen_server:start_link({local, Name}, ?MODULE, SiteProps, []) of
  +        {ok, P} ->
  +            ets:give_away(ObserverTable, P, observer_table),
  +            {ok, P};
  +        {already_started, P} ->
  +            ets:give_away(ObserverTable, P, observer_table),
  +            {already_started, P};
  +        R -> R
  +    end.
  +
  +% Make sure the observer table exists.
  +%
  +ensure_observer_table(Name) ->
  +    Table = observer_table_name(Name),
  +    case ets:info(Table) of
  +        undefined -> ets:new(Table, [named_table, set, {keypos, 1}, protected, {heir, self(), []}]);
  +        _ -> Table
  +    end.
  +
  +% Return the name of the observer table
  +%
  +observer_table_name(Context) when is_record(Context, context) ->
  +    observer_table_name(Context#context.host);
  +observer_table_name(Name) when is_atom(Name) ->
  +    z_utils:name_for_host(observers, Name).
   
   %% @doc Start a notifier server for unit testing
   start_tests() ->
       io:format("Starting notifier server.~n"),
  -    gen_server:start_link({local, 'z_notifier$test'}, ?MODULE, [], []).
  +    start_link([{host, test}]).
   
   
   %%====================================================================
  
positive.code:     gen_server:cast(Notifier, {'detach', Event, Observer}).
  
  %% @doc Return all observers for a particular event
  get_observers(Msg, #context{notifier=Notifier}) when is_tuple(Msg) ->
      gen_server:call(Notifier, {'get_observers', element(1, Msg)});
  get_observers(Event, #context{notifier=Notifier}) ->
      gen_server:call(Notifier, {'get_observers', Event}).
  
  
  %%====================================================================
  
negative.code: %%                                  {stop, Reason, State}
  %% @doc Add an observer to an event
  handle_cast({'observe', Event, Observer, Priority}, State) ->
      Event1 = case is_tuple(Event) of true -> element(1,Event); false -> Event end,
          
      PObs = {Priority, Observer},
      UpdatedObservers = case ets:lookup(State#state.observers, Event1) of 
          [] -> [PObs];
          [{Event1, Observers}] -> lists:sort([PObs | Observers])
      end,
      ets:insert(State#state.observers, {Event1, UpdatedObservers}),
  
      {noreply, State};
  
  %% @doc Detach an observer from an event
  handle_cast({'detach', Event, Observer}, State) ->
  	Event1 = case is_tuple(Event) of true -> element(1,Event); false -> Event end,
  
      case ets:lookup(State#state.observers, Event1) of 
          [] -> ok;
          [{Event1, Observers}] -> 
              UpdatedObservers = lists:filter(fun({_Prio,Obs}) -> Obs /= Observer end, Observers),
              ets:insert(State#state.observers, {Event1, UpdatedObservers})
      end,
  
      {noreply, State};
  
  
  %% @doc Detach all observer from an event
  handle_cast({'detach_all', Event}, State) ->
  	Event1 = case is_tuple(Event) of true -> element(1,Event); false -> Event end,
      ets:delete(State#state.observers, Event1),  
      {noreply, State};
  
  
  %% @doc Trap unknown casts
  