anchor.diff:  connection({call, From}, {set_opts, Opts}, StateData) ->
       handle_set_opts(From, Opts, StateData);
   connection({call, From}, dist_get_tls_socket, 
  -           #data{protocol_cb = Connection, 
  -                 transport_cb = Transport,
  -                 socket = Socket,
  -                 connection_pid = Pid, 
  -                 tracker = Tracker} = StateData) ->
  +           #data{static = #static{protocol_cb = Connection,
  +                                  transport_cb = Transport,
  +                                  socket = Socket,
  +                                  connection_pid = Pid,
  +                                  tracker = Tracker}} = StateData) ->
       TLSSocket = Connection:socket([Pid, self()], Transport, Socket, Connection, Tracker),
       {next_state, ?FUNCTION_NAME, StateData, [{reply, From, {ok, TLSSocket}}]};
   connection({call, From}, {dist_handshake_complete, _Node, DHandle},
  -           #data{connection_pid = Pid} = StateData) ->
  +           #data{static = #static{connection_pid = Pid} = Static} = StateData) ->
       ok = erlang:dist_ctrl_input_handler(DHandle, Pid),
       ok = ssl_connection:dist_handshake_complete(Pid, DHandle),
       %% From now on we execute on normal priority
       process_flag(priority, normal),
  -    {keep_state, StateData#data{dist_handle = DHandle},
  +    {keep_state, StateData#data{static = Static#static{dist_handle = DHandle}},
        [{reply,From,ok}|
         case dist_data(DHandle) of
             [] ->
  
positive.code: handshake(internal, {application_packets,_,_}, _) ->
      {keep_state_and_data, [postpone]};
  handshake(cast, {new_write, WritesState, Version}, 
            #data{connection_states = ConnectionStates0} = StateData) ->
      {next_state, connection, 
       StateData#data{connection_states = 
                          ConnectionStates0#{current_write => WritesState},
                     negotiated_version = Version}};
  handshake(info, dist_data, _) ->
      {keep_state_and_data, [postpone]};
  handshake(info, tick, _) ->
  
negative.code:     StateData0#data{connection_states = ConnectionStates}.
  
  send_application_data(Data, From, StateName,
  		       #data{static = #static{connection_pid = Pid,
                                                socket = Socket,
                                                dist_handle = DistHandle,
                                                negotiated_version = Version,
                                                protocol_cb = Connection,
                                                transport_cb = Transport,
                                                renegotiate_at = RenegotiateAt},
                               connection_states = ConnectionStates0} = StateData0) ->
      case time_to_renegotiate(Data, ConnectionStates0, RenegotiateAt) of
  	true ->
  	    ssl_connection:internal_renegotiation(Pid, ConnectionStates0),
  