anchor.diff:  
   apply1(M, F, A) ->
       Result = apply(M, F, A),
  -    ?dbg("result: ~p\n", [Result]),
  +    ?dbg("apply: result ~p\n", [Result]),
       Reply = {reply, Result},
       Bin =  bert:to_binary(Reply),
       {ok, Bin}.
  
positive.code: data(Socket, Data, State) when is_binary(Data) ->
      try bert:to_term(Data) of
  	Request ->
  	    ?dbg("data: request: ~w\n", [Request]),
  	    handle_request(Socket, Request, State)
      catch
  	error:_Error ->
  
negative.code:     end.
  
  handle_request(Socket, Request, State) ->
      ?dbg("handle_request: Socket: ~p, Request: ~p, State: ~p~n", 
  	 [Socket, Request, State]),
      case handle_request1(Request, State) of
  	{send, Result} ->
  	    exo_socket:send(Socket, Result),
  	    ?dbg("handle_request: call result ~p sent to socket",[Result]),
  	    {ok, reset_state(State)};
  	{cast, {M, F, A}} ->
  	    %% Transformed MFA
  	    exo_socket:send(Socket, bert:to_binary({noreply})),
  	    ?dbg("handle_request: cast result noreply sent to socket",[]),
  	    try apply(M, F, A) of
  		Value ->
  		    ?dbg("handle_request: cast result ~p",[Value]),
  		    callback(Value, State)
  	    catch
  		error:_Error ->
  		    ?dbg("handle_request: CRASH reason ~p",[_Error]),
  		    {ok, reset_state(State)}
  	    end;
  	{ok, NewState} ->
  	    ?dbg("handle_request: ok result returned",[]),
  	    {ok, NewState};
  	{error, {Code, Detail, Trace} = _E} ->
  	    send_server_error(Socket, Code, Detail, Trace),
  	    ?dbg("handle_request: error result ~p sent to socket",[_E]),
  	    {ok, reset_state(State)};
  	Other ->
  	    %% Transparant
  	    ?dbg("handle_request: other result ~p returned",[Other]),
  	    Other
      end.
  	
   
  
  handle_request1({C,Module,Function,Arguments}, State) 
    when C == call; 
         C == cast->
      handle_call_and_cast({C,Module,Function,Arguments}, 
  			 State#state.access);
  handle_request1({info, callback, Callback}, State) ->
      {ok, State#state { callback = Callback }};
  handle_request1({info, cache, Options}, State) ->
      %% cases: [{validation,Token}]
      {ok, State#state { cache = State#state.cache ++ Options }};
  handle_request1({info, stream, []}, State) ->
      %% client will send call data as a stream
      {ok, State#state { stream = true }};
  handle_request1({noreply}, State) ->
      {noreply, State};
  handle_request1({reply, Reply}, State) ->
      {reply, Reply, State};
  handle_request1({error,_} = Error, State) ->
      {reply, Error, State};
  handle_request1(close, State) ->
      {stop, closed, State};
  handle_request1(_Other, _State) ->
      {error, {?SERV_ERR_UNDESIGNATED, <<"protocol error">>, []}}.
  
  handle_call_and_cast({C,Module,Function,Arguments}, Access) ->
      ?dbg("handle_cc: ~p~n", [{call,Module,Function,Arguments}]),
      case {C, access_test({Module,Function,Arguments}, Access)} of
  	{call, {ok, {M, F, A}}} ->
  	    %% Execute first
  	    try apply1(M, F, A) of
  		{ok, Result} ->
  		    ?dbg("handle_cc: result ~p", [Result]),
  		    {send, Result}
  	    catch
  		error:_Error ->
  		    Trace = erlang:get_stacktrace(),
  		    Detail = list_to_binary(io_lib:format("~p",[_Error])),
  		    ?dbg("handle_cc: crash ~s ~p\n", [Detail,Trace]),
  		    {error, {2, Detail, Trace}}
  	    end;
  	{cast, {ok, {M, F, A}}} ->
  