anchor.diff:  
   % Sends an message as mod_copilot@localhost and
   % performs base64-encoding of the attributes
  -route_to_copilot_component(To, Xml) ->
  -  ejabberd_router:route(?JID, To, Xml).
  -
  -route_to_copilot_component(From, To, Xml) ->
  -  ejabberd_router:route(From, To, hash_xml_body(Xml)).
  +route_to_copilot_component(To, Xml) -> route_to_copilot_component(?JID, To, Xml).
  +route_to_copilot_component(From, To, Xml) -> ejabberd_router:route(jlib:string_to_jid(From), jlib:string_to_jid(To), hash_xml_body(Xml)).
   
   hash_xml_body({xmlelement, Tag, Attributes, ChildNodes}) ->
     {xmlelement,
  
positive.code: 
    ejabberd_hooks:delete(set_presence_hook, Host, ?MODULE, on_presence),
  
    application:stop(mongodb),
    application:stop(),
  
    ok.
  
  on_presence(User, Server, Resource, _Packet) ->
    {IPAddress, _} = ejabberd_sm:get_user_ip(User, Server, Resource),
    Data = lookup_ip(IPAddress),
    ?DEBUG("User with the IP address ~p sent a presence from (~p, ~p)", [IPAddress,
                                                                         lists:keyfind(latitude, 1, Data),
                                                                         lists:keyfind(longitude, 1, Data)]),
    report_event(Server, "connect"),
    ok.
  
  %%% Utilities %%%
  % Converts first character to uppercase
  
negative.code:    {"event", Event},
     {Type, Value}].
  
  % Sends a reportEvent command to the Monitor
  report_event(Server, Event) ->
    To = gen_mod:get_module_opt(Server, ?MODULE, monitor_jid, "mon@localhost"),
    XmlBody = {xmlelement, "message", [{"from", ?JID},
  