anchor.diff:  
   %@doc Parses JID (username part) of an agent (ex.: agent_s-10829_1_7_18225d4f-e3f7-4c18-9a18-d6c06992d272_-g)
   parse_component_jid(User) ->
  -  lists:zip([component, version, cores, jobs, uuid, ukn], strings:tokens(User, "_")).
  +  lists:zip([component, version, cores, jobs, uuid, ukn], lists:map(fun utf8/1, strings:tokens(User, "_"))).
   
   %@doc Creates a MonoDB document describing the connection
   doc_create_connection({User, Host, Resource}, IPAddress) ->
  
positive.code: 
  %@doc Handles presence stanzas sent by users
  handle_presence(UserState, {User, Server, Resource} = JID) ->
    {IPAddress, _} = ejabberd:get_user_ip(User, Server, Resource),
    ?DEBUG("User ~p (~p) is ~p", [JID, IPAddress, UserState]),
  
    % Passes over the processing into a new process
    gen_server:cast(?MODULE, {UserState, JID, IPAddress}),
    report_event(Server, UserState),
    ok.
  
  %%% gen_server %%%
  
negative.code:   mongo_do(State, copilot, fun () -> mongo:save(connections, Doc) end);
  handle_cast({disconnect, {User, Host, Resource} = JID, IPAddress}, State) ->
    mongo_do(State, copilot, fun () ->
      Cursor = mongo:find(connections, {user, utf8(User),
                                        host, utf8(Host),
                                        resource, utf8(Resource),
                                        connected, true}),
      NewDoc = doc_close_connection(mongo:next(Cursor), JID, IPAddress),
      mongo:close_cursor(Cursor),
  