anchor.diff:        %   not logged in at this point.
         Sender ! {self(), user_registered},
         % Finally, we proceed with the new state.
  -      master_actor(NewSubscriptions, Receivers, Channels);
  +      master_actor(NewSubscriptions, Channels);
   
       {Sender, log_in, UserName} ->
         % We first create a receiver and notify all channels the user subscribes to.
  
positive.code:       % We then tell the user to send all future messages to its receiver
        %   instead of us.
        Sender ! {Receiver, logged_in},
        % Finally, we register the receiver to the user's name in our state and proceed.
        master_actor(Subscriptions, gb_trees:insert(UserName, Receiver, Receivers), Channels);
  
      {Sender, log_out, UserName} ->
        % We first notify all channels the user subscribes to and dispose of the receiver.
        log_out(Sender, dict:fetch(UserName, Subscriptions), Channels),
        % We then notify the sender that we successfully logged the user out.
        Sender ! {self(), logged_out},
        % Finally we proceed with the user removed from our receivers tree.
        master_actor(Subscriptions, gb_trees:delete(UserName, Receivers), Channels);
  
      {Sender, Receiver, join_channel, UserName, ChannelName} ->
        % We first subscribe the user to the channel.
  
negative.code: %% @copyright 2016 Dylan Meysmans
  -module(master).
  
  -export([initialize/0, initialize_with/2, master_actor/2, log_in/3]).
  
  -spec initialize() -> pid().
  %% @doc Creates a new master process with no users and no channels.
  initialize() ->
    initialize_with(dict:new(), dict:new()).
  
  -spec initialize_with(Subscriptions :: dict:dict(string(), {user, string(), sets:set(string())}),
                        Channels      :: dict:dict(string(), pid())) -> pid().
  %% @doc Creates a new master process with `Subscriptions', `Receivers',
  %%   and `Channels'.
  initialize_with(Subscriptions, Channels) ->
    Master = spawn_link(?MODULE, master_actor, [Subscriptions, Channels]),
    catch unregister(master_actor),
    register(master_actor, Master),
    Master.
  
  -spec master_actor(Subscriptions :: dict:dict(string(), {user, string(), sets:set(string())}),
                     Channels      :: dict:dict(string(), pid())) -> no_return().
  %% @doc Represents a master process.
  master_actor(Subscriptions, Channels) ->
    receive
      {Sender, register_user, UserName} ->
        % We first create a new user subscribed to no channels.
  