anchor.diff:      Len = length(ElemsWithOutZero)*2
           + length(ElemsWithZero),
       HexStr = hex:to_hexstr(Len),
  -    lists:append(HexStr, L).
  -
  -%%--------------------------------------------------------------------
  -%% Function for getting 8 last significant bits of number
  +    lists:flatten([HexStr, L]).
  +
  +%%--------------------------------------------------------------------
  +%% Get 8 last significant bits of number
   %%--------------------------------------------------------------------
   get_8lsb(Integer) ->
       Integer band 255.
   
   %%--------------------------------------------------------------------
  -%% Function for calculating CRC checksum for UCP Message
  -%%--------------------------------------------------------------------
  -calculate_crc(Data) when is_binary(Data) ->
  -    calculate_crc(hex:to_hexstr(Data));
  -
  +%% Calculate CRC checksum for UCP Message
  +%%--------------------------------------------------------------------
   calculate_crc(Data) when is_list(Data) ->
  -    hex:to_hexstr(get_8lsb(lists:sum(Data))).
  -
  -%%--------------------------------------------------------------------
  -%% Function for checking if Char is digit
  +    string:right(integer_to_list(get_8lsb(lists:sum(Data)), 16), 2, $0).
  +
  +%%--------------------------------------------------------------------
  +%% Checks if char is digit
   %%--------------------------------------------------------------------
   is_digit(C) when C > 46, C < 58  -> true;
   is_digit(_) -> false.
   
   %%--------------------------------------------------------------------
  -%% Function for checking if String contains only digits
  +%% Check if string contains only digits
   %%--------------------------------------------------------------------
   has_only_digits(Str) ->
       lists:all(fun(Elem) -> is_digit(Elem) end, Str).
   
   %%--------------------------------------------------------------------
  -%% Function for spliting binary into chunks
  -%%--------------------------------------------------------------------
  -binary_split(Bin, Size) ->
  -    case size(Bin) =< Size of
  -        true ->
  -            [Bin];
  -        false ->
  -            binary_split(Bin, Size, 0, [])
  -    end.
  -
  -binary_split(<<>>, _, _, Acc)->
  -    lists:reverse(Acc);
  -
  -binary_split(Bin, Size, ChunkNo, Acc)->
  -    ToProcess = size(Bin) - length(Acc)*Size,
  -    case ToProcess =< Size of
  -        true ->
  -            binary_split(<<>>, Size, ChunkNo+1,
  -                         [binary:part(Bin, ChunkNo*Size, ToProcess)|Acc]);
  -        false ->
  -            binary_split(Bin, Size, ChunkNo+1,
  -                         [binary:part(Bin, ChunkNo*Size, Size)|Acc])
  -    end.
  -
  -pad_to(Width, Binary) ->
  -     case (Width - size(Binary) rem Width) rem Width
  -       of 0 -> Binary
  -        ; N -> <<Binary/binary, 0:(N*8)>>
  -     end.
  -
  -%%--------------------------------------------------------------------
  -%% Increase with rotate TRN number
  +%% Increase and rotate TRN number
   %%--------------------------------------------------------------------
   get_next_trn(Val) when is_list(Val) ->
       get_next_trn(list_to_integer(Val));
  -get_next_trn(Val) when is_integer(Val) andalso Val > ?MAX_MESSAGE_TRN ->
  +get_next_trn(Val) when is_integer(Val) andalso Val >= ?MAX_MESSAGE_TRN ->
       ?MIN_MESSAGE_TRN;
   get_next_trn(Val) when is_integer(Val) ->
       Val + 1.
  
positive.code: decode_message(_) ->
      {error, invalid_message}.
  
  
  %%--------------------------------------------------------------------
  %% Parse UCP operations
  %%--------------------------------------------------------------------
  
negative.code: parse_body(_Header, _Body) ->
      {error, unsupported_operation}.
  
  %%--------------------------------------------------------------------
  %% Wrap message into delimiters
  %%--------------------------------------------------------------------
  wrap(Message) ->
      binary:list_to_bin([?STX, Message, ?ETX]).
  
  %%--------------------------------------------------------------------
  %% Create delivery text short message notification
  %%--------------------------------------------------------------------
  create_cmd_52(Sender, Receiver, Message) when is_list(Message) ->
      PMsg = hex:to_hexstr(ucp_utils:to_ira(Message)),
      {otoa, OTOA, sender, UCPSender} = ucp_utils:calculate_sender(Sender),
      Body = #ucp_cmd_5x{
  