anchor.diff:  % Terminate all instances of every app
   % handle_cast({terminate_all}, State) ->
   %   ?LOG(info, "Terminating all apps", []),
  -%   lists:map(fun(_Name, Backends) ->
  -%     lists:map(fun(Backend) -> app_handler:stop_instance(Backend, State) end, Backends)
  +%   lists:map(fun(_Name, Bees) ->
  +%     lists:map(fun(Bee) -> app_handler:stop_instance(Bee, State) end, Bees)
   %     end, bee_srv:all(instances)),
   %   {reply, ok, State};
     
   % Terminate all the instances of a certain application
   % handle_cast({terminate_app_instances, AppName}, State) ->
  -%   Backends = bee_srv:lookup(instances, AppName),
  -%   lists:map(fun(Backend) -> app_handler:stop_instance(Backend, State) end, Backends),
  +%   Bees = bee_srv:lookup(instances, AppName),
  +%   lists:map(fun(Bee) -> app_handler:stop_instance(Bee, State) end, Bees),
   %   bee_srv:store(instances, AppName, []),
   %   {noreply, State};
   
   handle_cast({request_to_start_new_bee, Name}, State) ->
  -  Backends = bees:find_all_by_name(Name),
  +  Bees = bees:find_all_by_name(Name),
     % Don't start a new bee if there is a pending one
  -  PendingBackends = lists:filter(fun(B) -> B#bee.status =:= pending end, Backends),
  -  io:format("PendingBackends: ~p~n", [PendingBackends]),
  -  case length(PendingBackends) > 0 of
  +  PendingBees = lists:filter(fun(B) -> B#bee.status =:= pending end, Bees),
  +  io:format("PendingBees: ~p~n", [PendingBees]),
  +  case length(PendingBees) > 0 of
       false -> start_new_instance_by_name(Name);
       true -> ok
     end,
  
positive.code:   end).
  
  % Try to connect to the application instance while it's booting up
  try_to_connect_to_new_instance(_Backend, 0) -> broken;
  try_to_connect_to_new_instance(Backend, Attempts) ->
    ?LOG(info, "try_to_connect_to_new_instance (~p:~p)", [Backend#bee.host, Backend#bee.port]),
    case gen_tcp:connect(Backend#bee.host, Backend#bee.port, [binary, {packet, 0}], 2000) of
      {ok, Sock} ->
        gen_tcp:close(Sock),
        ready;
      _ -> 
        timer:sleep(200),
        try_to_connect_to_new_instance(Backend, Attempts - 1)
    end.
    
  % Update configuration for an application from a proplist of configuration details
  
negative.code:   {noreply, State};
  
  handle_info({manage_pending_bees}, State) ->
    PendingBees = lists:filter(fun(B) -> B#bee.status == pending end, bees:all()),
    lists:map(fun(B) ->
        Status = try_to_connect_to_new_instance(B, 10),
        ?NOTIFY({bee, update_status, B, Status})
      % lists:map(fun(B) ->
        % ?LOG(info, "Garbage cleaning up on: ~p", [Bees#bee.app_name])
      % end, Bees)
    end, PendingBees),
    {noreply, State};
  
  handle_info({ping_bees}, State) ->
  