anchor.diff:  stop_instance(Backend, App, From) ->
     gen_server:call(?SERVER, {stop_instance, Backend, App, From}).
   
  +has_app_named(Name) ->
  +  gen_server:call(?SERVER, {has_app_named, Name}).
  +  
  +stop_app(App, From) ->
  +  gen_server:cast(?SERVER, {stop_app, App, From}).
  +
   %%====================================================================
   %% gen_server callbacks
   %%====================================================================
  
positive.code:     available_ports = NewAvailablePorts,
      app_pids = [{Backend#backend.pid, Backend}|AppPids]}
    };
    
  handle_call({stop_instance, Backend, App, From}, _From, #state{current_backends = CurrBackends, available_ports = AvailablePorts} = State) ->
    Port = Backend#backend.port,
    internal_stop_instance(Backend, App, From),
    NewBackends = lists:keydelete(Backend#backend.id, 1, CurrBackends),
    NewAvailablePorts = [Port|AvailablePorts],
    {reply, ok, State#state{current_backends = NewBackends, available_ports = NewAvailablePorts}};
    
  handle_call({can_deploy_new_app}, _From, #state{current_backends = Curr, max_backends = Max} = State) ->
    Reply = (length(Curr) =< Max),
    {reply, Reply, State};
  
negative.code:   ets:new(?MODULE, Opts),
    
    MaxBackends     = ?MAX_BACKENDS_PER_HOST,
    % set a list of ports that the node can use to deploy applications
    AvailablePorts  = lists:seq(?STARTING_PORT, ?STARTING_PORT + MaxBackends),
    
    {ok, #state{
  