anchor.diff:  	% If we have an aes key, we assume we need to aes encrypt the message.
   	Data = case State#state.aes_key of
   		undefined ->
  -			pre_json:to_json(Envelope);
  +			pre_json:to_json(envelope_to_json(Envelope));
   		_ ->
   			% Encrypt the envelope
   			aes_encrypt(pre_json:to_json(Envelope), State#state.aes_key, State#state.aes_vector)
  
positive.code: aes_decrypt_envelope(Packet, State) ->
  	json_to_envelope(aes_decrypt(Packet, State)).
  
  % Pull the json message into an envelope record
  json_to_envelope(Json) when is_binary(Json) ->
  	json_to_envelope(pre_json:to_term(Json));
  
negative.code: 
  %% --------------------------------------------------------------------------------------------------------------------
  
  send_envelope(ProtoPid, Envelope) ->
  	gen_server:cast(ProtoPid, {send, Envelope}).
  
  %% --------------------------------------------------------------------------------------------------------------------
  %% gen_server
  