anchor.diff:  %%--------------------------------------------------------------------
   process_actions([]) ->
       ok;
  -process_actions(Actions) ->
  -    [{Action} | OtherActions]   = Actions,
  -    Name                        = proplists:get_value(<<"name">>, Action),
  -    ets:insert(actions, {Name, Action}),
  -    process_actions(OtherActions).
  +
  +process_actions(Actions) when true =:= is_list(Actions) ->
  +    [TheAction | OtherActions]  = Actions,
  +    case is_tuple(TheAction) of
  +        true ->
  +            {Action}= TheAction,
  +            Name    = proplists:get_value(<<"name">>, Action),
  +            case (Name /= undefined) of
  +                true ->
  +                    ets:insert(actions, {Name, Action}),
  +                    process_actions(OtherActions);
  +                false ->
  +                    invalid_action_element
  +            end;
  +        false ->
  +            invalid_action
  +    end;
  +
  +process_actions(_Actions) ->
  +    invalid_actions.
   
   %%--------------------------------------------------------------------
   %% @private
  
positive.code: %%--------------------------------------------------------------------
  process_plans([]) ->
      ok;
  process_plans(Plans) ->
      [{Plan} | OtherPlans]   = Plans,
      Name                    = proplists:get_value(<<"name">>, Plan),
      Tree                    = proplists:get_value(<<"tree">>, Plan),
    
      [{table_keys, OldKeys}] = ets:lookup(plans, table_keys),
      NewKeys = [Name | OldKeys],
      ets:insert(plans, {table_keys, NewKeys}),
      ets:insert(plans, {Name, Tree}),
      process_plans(OtherPlans).
  
  %%--------------------------------------------------------------------
  %% @private
  
negative.code: %%--------------------------------------------------------------------
  process_config([]) ->
      ok;
  
  process_config(Configs) when true =:= is_list(Configs) ->
      [Config | OtherConfigs] = Configs,
      case process_config(Config) of
          ok ->
              process_config(OtherConfigs);
          Error ->
              Error
      end;
  
  process_config(TheConfig) when true =:= is_tuple(TheConfig) ->
      {Config} = TheConfig,
      Type     = proplists:get_value(<<"type">>, Config),
      TheArgs  = proplists:get_value(<<"args">>, Config),
      case (undefined /= Type andalso undefined /= TheArgs andalso is_tuple(TheArgs)) of
          true ->
              {Args} = TheArgs,
              ets:insert(barrage, {type, Type}),
              case Type of
                  <<"general">> ->
                      ets:insert(barrage, {enable_general, true}),
                      case proplists:get_value(<<"url">>, Args) of
                          undefined ->
                              invalid_config_arg;
                          URL ->
                              ets:insert(barrage, {url, URL}),
                              ok
                      end;
                  <<"commander">> ->
                      ets:insert(barrage, {enable_commander, true}),
                      Gunners = proplists:get_value(<<"gunners">>, Args),
                      GeneralA= proplists:get_value(<<"general">>, Args),
                      case (Gunners /= undefined andalso GeneralA /= undefined) of
                          true ->
                              General = binary_to_atom(GeneralA, utf8),
                              ets:insert(barrage, {general, General}),
                              ets:insert(barrage, {gunners, Gunners}),
                              ok;
                          false ->
                              invalid_config_arg
                      end;
                  _ ->
                      invalid_config_type
  
              end;
          false ->
              invalid_config
      end;
  
  process_config(_Configs) ->
      invalid_config.
  
  %%--------------------------------------------------------------------
  %% @private
  