anchor.diff:    maybe_register(Nodes, Name, Module).
   
   
  +%%--------------------------------------------------------------------
  +%% @private
  +%% @doc
  +%% Step 4: evaluate the node list to determine if the node should be
  +%% registered, passing the info off to step five if so.
  +%% @end
  +%%--------------------------------------------------------------------
   -spec maybe_register({ok, [node()]} | {error, atom()},
  -                     Name :: atom(),
  -                     Module :: module()) -> ok | error.
  -%% @private
  -%% @doc Step 4: evaluate the node list to determine if the node should be
  -%%      registered, passing the info off to step five if so.
  -%% @end
  -%%
  +  Name :: atom(),
  +  Module :: module()) -> ok | error.
   maybe_register({ok, Nodes}, Name, Module) ->
  -  maybe_register_non_member_node(lists:member(node(), Nodes), Name, Module, Nodes);
  +  maybe_register_non_member_node(lists:member(node(), Nodes),
  +                                 Name, Module, Nodes);
   maybe_register({error, Reason}, _, Module) ->
  -  autocluster_log:error("Could not fetch node list from ~p: ~p.", [Module, Reason]),
  +  autocluster_log:error("Could not fetch node list from ~p: ~p.",
  +                        [Module, Reason]),
     error.
   
   
  +%%--------------------------------------------------------------------
  +%% @private
  +%% @doc
  +%% Step 5: If the node is already registered, move on to the next
  +%% phase, if not, register it with the backend passing the response
  +%% to step six.
  +%% @end
  +%%--------------------------------------------------------------------
   -spec maybe_register_non_member_node(true | false,
  -                                     Name :: atom(),
  -                                     Module :: module(),
  -                                     Nodes :: [node()]) -> ok | error.
  -%% @private
  -%% @doc Step 5: If the node is already registered, move on to the next phase,
  -%%      if not, register it with the backend passing the response to step six.
  -%% @end
  -%%
  +  Name :: atom(),
  +  Module :: module(),
  +  Nodes :: [node()]) -> ok | error.
   maybe_register_non_member_node(true, _, _, Nodes) ->
     {ok, Nodes};
   maybe_register_non_member_node(false, Name, Module, Nodes) ->
  
positive.code:   Duration = random:uniform(Max),
    autocluster_log:info("Delaying startup for ~pms.", [Duration]),
    timer:sleep(Duration).
  
negative.code:       maybe_cluster_node(Registered)
    end.
  
  %% Clustering Logic
  
  %%--------------------------------------------------------------------
  %% @private
  %% @doc
  %% Step 1: get the backend type from config and pass it to step two.
  %% @end
  %%--------------------------------------------------------------------
  -spec node_is_registered() -> ok | error.
  node_is_registered() ->
    ensure_registered(autocluster_config:get(backend)).
  
  
  %%--------------------------------------------------------------------
  %% @private
  %% @doc
  %% Step 2: get the module for the backend type and pass it to step three.
  %% @end
  %%--------------------------------------------------------------------
  -spec ensure_registered(atom()) -> ok | error.
  ensure_registered(aws) ->
    autocluster_log:debug("Using AWS backend"),
    ensure_registered(aws, autocluster_aws);
  
  ensure_registered(consul) ->
    autocluster_log:debug("Using consul backend"),
    ensure_registered(consul, autocluster_consul);
  
  ensure_registered(dns) ->
    autocluster_log:debug("Using DNS backend"),
    ensure_registered(dns, autocluster_dns);
  
  ensure_registered(etcd) ->
    autocluster_log:debug("Using etcd backend"),
    ensure_registered(etcd, autocluster_etcd);
  
  ensure_registered(unconfigured) ->
    autocluster_log:error("Backend is not configured"),
    error;
  
  ensure_registered(Backend) ->
    autocluster_log:error("Unsupported backend: ~s.", [Backend]),
    error.
  
  %%--------------------------------------------------------------------
  %% @private
  %% @doc
  %% Step 3: get the list of nodes from the service discovery backend
  %% and pass them to step four to possibly register the node with the
  %% backend.
  %% @end
  %%--------------------------------------------------------------------
  -spec ensure_registered(Name :: atom(), Module :: module())
      -> ok | error.
  ensure_registered(Name, Module) ->
    maybe_delay_startup(),
    autocluster_log:info("Starting ~p registration.", [Name]),
  