anchor.diff:    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
  +try_to_connect_to_new_instance(_Bee, 0) -> broken;
  +try_to_connect_to_new_instance(Bee, Attempts) ->
  +  ?LOG(info, "try_to_connect_to_new_instance (~p:~p)", [Bee#bee.host, Bee#bee.port]),
  +  case gen_tcp:connect(Bee#bee.host, Bee#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)
  +      try_to_connect_to_new_instance(Bee, Attempts - 1)
     end.
     
   % Update configuration for an application from a proplist of configuration details
  
positive.code:   {noreply, State};
  
  handle_info({manage_pending_bees}, State) ->
    PendingBackends = 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", [Backends#bee.app_name])
      % end, Backends)
    end, PendingBackends),
    {noreply, State};
  
  handle_info({ping_bees}, State) ->
  
negative.code: 
  % MAINTENANCE
  ping_bees() ->
    ReadyBees = lists:filter(fun(B) -> B#bee.status =:= ready end, bees:all()),
    lists:map(fun(B) ->
      spawn_update_bee_status(B, self(), 10)
    end, ReadyBees),
    ok.
  
  % GARBAGE COLLECTION
  handle_non_ready_bees() ->
    DownBees = lists:filter(fun(B) -> B#bee.status =/= ready andalso B#bee.sticky =:= false end, bees:all()),
    lists:map(fun(B) ->
      spawn(fun() -> try_to_reconnect_to_bee(B, 5) end)
    end, DownBees),
    ok.
  
  % Spawned off process to try to "save" the bee
  