anchor.diff:  
   % API
   -export([start_link/1]).
  --export([add_entity/1, remove_entity/1, get_entity/1, update_entity_state/3]).
  --export([add_watcher/2, remove_watcher/2, send_to_watchers/2]).
  +-export([add_entity/2, remove_entity/2, get_entity/2, update_entity_state/4]).
  +-export([add_watcher/3, remove_watcher/3, send_to_watchers/2]).
  +-export([client_request/6, client_event/5]).
   
   % gen_server
   -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
   
   % Simulation interval
   -define(INTERVAL, 17). % 1/60th of a second.
  +
  +% Full Update interval
  +-define(FULL_INTERVAL, 30000). % 30 seconds.
   
   -record(state, {
   	entities :: dict()
  
positive.code: %%%
  %%% --------------------------------------------------------------------------------------------------------------------
  
  
  -module(pre_entity_engine).
  -behavior(gen_server).
  
  
negative.code: 	gen_server:start_link({local, ?MODULE}, ?MODULE, Args, []).
  
  %% --------------------------------------------------------------------------------------------------------------------
  %% Enitty API
  %% --------------------------------------------------------------------------------------------------------------------
  
  %% @doc Adds the given entity to our simulation list.
  %%
  %% This assumes we are being passed a valid entity record, and adds it to our simulation list.
  -spec add_entity(Pid::pid(), Entity::#entity{}) ->
  	ok | {error, Msg::list()}.
  
  add_entity(Pid, Entity) ->
  	gen_server:call(Pid, {add, Entity}).
  
  %% --------------------------------------------------------------------------------------------------------------------
  
  %% @doc Removes the entity given by id from the simulation list.
  %%
  %% Removed the given entity from the simulation list.
  -spec remove_entity(Pid::pid(), EntityID::binary()) ->
  	ok | not_found | {error, Msg::list()}.
  
  remove_entity(Pid, EntityID) ->
  	gen_server:call(Pid, {remove, EntityID}).
  
  %% --------------------------------------------------------------------------------------------------------------------
  
  %% @doc Retrieves an entity by id.
  %%
  %% Looks up the entity by id and returns it.
  -spec get_entity(Pid::pid(), EntityID::binary()) ->
  	{ok, Entity::#entity{}} | not_found | {error, Msg::list()}.
  
  get_entity(Pid, EntityID) ->
  	gen_server:call(Pid, {get, EntityID}).
  
  %% --------------------------------------------------------------------------------------------------------------------
  
  %% @doc Looks up the given entity by id, and then adds it to our simulation list.
  %%
  %% This attempts to look up the entity from pre_data, and then adds it to the simulation list.
  -spec update_entity_state(Pid::pid(), EntityID::binary(), OldState::json(), NewState::json()) ->
  	ok | newer_version | {error, Msg::list()}.
  
  update_entity_state(Pid, EntityID, OldState, NewState) ->
  	gen_server:call(Pid, {update, EntityID, OldState, NewState}).
  
  %% --------------------------------------------------------------------------------------------------------------------
  %% Watcher API
  