anchor.diff:  initialize_state({Privilege, ApiKey}, Id, Secret, State) ->
     gen_server:cast(self(), {send, list_to_binary(lists:concat([Id, "|", Secret]))}),
     IsReconnect =  ets:lookup(rabbithandlers, Id),
  -  Router = setup_routing(IsReconnect, Id, ApiKey),
  +  Router = initialize_routing(IsReconnect, Id, ApiKey),
     State#state{sessionid = Id, rabbit_handler = Router, api_key = ApiKey, privilege = Privilege}.
   
  -setup_routing(_IsReconnect = [], Id, ApiKey) ->
  +initialize_routing(_IsReconnect = [], Id, ApiKey) ->
     {ok, Router} = gateway_rabbit_sup:start_child(),
     gen_server:call(Router, {ready, self(), Id, ApiKey}),
     Router;
   
  -setup_routing([{Id, {Timer, Router}}], Id, ApiKey) ->
  +initialize_routing([{Id, {Timer, Router}}], Id, ApiKey) ->
      erlang:cancel_timer(Timer),
      gen_server:cast(Router, resume_subs),
      gen_server:cast(Router, {change_protocol, self()}),
  
positive.code:         _     -> verify_secret([null, null])
    end.
  
  connect(#connect{session = Session, api_key = ApiKey}, State = #state{outbound_connection = OutboundConnection}) ->
    [Id, Secret] = verify_secret(Session),
  
    IsValidKey = ctl_handler:lookup_priv(ApiKey),
    initialize_state(IsValidKey, Id, Secret,  State).
  
  initialize_state(ApiKey = false, Id, _, State) ->
    gateway_error:no_valid_api_key(),
    State#state{sessionid = Id};
  
negative.code: call_callback(CBRef, Args, State) ->
    CBRef2 = gateway_reference:set_method(CBRef, <<"callback">>),
    invoke_rpc(CBRef2, Args, State).
  
  
  make_hookchannel_reference(ClientRef) ->
    SessionId = gateway_reference:get_destination_id(ClientRef),
    SystemRef = gateway_reference:client_reference(SessionId, <<"system">>),
  