anchor.diff:    werkzeug:logging(LogAtom, lists:concat(Message)),
     LogAtom.
   
  +%% Used to apply a function on a list. Helper function for sorting.
   apply_on_list([H | T], X, Func) ->
     apply_on_list(T, lists:append(X, [Func(H)]), Func);
   apply_on_list([], X, _) -> X.
   
  +%% Sorts messages in the HBQ
   sort(Messages) ->
     apply_on_list(lists:keysort(1, apply_on_list(Messages, [], fun list_to_tuple/1)), [], fun tuple_to_list/1).
   
  -% inserts an error message into dlq
  +%% Inserts an error message into dlq
   insertErrorMessage(ErrorNNr, DLQ, Config) ->
     From = dlq:expectedNr(DLQ),
     ErrorMsg = "Fehlernachricht fuer Nachrichtennummern " ++ integer_to_list(From) ++ " bis " ++ integer_to_list(ErrorNNr),
     ErrorMessage = [ErrorNNr, ErrorMsg, erlang:now(), erlang:now()],
     dlq:push2DLQ(ErrorMessage, DLQ, Config).
   
  -% handles inserting error message or doing nothing if everything is ok!
  +%% Handles inserting error message or doing nothing if everything is ok!
   handleFaultyHBQ([HBQMessage | HBQRest], [DLQMessages, DLQSize], Config) ->
     HBQLength = length([HBQMessage | HBQRest]),
     [NNr, _MSG, _TSclientin, _TShbqin] = HBQMessage,
  
positive.code: -module(hbq).
  -export([start/0, start/1, hbq/3, apply_on_list/3, sort/1]).
  
  
negative.code:       hbq(HBQNew, DLQNew, Config)
    end.
  
  %% Used to start the HBQ with default config file
  start() ->
    start("./config/server.cfg").
  
  %% Used for starting the HBQ with a custom config file
  start(Configfile) ->
    Config = loadConfig(Configfile),
    {ok, HBQName} = werkzeug:get_config_value(hbqname, Config),
  