anchor.diff:      {ok, StateName, State}.
   
   terminate(_Reason, _SN, _SD) ->
  +    lager:info("Terminating."),
       ok.
   
   %%%===================================================================
  
positive.code: -export([start_link/4]).
  
  %% Callbacks
  -export([init/1, code_change/4, handle_event/3, handle_info/3,
           handle_sync_event/4, terminate/3]).
  
  %% States
  -export([prepare/2, execute/2, waiting/2, finish_op/3]).
  
  -record(state, {from :: pid(),
                  type :: atom(),
                  log_id,
                  key,
                  error :: [term()],
                  payload = undefined :: term() | undefined,
                  preflist :: preflist()}).
  
negative.code:                             payload=Payload,
                              from=From,
                              preflist=Preflist}) ->
      case Preflist of
          [] ->
              lager:info("Empty preference list!"),
              From ! {error, no_alive_vnode},
              {stop, normal, SD0};
          [H|T] ->
              lager:info("Forwarding to node: ~p", [H]),
              floppy_rep_vnode:operate(H, self(), Type, Key, Payload),
              {next_state, waiting, SD0#state{preflist=T}, ?COORD_TIMEOUT}
      end;
  
  %% @doc Receive result and reply the result to the process that started the fsm (From).
  