diff --git a/CodingStyle b/CodingStyle
index 13dc27285a16047a7dac3e0408a01767d9c70794..121cf459981296c330ca7e7576725f9db3460296 100644
--- a/CodingStyle
+++ b/CodingStyle
@@ -43,15 +43,15 @@ Doxygen
 
 Example
 =======
-/*! 
+/*!
  * \brief Some structure.
- * 
+ *
  * Longer description.
  */
  struct some_struct {
     /*!
      * \brief This comment does not fit on the same line as the member
-     *        as it is rather large. 
+     *        as it is rather large.
      */
     int fd;
     int flags; /*!< Flags. */
@@ -61,7 +61,7 @@ Example
  * \brief Brief description of some function.
  *
  * Longer description.
- * 
+ *
  * \note This function is deprecated.
  *
  * \warning Do not use this function!
@@ -69,7 +69,7 @@ Example
  * \param param1 Some parameter.
  * \param param2 Other parameter. This one has rather large comment,
  *               so its next line is indented for better readability.
- * 
+ *
  * \retval 0 on success.
  * \retval -1 if some error occured.
  *
diff --git a/Doxyfile b/Doxyfile
index b0163856ae2cd3258b547ac4947dfc73d15d6eba..e7ec75dd9a47005855ff333b18bb4fa0e942ed21 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -14,76 +14,76 @@
 # Project related configuration options
 #---------------------------------------------------------------------------
 
-# This tag specifies the encoding used for all characters in the config file 
-# that follow. The default is UTF-8 which is also the encoding used for all 
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
-# iconv built into libc) for the transcoding. See 
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
 # http://www.gnu.org/software/libiconv for the list of possible encodings.
 
 DOXYFILE_ENCODING      = UTF-8
 
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
 # by quotes) that should identify the project.
 
 PROJECT_NAME           = Knot
 
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
 PROJECT_NUMBER         = 1.1.0
 
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
 # where doxygen was started. If left blank the current directory will be used.
 
 OUTPUT_DIRECTORY       = doc
 
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
-# 4096 sub-directories (in 2 levels) under the output directory of each output 
-# format and will distribute the generated files over these directories. 
-# Enabling this option can be useful when feeding doxygen a huge amount of 
-# source files, where putting all generated files in the same directory would 
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
 # otherwise cause performance problems for the file system.
 
 CREATE_SUBDIRS         = NO
 
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, 
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
 # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
 
 OUTPUT_LANGUAGE        = English
 
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
 # Set to NO to disable this.
 
 BRIEF_MEMBER_DESC      = YES
 
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
 # brief descriptions will be completely suppressed.
 
 REPEAT_BRIEF           = YES
 
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is 
-# used as the annotated text. Otherwise, the brief description is used as-is. 
-# If left blank, the following values are used ("$name" is automatically 
-# replaced with the name of the entity): "The $name class" "The $name widget" 
-# "The $name file" "is" "provides" "specifies" "contains" 
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
 # "represents" "a" "an" "the"
 
 ABBREVIATE_BRIEF       = "The $name class" \
@@ -98,204 +98,204 @@ ABBREVIATE_BRIEF       = "The $name class" \
                          an \
                          the
 
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
 # description.
 
 ALWAYS_DETAILED_SEC    = YES
 
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
-# inherited members of a class in the documentation of that class as if those 
-# members were ordinary class members. Constructors, destructors and assignment 
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
 # operators of the base classes will not be shown.
 
 INLINE_INHERITED_MEMB  = NO
 
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
 # to NO the shortest path that makes the file name unique will be used.
 
 FULL_PATH_NAMES        = YES
 
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. The tag can be used to show relative paths in the file list. 
-# If left blank the directory from which doxygen is run is used as the 
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
 # path to strip.
 
 STRIP_FROM_PATH        =  \
                          src/
 
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
-# the path mentioned in the documentation of a class, which tells 
-# the reader which header file to include in order to use a class. 
-# If left blank only the name of the header file containing the class 
-# definition is used. Otherwise one should specify the include paths that 
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
 # are normally passed to the compiler using the -I flag.
 
-STRIP_FROM_INC_PATH    = 
+STRIP_FROM_INC_PATH    =
 
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
 # doesn't support long names like on DOS, Mac, or CD-ROM.
 
 SHORT_NAMES            = NO
 
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like regular Qt-style comments 
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
 # (thus requiring an explicit @brief command for a brief description.)
 
 JAVADOC_AUTOBRIEF      = NO
 
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
-# interpret the first line (until the first dot) of a Qt-style 
-# comment as the brief description. If set to NO, the comments 
-# will behave just like regular Qt-style comments (thus requiring 
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
 # an explicit \brief command for a brief description.)
 
 QT_AUTOBRIEF           = NO
 
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
 # description. Set this tag to YES if you prefer the old behaviour instead.
 
 MULTILINE_CPP_IS_BRIEF = NO
 
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
-# member inherits the documentation from any documented member that it 
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
 # re-implements.
 
 INHERIT_DOCS           = YES
 
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
-# a new page for each member. If set to NO, the documentation of a member will 
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
 # be part of the file/class/namespace that contains it.
 
 SEPARATE_MEMBER_PAGES  = NO
 
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
 # Doxygen uses this value to replace tabs by spaces in code fragments.
 
 TAB_SIZE               = 8
 
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
 # You can put \n's in the value part of an alias to insert newlines.
 
-ALIASES                = 
+ALIASES                =
 
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
-# sources only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
 # of all members will be omitted, etc.
 
 OPTIMIZE_OUTPUT_FOR_C  = YES
 
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
-# sources only. Doxygen will then generate output that is more tailored for 
-# Java. For instance, namespaces will be presented as packages, qualified 
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
 # scopes will look different, etc.
 
 OPTIMIZE_OUTPUT_JAVA   = NO
 
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
-# sources only. Doxygen will then generate output that is more tailored for 
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
 # Fortran.
 
 OPTIMIZE_FOR_FORTRAN   = NO
 
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
-# sources. Doxygen will then generate output that is tailored for 
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
 # VHDL.
 
 OPTIMIZE_OUTPUT_VHDL   = NO
 
-# Doxygen selects the parser to use depending on the extension of the files it 
-# parses. With this tag you can assign which parser to use for a given extension. 
-# Doxygen has a built-in mapping, but you can override or extend it using this 
-# tag. The format is ext=language, where ext is a file extension, and language 
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, 
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make 
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C 
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions 
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this
+# tag. The format is ext=language, where ext is a file extension, and language
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
 # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
 
-EXTENSION_MAPPING      = 
+EXTENSION_MAPPING      =
 
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
-# to include (a tag file for) the STL sources as input, then you should 
-# set this tag to YES in order to let doxygen match functions declarations and 
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
-# func(std::string) {}). This also make the inheritance and collaboration 
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
 # diagrams that involve STL classes more complete and accurate.
 
 BUILTIN_STL_SUPPORT    = NO
 
-# If you use Microsoft's C++/CLI language, you should set this option to YES to 
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
 # enable parsing support.
 
 CPP_CLI_SUPPORT        = NO
 
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
-# Doxygen will parse them like normal C++ but will assume all classes use public 
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
 # instead of private inheritance when no explicit protection keyword is present.
 
 SIP_SUPPORT            = NO
 
-# For Microsoft's IDL there are propget and propput attributes to indicate getter 
-# and setter methods for a property. Setting this option to YES (the default) 
-# will make doxygen to replace the get and set methods by a property in the 
-# documentation. This will only work if the methods are indeed getting or 
-# setting a simple type. If this is not the case, or you want to show the 
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen to replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
 # methods anyway, you should set this option to NO.
 
 IDL_PROPERTY_SUPPORT   = YES
 
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
 # all members of a group must be documented explicitly.
 
 DISTRIBUTE_GROUP_DOC   = NO
 
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
 # the \nosubgrouping command.
 
 SUBGROUPING            = YES
 
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
-# is documented as struct, union, or enum with the name of the typedef. So 
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
-# with name TypeT. When disabled the typedef will appear as a member of a file, 
-# namespace, or class. And the struct will be named TypeS. This can typically 
-# be useful for C code in case the coding convention dictates that all compound 
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
 # types are typedef'ed and only the typedef is referenced, never the tag name.
 
 TYPEDEF_HIDES_STRUCT   = YES
 
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 
-# determine which symbols to keep in memory and which to flush to disk. 
-# When the cache is full, less often used symbols will be written to disk. 
-# For small to medium size projects (<1000 input files) the default value is 
-# probably good enough. For larger projects a too small cache size can cause 
-# doxygen to be busy swapping symbols to and from disk most of the time 
-# causing a significant performance penality. 
-# If the system has enough physical memory increasing the cache will improve the 
-# performance by keeping more symbols in memory. Note that the value works on 
-# a logarithmic scale so increasing the size by one will rougly double the 
-# memory usage. The cache size is given by this formula: 
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penality.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will rougly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
 # corresponding to a cache size of 2^16 = 65536 symbols
 
 SYMBOL_CACHE_SIZE      = 0
@@ -304,291 +304,291 @@ SYMBOL_CACHE_SIZE      = 0
 # Build related configuration options
 #---------------------------------------------------------------------------
 
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
 # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
 
 EXTRACT_ALL            = YES
 
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
 # will be included in the documentation.
 
 EXTRACT_PRIVATE        = NO
 
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
 # will be included in the documentation.
 
 EXTRACT_STATIC         = NO
 
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
 # If set to NO only classes defined in header files are included.
 
 EXTRACT_LOCAL_CLASSES  = YES
 
-# This flag is only useful for Objective-C code. When set to YES local 
-# methods, which are defined in the implementation section but not in 
-# the interface are included in the documentation. 
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
 # If set to NO (the default) only methods in the interface are included.
 
 EXTRACT_LOCAL_METHODS  = NO
 
-# If this flag is set to YES, the members of anonymous namespaces will be 
-# extracted and appear in the documentation as a namespace called 
-# 'anonymous_namespace{file}', where file will be replaced with the base 
-# name of the file that contains the anonymous namespace. By default 
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
 # anonymous namespace are hidden.
 
 EXTRACT_ANON_NSPACES   = NO
 
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
 # This option has no effect if EXTRACT_ALL is enabled.
 
 HIDE_UNDOC_MEMBERS     = NO
 
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
 # overviews. This option has no effect if EXTRACT_ALL is enabled.
 
 HIDE_UNDOC_CLASSES     = NO
 
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
 # documentation.
 
 HIDE_FRIEND_COMPOUNDS  = NO
 
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
 # function's detailed documentation block.
 
 HIDE_IN_BODY_DOCS      = NO
 
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
 # Set it to YES to include the internal documentation.
 
 INTERNAL_DOCS          = NO
 
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
 # and Mac users are advised to set this option to NO.
 
 CASE_SENSE_NAMES       = NO
 
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
 # documentation. If set to YES the scope will be hidden.
 
 HIDE_SCOPE_NAMES       = YES
 
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
 # of that file.
 
 SHOW_INCLUDE_FILES     = YES
 
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen 
-# will list include files with double quotes in the documentation 
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
 # rather than with sharp brackets.
 
 FORCE_LOCAL_INCLUDES   = NO
 
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
 # is inserted in the documentation for inline members.
 
 INLINE_INFO            = YES
 
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
 # declaration order.
 
 SORT_MEMBER_DOCS       = YES
 
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
 # declaration order.
 
 SORT_BRIEF_DOCS        = NO
 
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen 
-# will sort the (brief and detailed) documentation of class members so that 
-# constructors and destructors are listed first. If set to NO (the default) 
-# the constructors will appear in the respective orders defined by 
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. 
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO 
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
 # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
 
 SORT_MEMBERS_CTORS_1ST = NO
 
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
-# hierarchy of group names into alphabetical order. If set to NO (the default) 
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
 # the group names will appear in their defined order.
 
 SORT_GROUP_NAMES       = NO
 
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 
-# Note: This option applies only to the class list, not to the 
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
 # alphabetical list.
 
 SORT_BY_SCOPE_NAME     = NO
 
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
 # commands in the documentation.
 
 GENERATE_TODOLIST      = YES
 
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
 # commands in the documentation.
 
 GENERATE_TESTLIST      = YES
 
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
 # commands in the documentation.
 
 GENERATE_BUGLIST       = YES
 
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
 # \deprecated commands in the documentation.
 
 GENERATE_DEPRECATEDLIST= YES
 
-# The ENABLED_SECTIONS tag can be used to enable conditional 
+# The ENABLED_SECTIONS tag can be used to enable conditional
 # documentation sections, marked by \if sectionname ... \endif.
 
-ENABLED_SECTIONS       = 
+ENABLED_SECTIONS       =
 
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
 # command in the documentation regardless of this setting.
 
 MAX_INITIALIZER_LINES  = 50
 
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
 # list will mention the files that were used to generate the documentation.
 
 SHOW_USED_FILES        = YES
 
-# If the sources in your project are distributed over multiple directories 
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
 # in the documentation. The default is NO.
 
 SHOW_DIRECTORIES       = YES
 
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page. 
-# This will remove the Files entry from the Quick Index and from the 
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
 # Folder Tree View (if specified). The default is YES.
 
 SHOW_FILES             = YES
 
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 
-# Namespaces page.  This will remove the Namespaces entry from the Quick Index 
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.  This will remove the Namespaces entry from the Quick Index
 # and from the Folder Tree View (if specified). The default is YES.
 
 SHOW_NAMESPACES        = YES
 
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
-# doxygen should invoke to get the current version for each file (typically from 
-# the version control system). Doxygen will invoke the program by executing (via 
-# popen()) the command <command> <input-file>, where <command> is the value of 
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
-# provided by doxygen. Whatever the program writes to standard output 
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
 # is used as the file version. See the manual for examples.
 
-FILE_VERSION_FILTER    = 
+FILE_VERSION_FILTER    =
 
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 
-# by doxygen. The layout file controls the global structure of the generated 
-# output files in an output format independent way. The create the layout file 
-# that represents doxygen's defaults, run doxygen with the -l option. 
-# You can optionally specify a file name after the option, if omitted 
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. The create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option.
+# You can optionally specify a file name after the option, if omitted
 # DoxygenLayout.xml will be used as the name of the layout file.
 
-LAYOUT_FILE            = 
+LAYOUT_FILE            =
 
 #---------------------------------------------------------------------------
 # configuration options related to warning and progress messages
 #---------------------------------------------------------------------------
 
-# The QUIET tag can be used to turn on/off the messages that are generated 
+# The QUIET tag can be used to turn on/off the messages that are generated
 # by doxygen. Possible values are YES and NO. If left blank NO is used.
 
 QUIET                  = NO
 
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
 # NO is used.
 
 WARNINGS               = YES
 
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
 # automatically be disabled.
 
 WARN_IF_UNDOCUMENTED   = YES
 
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
 # don't exist or using markup commands wrongly.
 
 WARN_IF_DOC_ERROR      = YES
 
-# This WARN_NO_PARAMDOC option can be abled to get warnings for 
-# functions that are documented, but have no documentation for their parameters 
-# or return value. If set to NO (the default) doxygen will only warn about 
-# wrong or incomplete parameter documentation, but not about the absence of 
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
 # documentation.
 
 WARN_NO_PARAMDOC       = NO
 
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text. Optionally the format may contain 
-# $version, which will be replaced by the version of the file (if it could 
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
 # be obtained via FILE_VERSION_FILTER)
 
 WARN_FORMAT            = "$file:$line: $text"
 
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
 # to stderr.
 
-WARN_LOGFILE           = 
+WARN_LOGFILE           =
 
 #---------------------------------------------------------------------------
 # configuration options related to the input files
 #---------------------------------------------------------------------------
 
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
 # with spaces.
 
 INPUT                  = src/common \
@@ -599,105 +599,105 @@ INPUT                  = src/common \
                          src/utils \
                          Doxy.page.h
 
-# This tag can be used to specify the character encoding of the source files 
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
-# also the default input encoding. Doxygen uses libiconv (or the iconv built 
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
 # the list of possible encodings.
 
 INPUT_ENCODING         = UTF-8
 
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
 # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
 
 FILE_PATTERNS          = *.c \
                          *.h
 
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
 # If left blank NO is used.
 
 RECURSIVE              = YES
 
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
 # subdirectory from a directory tree whose root is specified with the INPUT tag.
 
 EXCLUDE                =
 
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
-# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
 # from the input.
 
 EXCLUDE_SYMLINKS       = NO
 
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories. Note that the wildcards are matched 
-# against the file with absolute path, so to exclude all test directories 
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
 # for example use the pattern */test/*
 
-EXCLUDE_PATTERNS       = 
+EXCLUDE_PATTERNS       =
 
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
-# (namespaces, classes, functions, etc.) that should be excluded from the 
-# output. The symbol name can be a fully qualified name, a word, or if the 
-# wildcard * is used, a substring. Examples: ANamespace, AClass, 
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
 # AClass::ANamespace, ANamespace::*Test
 
-EXCLUDE_SYMBOLS        = 
+EXCLUDE_SYMBOLS        =
 
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
 # the \include command).
 
-EXAMPLE_PATH           = 
+EXAMPLE_PATH           =
 
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
 # blank all files are included.
 
 EXAMPLE_PATTERNS       = *
 
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
 # Possible values are YES and NO. If left blank NO is used.
 
 EXAMPLE_RECURSIVE      = NO
 
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
 # the \image command).
 
-IMAGE_PATH             = 
+IMAGE_PATH             =
 
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be
 # ignored.
 
-INPUT_FILTER           = 
+INPUT_FILTER           =
 
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
-# basis.  Doxygen will compare the file name with each pattern and apply the 
-# filter if there is a match.  The filters are a list of the form: 
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis.  Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.  The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
 # is applied to all files.
 
-FILTER_PATTERNS        = 
+FILTER_PATTERNS        =
 
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
 # files to browse (i.e. when SOURCE_BROWSER is set to YES).
 
 FILTER_SOURCE_FILES    = NO
@@ -706,53 +706,53 @@ FILTER_SOURCE_FILES    = NO
 # configuration options related to source browsing
 #---------------------------------------------------------------------------
 
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
 # VERBATIM_HEADERS is set to NO.
 
 SOURCE_BROWSER         = YES
 
-# Setting the INLINE_SOURCES tag to YES will include the body 
+# Setting the INLINE_SOURCES tag to YES will include the body
 # of functions and classes directly in the documentation.
 
 INLINE_SOURCES         = NO
 
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
 # fragments. Normal C and C++ comments will always remain visible.
 
 STRIP_CODE_COMMENTS    = YES
 
-# If the REFERENCED_BY_RELATION tag is set to YES 
-# then for each documented function all documented 
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
 # functions referencing it will be listed.
 
 REFERENCED_BY_RELATION = NO
 
-# If the REFERENCES_RELATION tag is set to YES 
-# then for each documented function all documented entities 
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
 # called/used by that function will be listed.
 
 REFERENCES_RELATION    = NO
 
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
 # link to the source code.  Otherwise they will link to the documentation.
 
 REFERENCES_LINK_SOURCE = YES
 
-# If the USE_HTAGS tag is set to YES then the references to source code 
-# will point to the HTML generated by the htags(1) tool instead of doxygen 
-# built-in source browser. The htags tool is part of GNU's global source 
-# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
 # will need version 4.8.6 or higher.
 
 USE_HTAGS              = NO
 
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
 # which an include is specified. Set to NO to disable this.
 
 VERBATIM_HEADERS       = YES
@@ -761,141 +761,141 @@ VERBATIM_HEADERS       = YES
 # configuration options related to the alphabetical class index
 #---------------------------------------------------------------------------
 
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
 # contains a lot of classes, structs, unions or interfaces.
 
 ALPHABETICAL_INDEX     = YES
 
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
 # in which this list will be split (can be a number in the range [1..20])
 
 COLS_IN_ALPHA_INDEX    = 5
 
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
 # should be ignored while generating the index headers.
 
-IGNORE_PREFIX          = 
+IGNORE_PREFIX          =
 
 #---------------------------------------------------------------------------
 # configuration options related to the HTML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
 # generate HTML output.
 
 GENERATE_HTML          = YES
 
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `html' will be used as the default path.
 
 HTML_OUTPUT            = html
 
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
 # doxygen will generate files with .html extension.
 
 HTML_FILE_EXTENSION    = .html
 
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
 # standard header.
 
-HTML_HEADER            = 
+HTML_HEADER            =
 
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
 # standard footer.
 
-HTML_FOOTER            = 
+HTML_FOOTER            =
 
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet. Note that doxygen will try to copy 
-# the style sheet file to the HTML output directory, so don't put your own 
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
 # stylesheet in the HTML output directory as well, or it will be erased!
 
-HTML_STYLESHEET        = 
+HTML_STYLESHEET        =
 
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. 
-# Doxygen will adjust the colors in the stylesheet and background images 
-# according to this color. Hue is specified as an angle on a colorwheel, 
-# see http://en.wikipedia.org/wiki/Hue for more information. 
-# For instance the value 0 represents red, 60 is yellow, 120 is green, 
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. 
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
+# Doxygen will adjust the colors in the stylesheet and background images
+# according to this color. Hue is specified as an angle on a colorwheel,
+# see http://en.wikipedia.org/wiki/Hue for more information.
+# For instance the value 0 represents red, 60 is yellow, 120 is green,
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
 # The allowed range is 0 to 359.
 
 HTML_COLORSTYLE_HUE    = 220
 
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of 
-# the colors in the HTML output. For a value of 0 the output will use 
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
+# the colors in the HTML output. For a value of 0 the output will use
 # grayscales only. A value of 255 will produce the most vivid colors.
 
 HTML_COLORSTYLE_SAT    = 100
 
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to 
-# the luminance component of the colors in the HTML output. Values below 
-# 100 gradually make the output lighter, whereas values above 100 make 
-# the output darker. The value divided by 100 is the actual gamma applied, 
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, 
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
+# the luminance component of the colors in the HTML output. Values below
+# 100 gradually make the output lighter, whereas values above 100 make
+# the output darker. The value divided by 100 is the actual gamma applied,
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
 # and 100 does not change the gamma.
 
 HTML_COLORSTYLE_GAMMA  = 80
 
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 
-# page will contain the date and time when the page was generated. Setting 
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
 # this to NO can help when comparing the output of multiple runs.
 
 HTML_TIMESTAMP         = YES
 
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
 # NO a bullet list will be used.
 
 HTML_ALIGN_MEMBERS     = YES
 
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
-# documentation will contain sections that can be hidden and shown after the 
-# page has loaded. For this to work a browser that supports 
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
 # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
 
 HTML_DYNAMIC_SECTIONS  = NO
 
-# If the GENERATE_DOCSET tag is set to YES, additional index files 
-# will be generated that can be used as input for Apple's Xcode 3 
-# integrated development environment, introduced with OSX 10.5 (Leopard). 
-# To create a documentation set, doxygen will generate a Makefile in the 
-# HTML output directory. Running make will produce the docset in that 
-# directory and running "make install" will install the docset in 
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
-# it at startup. 
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
 # for more information.
 
 GENERATE_DOCSET        = NO
 
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
-# feed. A documentation feed provides an umbrella under which multiple 
-# documentation sets from a single provider (such as a company or product suite) 
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
 # can be grouped.
 
 DOCSET_FEEDNAME        = "Doxygen generated docs"
 
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
-# should uniquely identify the documentation set bundle. This should be a 
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
 # will append .docset to the name.
 
 DOCSET_BUNDLE_ID       = org.doxygen.Project
 
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify 
-# the documentation publisher. This should be a reverse domain-name style 
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
 # string, e.g. com.mycompany.MyDocSet.documentation.
 
 DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
@@ -904,189 +904,189 @@ DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
 
 DOCSET_PUBLISHER_NAME  = Publisher
 
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
 # of the generated HTML documentation.
 
 GENERATE_HTMLHELP      = NO
 
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
 # written to the html output directory.
 
-CHM_FILE               = 
+CHM_FILE               =
 
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
 # the HTML help compiler on the generated index.hhp.
 
-HHC_LOCATION           = 
+HHC_LOCATION           =
 
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
 # it should be included in the master .chm file (NO).
 
 GENERATE_CHI           = NO
 
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file 
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
 # content.
 
-CHM_INDEX_ENCODING     = 
+CHM_INDEX_ENCODING     =
 
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
 # normal table of contents (NO) in the .chm file.
 
 BINARY_TOC             = NO
 
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
 # to the contents of the HTML help documentation and to the tree view.
 
 TOC_EXPAND             = NO
 
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated 
-# that can be used as input for Qt's qhelpgenerator to generate a 
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
+# that can be used as input for Qt's qhelpgenerator to generate a
 # Qt Compressed Help (.qch) of the generated HTML documentation.
 
 GENERATE_QHP           = NO
 
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can 
-# be used to specify the file name of the resulting .qch file. 
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
 # The path specified is relative to the HTML output folder.
 
-QCH_FILE               = 
+QCH_FILE               =
 
-# The QHP_NAMESPACE tag specifies the namespace to use when generating 
-# Qt Help Project output. For more information please see 
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
 # http://doc.trolltech.com/qthelpproject.html#namespace
 
 QHP_NAMESPACE          = org.doxygen.Project
 
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 
-# Qt Help Project output. For more information please see 
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
 # http://doc.trolltech.com/qthelpproject.html#virtual-folders
 
 QHP_VIRTUAL_FOLDER     = doc
 
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to 
-# add. For more information please see 
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
+# add. For more information please see
 # http://doc.trolltech.com/qthelpproject.html#custom-filters
 
-QHP_CUST_FILTER_NAME   = 
+QHP_CUST_FILTER_NAME   =
 
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the 
-# custom filter to add. For more information please see 
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters"> 
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
 # Qt Help Project / Custom Filters</a>.
 
-QHP_CUST_FILTER_ATTRS  = 
+QHP_CUST_FILTER_ATTRS  =
 
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 
-# project's 
-# filter section matches. 
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes"> 
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
 # Qt Help Project / Filter Attributes</a>.
 
-QHP_SECT_FILTER_ATTRS  = 
+QHP_SECT_FILTER_ATTRS  =
 
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 
-# be used to specify the location of Qt's qhelpgenerator. 
-# If non-empty doxygen will try to run qhelpgenerator on the generated 
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
 # .qhp file.
 
-QHG_LOCATION           = 
+QHG_LOCATION           =
 
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files  
-# will be generated, which together with the HTML files, form an Eclipse help 
-# plugin. To install this plugin and make it available under the help contents 
-# menu in Eclipse, the contents of the directory containing the HTML and XML 
-# files needs to be copied into the plugins directory of eclipse. The name of 
-# the directory within the plugins directory should be the same as 
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before 
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+# will be generated, which together with the HTML files, form an Eclipse help
+# plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
 # the help appears.
 
 GENERATE_ECLIPSEHELP   = NO
 
-# A unique identifier for the eclipse help plugin. When installing the plugin 
-# the directory name containing the HTML and XML files should also have 
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
 # this name.
 
 ECLIPSE_DOC_ID         = org.doxygen.Project
 
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
 # the value YES disables it.
 
 DISABLE_INDEX          = NO
 
-# This tag can be used to set the number of enum values (range [1..20]) 
+# This tag can be used to set the number of enum values (range [1..20])
 # that doxygen will group on one line in the generated HTML documentation.
 
 ENUM_VALUES_PER_LINE   = 4
 
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 
-# structure should be generated to display hierarchical information. 
-# If the tag value is set to YES, a side panel will be generated 
-# containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
 # Windows users are probably better off using the HTML help feature.
 
 GENERATE_TREEVIEW      = NO
 
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, 
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
 # and Class Hierarchy pages using a tree view instead of an ordered list.
 
 USE_INLINE_TREES       = NO
 
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
 # is shown.
 
 TREEVIEW_WIDTH         = 250
 
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open 
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
 # links to external symbols imported via tag files in a separate window.
 
 EXT_LINKS_IN_WINDOW    = NO
 
-# Use this tag to change the font size of Latex formulas included 
-# as images in the HTML documentation. The default is 10. Note that 
-# when you change the font size after a successful doxygen run you need 
-# to manually remove any form_*.png images from the HTML output directory 
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
 # to force them to be regenerated.
 
 FORMULA_FONTSIZE       = 10
 
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images 
-# generated for formulas are transparent PNGs. Transparent PNGs are 
-# not supported properly for IE 6.0, but are supported on all modern browsers. 
-# Note that when changing this option you need to delete any form_*.png files 
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are
+# not supported properly for IE 6.0, but are supported on all modern browsers.
+# Note that when changing this option you need to delete any form_*.png files
 # in the HTML output before the changes have effect.
 
 FORMULA_TRANSPARENT    = YES
 
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box 
-# for the HTML output. The underlying search engine uses javascript 
-# and DHTML and should work on any modern browser. Note that when using 
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets 
-# (GENERATE_DOCSET) there is already a search function so this one should 
-# typically be disabled. For large projects the javascript based search engine 
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
+# (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
 # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
 
 SEARCHENGINE           = YES
 
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be 
-# implemented using a PHP enabled web server instead of at the web client 
-# using Javascript. Doxygen will generate the search PHP script and index 
-# file to put on the web server. The advantage of the server 
-# based approach is that it scales better to large projects and allows 
-# full text search. The disadvances is that it is more difficult to setup 
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a PHP enabled web server instead of at the web client
+# using Javascript. Doxygen will generate the search PHP script and index
+# file to put on the web server. The advantage of the server
+# based approach is that it scales better to large projects and allows
+# full text search. The disadvances is that it is more difficult to setup
 # and does not have live searching capabilities.
 
 SERVER_BASED_SEARCH    = NO
@@ -1095,84 +1095,84 @@ SERVER_BASED_SEARCH    = NO
 # configuration options related to the LaTeX output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
 # generate Latex output.
 
 GENERATE_LATEX         = NO
 
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `latex' will be used as the default path.
 
 LATEX_OUTPUT           = latex
 
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name. 
-# Note that when enabling USE_PDFLATEX this option is only used for 
-# generating bitmaps for formulas in the HTML output, but not in the 
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
 # Makefile that is written to the output directory.
 
 LATEX_CMD_NAME         = latex
 
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
 # default command name.
 
 MAKEINDEX_CMD_NAME     = makeindex
 
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
 # save some trees in general.
 
 COMPACT_LATEX          = NO
 
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
 # executive. If left blank a4wide will be used.
 
 PAPER_TYPE             = a4wide
 
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
 # packages that should be included in the LaTeX output.
 
-EXTRA_PACKAGES         = 
+EXTRA_PACKAGES         =
 
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
 # standard header. Notice: only use this tag if you know what you are doing!
 
-LATEX_HEADER           = 
+LATEX_HEADER           =
 
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
 # This makes the output suitable for online browsing using a pdf viewer.
 
 PDF_HYPERLINKS         = YES
 
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
 # higher quality PDF documentation.
 
 USE_PDFLATEX           = YES
 
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
 # This option is also used when generating formulas in HTML.
 
 LATEX_BATCHMODE        = NO
 
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
 # in the output.
 
 LATEX_HIDE_INDICES     = NO
 
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include 
-# source code with syntax highlighting in the LaTeX output. 
-# Note that which sources are shown also depends on other settings 
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
 # such as SOURCE_BROWSER.
 
 LATEX_SOURCE_CODE      = NO
@@ -1181,68 +1181,68 @@ LATEX_SOURCE_CODE      = NO
 # configuration options related to the RTF output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
 # other RTF readers or editors.
 
 GENERATE_RTF           = NO
 
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `rtf' will be used as the default path.
 
 RTF_OUTPUT             = rtf
 
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
 # save some trees in general.
 
 COMPACT_RTF            = NO
 
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
 # Note: wordpad (write) and others do not support links.
 
 RTF_HYPERLINKS         = NO
 
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
 # replacements, missing definitions are set to their default value.
 
-RTF_STYLESHEET_FILE    = 
+RTF_STYLESHEET_FILE    =
 
-# Set optional variables used in the generation of an rtf document. 
+# Set optional variables used in the generation of an rtf document.
 # Syntax is similar to doxygen's config file.
 
-RTF_EXTENSIONS_FILE    = 
+RTF_EXTENSIONS_FILE    =
 
 #---------------------------------------------------------------------------
 # configuration options related to the man page output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
 # generate man pages
 
 GENERATE_MAN           = NO
 
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `man' will be used as the default path.
 
 MAN_OUTPUT             = man
 
-# The MAN_EXTENSION tag determines the extension that is added to 
+# The MAN_EXTENSION tag determines the extension that is added to
 # the generated man pages (default is the subroutine's section .3)
 
 MAN_EXTENSION          = .3
 
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
 # would be unable to find the correct page. The default is NO.
 
 MAN_LINKS              = NO
@@ -1251,33 +1251,33 @@ MAN_LINKS              = NO
 # configuration options related to the XML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
 # the code including all documentation.
 
 GENERATE_XML           = NO
 
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `xml' will be used as the default path.
 
 XML_OUTPUT             = xml
 
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
 # syntax of the XML files.
 
-XML_SCHEMA             = 
+XML_SCHEMA             =
 
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
 # syntax of the XML files.
 
-XML_DTD                = 
+XML_DTD                =
 
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
 # enabling this will significantly increase the size of the XML output.
 
 XML_PROGRAMLISTING     = YES
@@ -1286,10 +1286,10 @@ XML_PROGRAMLISTING     = YES
 # configuration options for the AutoGen Definitions output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
 # and incomplete at the moment.
 
 GENERATE_AUTOGEN_DEF   = NO
@@ -1298,97 +1298,97 @@ GENERATE_AUTOGEN_DEF   = NO
 # configuration options related to the Perl module output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
 # moment.
 
 GENERATE_PERLMOD       = NO
 
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
 # to generate PDF and DVI output from the Perl module output.
 
 PERLMOD_LATEX          = NO
 
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader.  This is useful
+# if you want to understand what is going on.  On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
 # and Perl will parse it just the same.
 
 PERLMOD_PRETTY         = YES
 
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
 # Makefile don't overwrite each other's variables.
 
-PERLMOD_MAKEVAR_PREFIX = 
+PERLMOD_MAKEVAR_PREFIX =
 
 #---------------------------------------------------------------------------
 # Configuration options related to the preprocessor
 #---------------------------------------------------------------------------
 
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
 # files.
 
 ENABLE_PREPROCESSING   = YES
 
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
 # way by setting EXPAND_ONLY_PREDEF to YES.
 
 MACRO_EXPANSION        = NO
 
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
 # PREDEFINED and EXPAND_AS_DEFINED tags.
 
 EXPAND_ONLY_PREDEF     = NO
 
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
 # in the INCLUDE_PATH (see below) will be search if a #include is found.
 
 SEARCH_INCLUDES        = YES
 
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
 # the preprocessor.
 
-INCLUDE_PATH           = 
+INCLUDE_PATH           =
 
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
 # be used.
 
-INCLUDE_FILE_PATTERNS  = 
+INCLUDE_FILE_PATTERNS  =
 
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed. To prevent a macro definition from being 
-# undefined via #undef or recursively expanded use the := operator 
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
 # instead of the = operator.
 
-PREDEFINED             = 
+PREDEFINED             =
 
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
 # Use the PREDEFINED tag if you want to use a different macro definition.
 
-EXPAND_AS_DEFINED      = 
+EXPAND_AS_DEFINED      =
 
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse 
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
 # the parser if not removed.
 
 SKIP_FUNCTION_MACROS   = YES
@@ -1397,41 +1397,41 @@ SKIP_FUNCTION_MACROS   = YES
 # Configuration::additions related to external references
 #---------------------------------------------------------------------------
 
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
-# does not have to be run to correct the links. 
-# Note that each tag file must have a unique name 
-# (where the name does NOT include the path) 
-# If a tag file is not located in the directory in which doxygen 
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+#   TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+#   TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
 # is run, you must also specify the path to the tagfile here.
 
-TAGFILES               = 
+TAGFILES               =
 
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
 # a tag file that is based on the input files it reads.
 
-GENERATE_TAGFILE       = 
+GENERATE_TAGFILE       =
 
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
 # will be listed.
 
 ALLEXTERNALS           = NO
 
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
 # be listed.
 
 EXTERNAL_GROUPS        = YES
 
-# The PERL_PATH should be the absolute path and name of the perl script 
+# The PERL_PATH should be the absolute path and name of the perl script
 # interpreter (i.e. the result of `which perl').
 
 PERL_PATH              = /usr/bin/perl
@@ -1440,200 +1440,200 @@ PERL_PATH              = /usr/bin/perl
 # Configuration options related to the dot tool
 #---------------------------------------------------------------------------
 
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
-# or super classes. Setting the tag to NO turns the diagrams off. Note that 
-# this option is superseded by the HAVE_DOT option below. This is only a 
-# fallback. It is recommended to install and use dot, since it yields more 
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
 # powerful graphs.
 
 CLASS_DIAGRAMS         = YES
 
-# You can define message sequence charts within doxygen comments using the \msc 
-# command. Doxygen will then run the mscgen tool (see 
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
-# the mscgen tool resides. If left empty the tool is assumed to be found in the 
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
 # default search path.
 
-MSCGEN_PATH            = 
+MSCGEN_PATH            =
 
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
 # or is not a class.
 
 HIDE_UNDOC_RELATIONS   = YES
 
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
 # have no effect if this option is set to NO (the default)
 
 HAVE_DOT               = NO
 
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is 
-# allowed to run in parallel. When set to 0 (the default) doxygen will 
-# base this on the number of processors available in the system. You can set it 
-# explicitly to a value larger than 0 to get control over the balance 
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
+# allowed to run in parallel. When set to 0 (the default) doxygen will
+# base this on the number of processors available in the system. You can set it
+# explicitly to a value larger than 0 to get control over the balance
 # between CPU load and processing speed.
 
 DOT_NUM_THREADS        = 0
 
-# By default doxygen will write a font called FreeSans.ttf to the output 
-# directory and reference it in all dot files that doxygen generates. This 
-# font does not include all possible unicode characters however, so when you need 
-# these (or just want a differently looking font) you can specify the font name 
-# using DOT_FONTNAME. You need need to make sure dot is able to find the font, 
-# which can be done by putting it in a standard location or by setting the 
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory 
+# By default doxygen will write a font called FreeSans.ttf to the output
+# directory and reference it in all dot files that doxygen generates. This
+# font does not include all possible unicode characters however, so when you need
+# these (or just want a differently looking font) you can specify the font name
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
 # containing the font.
 
 DOT_FONTNAME           = FreeSans.ttf
 
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
 # The default size is 10pt.
 
 DOT_FONTSIZE           = 10
 
-# By default doxygen will tell dot to use the output directory to look for the 
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a 
-# different font using DOT_FONTNAME you can set the path where dot 
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
 # can find it using this tag.
 
-DOT_FONTPATH           = 
+DOT_FONTPATH           =
 
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
 # the CLASS_DIAGRAMS tag to NO.
 
 CLASS_GRAPH            = YES
 
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
 # class references variables) of the class with other documented classes.
 
 COLLABORATION_GRAPH    = YES
 
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
 # will generate a graph for groups, showing the direct groups dependencies
 
 GROUP_GRAPHS           = YES
 
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
 # Language.
 
 UML_LOOK               = NO
 
-# If set to YES, the inheritance and collaboration graphs will show the 
+# If set to YES, the inheritance and collaboration graphs will show the
 # relations between templates and their instances.
 
 TEMPLATE_RELATIONS     = NO
 
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
 # other documented files.
 
 INCLUDE_GRAPH          = YES
 
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
 # indirectly include this file.
 
 INCLUDED_BY_GRAPH      = YES
 
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
-# doxygen will generate a call dependency graph for every global function 
-# or class method. Note that enabling this option will significantly increase 
-# the time of a run. So in most cases it will be better to enable call graphs 
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
 # for selected functions only using the \callgraph command.
 
 CALL_GRAPH             = NO
 
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
-# doxygen will generate a caller dependency graph for every global function 
-# or class method. Note that enabling this option will significantly increase 
-# the time of a run. So in most cases it will be better to enable caller 
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
 # graphs for selected functions only using the \callergraph command.
 
 CALLER_GRAPH           = NO
 
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
 # will graphical hierarchy of all classes instead of a textual one.
 
 GRAPHICAL_HIERARCHY    = YES
 
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
-# then doxygen will show the dependencies a directory has on other directories 
-# in a graphical way. The dependency relations are determined by the #include 
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
 # relations between the files in the directories.
 
 DIRECTORY_GRAPH        = YES
 
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are png, jpg, or gif 
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
 # If left blank png will be used.
 
 DOT_IMAGE_FORMAT       = png
 
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
 # found. If left blank, it is assumed the dot tool can be found in the path.
 
-DOT_PATH               = 
+DOT_PATH               =
 
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
 # \dotfile command).
 
-DOTFILE_DIRS           = 
+DOTFILE_DIRS           =
 
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
-# nodes that will be shown in the graph. If the number of nodes in a graph 
-# becomes larger than this value, doxygen will truncate the graph, which is 
-# visualized by representing a node as a red box. Note that doxygen if the 
-# number of direct children of the root node in a graph is already larger than 
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
 # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
 
 DOT_GRAPH_MAX_NODES    = 50
 
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
-# graphs generated by dot. A depth value of 3 means that only nodes reachable 
-# from the root by following a path via at most 3 edges will be shown. Nodes 
-# that lay further from the root node will be omitted. Note that setting this 
-# option to 1 or 2 may greatly reduce the computation time needed for large 
-# code bases. Also note that the size of a graph can be further restricted by 
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
 # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
 
 MAX_DOT_GRAPH_DEPTH    = 0
 
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
-# background. This is disabled by default, because dot on Windows does not 
-# seem to support this out of the box. Warning: Depending on the platform used, 
-# enabling this option may lead to badly anti-aliased labels on the edges of 
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
 # a graph (i.e. they become hard to read).
 
 DOT_TRANSPARENT        = NO
 
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
-# files in one run (i.e. multiple -o and -T options on the command line). This 
-# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
 # support this, this feature is disabled by default.
 
 DOT_MULTI_TARGETS      = NO
 
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
 # arrows in the dot generated graphs.
 
 GENERATE_LEGEND        = YES
 
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
 # the various graphs.
 
 DOT_CLEANUP            = YES
diff --git a/Doxyfile.devel b/Doxyfile.devel
index 4b73045685ad14ad4785250a0b0b42690fff68a0..43cf6814239f73e42da796f8860742753b7c0b87 100644
--- a/Doxyfile.devel
+++ b/Doxyfile.devel
@@ -14,76 +14,76 @@
 # Project related configuration options
 #---------------------------------------------------------------------------
 
-# This tag specifies the encoding used for all characters in the config file 
-# that follow. The default is UTF-8 which is also the encoding used for all 
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
-# iconv built into libc) for the transcoding. See 
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
 # http://www.gnu.org/software/libiconv for the list of possible encodings.
 
 DOXYFILE_ENCODING      = UTF-8
 
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
 # by quotes) that should identify the project.
 
 PROJECT_NAME           = Knot
 
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
 PROJECT_NUMBER         = 0.1.0
 
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
 # where doxygen was started. If left blank the current directory will be used.
 
 OUTPUT_DIRECTORY       = doc-devel
 
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
-# 4096 sub-directories (in 2 levels) under the output directory of each output 
-# format and will distribute the generated files over these directories. 
-# Enabling this option can be useful when feeding doxygen a huge amount of 
-# source files, where putting all generated files in the same directory would 
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
 # otherwise cause performance problems for the file system.
 
 CREATE_SUBDIRS         = NO
 
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, 
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
 # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
 
 OUTPUT_LANGUAGE        = English
 
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
 # Set to NO to disable this.
 
 BRIEF_MEMBER_DESC      = YES
 
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
 # brief descriptions will be completely suppressed.
 
 REPEAT_BRIEF           = YES
 
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is 
-# used as the annotated text. Otherwise, the brief description is used as-is. 
-# If left blank, the following values are used ("$name" is automatically 
-# replaced with the name of the entity): "The $name class" "The $name widget" 
-# "The $name file" "is" "provides" "specifies" "contains" 
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
 # "represents" "a" "an" "the"
 
 ABBREVIATE_BRIEF       = "The $name class" \
@@ -98,204 +98,204 @@ ABBREVIATE_BRIEF       = "The $name class" \
                          an \
                          the
 
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
 # description.
 
 ALWAYS_DETAILED_SEC    = YES
 
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
-# inherited members of a class in the documentation of that class as if those 
-# members were ordinary class members. Constructors, destructors and assignment 
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
 # operators of the base classes will not be shown.
 
 INLINE_INHERITED_MEMB  = NO
 
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
 # to NO the shortest path that makes the file name unique will be used.
 
 FULL_PATH_NAMES        = YES
 
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. The tag can be used to show relative paths in the file list. 
-# If left blank the directory from which doxygen is run is used as the 
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
 # path to strip.
 
 STRIP_FROM_PATH        =  \
                          src/
 
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
-# the path mentioned in the documentation of a class, which tells 
-# the reader which header file to include in order to use a class. 
-# If left blank only the name of the header file containing the class 
-# definition is used. Otherwise one should specify the include paths that 
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
 # are normally passed to the compiler using the -I flag.
 
-STRIP_FROM_INC_PATH    = 
+STRIP_FROM_INC_PATH    =
 
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
 # doesn't support long names like on DOS, Mac, or CD-ROM.
 
 SHORT_NAMES            = NO
 
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like regular Qt-style comments 
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
 # (thus requiring an explicit @brief command for a brief description.)
 
 JAVADOC_AUTOBRIEF      = NO
 
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
-# interpret the first line (until the first dot) of a Qt-style 
-# comment as the brief description. If set to NO, the comments 
-# will behave just like regular Qt-style comments (thus requiring 
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
 # an explicit \brief command for a brief description.)
 
 QT_AUTOBRIEF           = NO
 
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
 # description. Set this tag to YES if you prefer the old behaviour instead.
 
 MULTILINE_CPP_IS_BRIEF = NO
 
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
-# member inherits the documentation from any documented member that it 
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
 # re-implements.
 
 INHERIT_DOCS           = YES
 
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
-# a new page for each member. If set to NO, the documentation of a member will 
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
 # be part of the file/class/namespace that contains it.
 
 SEPARATE_MEMBER_PAGES  = NO
 
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
 # Doxygen uses this value to replace tabs by spaces in code fragments.
 
 TAB_SIZE               = 8
 
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
 # You can put \n's in the value part of an alias to insert newlines.
 
-ALIASES                = 
+ALIASES                =
 
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
-# sources only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
 # of all members will be omitted, etc.
 
 OPTIMIZE_OUTPUT_FOR_C  = YES
 
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
-# sources only. Doxygen will then generate output that is more tailored for 
-# Java. For instance, namespaces will be presented as packages, qualified 
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
 # scopes will look different, etc.
 
 OPTIMIZE_OUTPUT_JAVA   = NO
 
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
-# sources only. Doxygen will then generate output that is more tailored for 
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
 # Fortran.
 
 OPTIMIZE_FOR_FORTRAN   = NO
 
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
-# sources. Doxygen will then generate output that is tailored for 
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
 # VHDL.
 
 OPTIMIZE_OUTPUT_VHDL   = NO
 
-# Doxygen selects the parser to use depending on the extension of the files it 
-# parses. With this tag you can assign which parser to use for a given extension. 
-# Doxygen has a built-in mapping, but you can override or extend it using this 
-# tag. The format is ext=language, where ext is a file extension, and language 
-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, 
-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make 
-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C 
-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions 
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this
+# tag. The format is ext=language, where ext is a file extension, and language
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
 # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
 
-EXTENSION_MAPPING      = 
+EXTENSION_MAPPING      =
 
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
-# to include (a tag file for) the STL sources as input, then you should 
-# set this tag to YES in order to let doxygen match functions declarations and 
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
-# func(std::string) {}). This also make the inheritance and collaboration 
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
 # diagrams that involve STL classes more complete and accurate.
 
 BUILTIN_STL_SUPPORT    = NO
 
-# If you use Microsoft's C++/CLI language, you should set this option to YES to 
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
 # enable parsing support.
 
 CPP_CLI_SUPPORT        = NO
 
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
-# Doxygen will parse them like normal C++ but will assume all classes use public 
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
 # instead of private inheritance when no explicit protection keyword is present.
 
 SIP_SUPPORT            = NO
 
-# For Microsoft's IDL there are propget and propput attributes to indicate getter 
-# and setter methods for a property. Setting this option to YES (the default) 
-# will make doxygen to replace the get and set methods by a property in the 
-# documentation. This will only work if the methods are indeed getting or 
-# setting a simple type. If this is not the case, or you want to show the 
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen to replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
 # methods anyway, you should set this option to NO.
 
 IDL_PROPERTY_SUPPORT   = YES
 
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
 # all members of a group must be documented explicitly.
 
 DISTRIBUTE_GROUP_DOC   = NO
 
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
 # the \nosubgrouping command.
 
 SUBGROUPING            = YES
 
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
-# is documented as struct, union, or enum with the name of the typedef. So 
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
-# with name TypeT. When disabled the typedef will appear as a member of a file, 
-# namespace, or class. And the struct will be named TypeS. This can typically 
-# be useful for C code in case the coding convention dictates that all compound 
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
 # types are typedef'ed and only the typedef is referenced, never the tag name.
 
 TYPEDEF_HIDES_STRUCT   = YES
 
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 
-# determine which symbols to keep in memory and which to flush to disk. 
-# When the cache is full, less often used symbols will be written to disk. 
-# For small to medium size projects (<1000 input files) the default value is 
-# probably good enough. For larger projects a too small cache size can cause 
-# doxygen to be busy swapping symbols to and from disk most of the time 
-# causing a significant performance penality. 
-# If the system has enough physical memory increasing the cache will improve the 
-# performance by keeping more symbols in memory. Note that the value works on 
-# a logarithmic scale so increasing the size by one will rougly double the 
-# memory usage. The cache size is given by this formula: 
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penality.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will rougly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
 # corresponding to a cache size of 2^16 = 65536 symbols
 
 SYMBOL_CACHE_SIZE      = 0
@@ -304,395 +304,395 @@ SYMBOL_CACHE_SIZE      = 0
 # Build related configuration options
 #---------------------------------------------------------------------------
 
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
 # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
 
 EXTRACT_ALL            = YES
 
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
 # will be included in the documentation.
 
 EXTRACT_PRIVATE        = NO
 
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
 # will be included in the documentation.
 
 EXTRACT_STATIC         = YES
 
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
 # If set to NO only classes defined in header files are included.
 
 EXTRACT_LOCAL_CLASSES  = YES
 
-# This flag is only useful for Objective-C code. When set to YES local 
-# methods, which are defined in the implementation section but not in 
-# the interface are included in the documentation. 
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
 # If set to NO (the default) only methods in the interface are included.
 
 EXTRACT_LOCAL_METHODS  = NO
 
-# If this flag is set to YES, the members of anonymous namespaces will be 
-# extracted and appear in the documentation as a namespace called 
-# 'anonymous_namespace{file}', where file will be replaced with the base 
-# name of the file that contains the anonymous namespace. By default 
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
 # anonymous namespace are hidden.
 
 EXTRACT_ANON_NSPACES   = NO
 
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
 # This option has no effect if EXTRACT_ALL is enabled.
 
 HIDE_UNDOC_MEMBERS     = NO
 
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
 # overviews. This option has no effect if EXTRACT_ALL is enabled.
 
 HIDE_UNDOC_CLASSES     = NO
 
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
 # documentation.
 
 HIDE_FRIEND_COMPOUNDS  = NO
 
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
 # function's detailed documentation block.
 
 HIDE_IN_BODY_DOCS      = NO
 
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
 # Set it to YES to include the internal documentation.
 
 INTERNAL_DOCS          = NO
 
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
 # and Mac users are advised to set this option to NO.
 
 CASE_SENSE_NAMES       = NO
 
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
 # documentation. If set to YES the scope will be hidden.
 
 HIDE_SCOPE_NAMES       = YES
 
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
 # of that file.
 
 SHOW_INCLUDE_FILES     = YES
 
-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen 
-# will list include files with double quotes in the documentation 
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
 # rather than with sharp brackets.
 
 FORCE_LOCAL_INCLUDES   = NO
 
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
 # is inserted in the documentation for inline members.
 
 INLINE_INFO            = YES
 
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
 # declaration order.
 
 SORT_MEMBER_DOCS       = YES
 
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
 # declaration order.
 
 SORT_BRIEF_DOCS        = NO
 
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen 
-# will sort the (brief and detailed) documentation of class members so that 
-# constructors and destructors are listed first. If set to NO (the default) 
-# the constructors will appear in the respective orders defined by 
-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. 
-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO 
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
 # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
 
 SORT_MEMBERS_CTORS_1ST = NO
 
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
-# hierarchy of group names into alphabetical order. If set to NO (the default) 
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
 # the group names will appear in their defined order.
 
 SORT_GROUP_NAMES       = NO
 
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 
-# Note: This option applies only to the class list, not to the 
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
 # alphabetical list.
 
 SORT_BY_SCOPE_NAME     = NO
 
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
 # commands in the documentation.
 
 GENERATE_TODOLIST      = YES
 
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
 # commands in the documentation.
 
 GENERATE_TESTLIST      = YES
 
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
 # commands in the documentation.
 
 GENERATE_BUGLIST       = YES
 
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
 # \deprecated commands in the documentation.
 
 GENERATE_DEPRECATEDLIST= YES
 
-# The ENABLED_SECTIONS tag can be used to enable conditional 
+# The ENABLED_SECTIONS tag can be used to enable conditional
 # documentation sections, marked by \if sectionname ... \endif.
 
-ENABLED_SECTIONS       = 
+ENABLED_SECTIONS       =
 
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
 # command in the documentation regardless of this setting.
 
 MAX_INITIALIZER_LINES  = 50
 
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
 # list will mention the files that were used to generate the documentation.
 
 SHOW_USED_FILES        = YES
 
-# If the sources in your project are distributed over multiple directories 
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
 # in the documentation. The default is NO.
 
 SHOW_DIRECTORIES       = YES
 
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page. 
-# This will remove the Files entry from the Quick Index and from the 
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
 # Folder Tree View (if specified). The default is YES.
 
 SHOW_FILES             = YES
 
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 
-# Namespaces page.  This will remove the Namespaces entry from the Quick Index 
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.  This will remove the Namespaces entry from the Quick Index
 # and from the Folder Tree View (if specified). The default is YES.
 
 SHOW_NAMESPACES        = YES
 
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
-# doxygen should invoke to get the current version for each file (typically from 
-# the version control system). Doxygen will invoke the program by executing (via 
-# popen()) the command <command> <input-file>, where <command> is the value of 
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
-# provided by doxygen. Whatever the program writes to standard output 
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
 # is used as the file version. See the manual for examples.
 
-FILE_VERSION_FILTER    = 
+FILE_VERSION_FILTER    =
 
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 
-# by doxygen. The layout file controls the global structure of the generated 
-# output files in an output format independent way. The create the layout file 
-# that represents doxygen's defaults, run doxygen with the -l option. 
-# You can optionally specify a file name after the option, if omitted 
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. The create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option.
+# You can optionally specify a file name after the option, if omitted
 # DoxygenLayout.xml will be used as the name of the layout file.
 
-LAYOUT_FILE            = 
+LAYOUT_FILE            =
 
 #---------------------------------------------------------------------------
 # configuration options related to warning and progress messages
 #---------------------------------------------------------------------------
 
-# The QUIET tag can be used to turn on/off the messages that are generated 
+# The QUIET tag can be used to turn on/off the messages that are generated
 # by doxygen. Possible values are YES and NO. If left blank NO is used.
 
 QUIET                  = NO
 
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
 # NO is used.
 
 WARNINGS               = YES
 
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
 # automatically be disabled.
 
 WARN_IF_UNDOCUMENTED   = YES
 
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
 # don't exist or using markup commands wrongly.
 
 WARN_IF_DOC_ERROR      = YES
 
-# This WARN_NO_PARAMDOC option can be abled to get warnings for 
-# functions that are documented, but have no documentation for their parameters 
-# or return value. If set to NO (the default) doxygen will only warn about 
-# wrong or incomplete parameter documentation, but not about the absence of 
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
 # documentation.
 
 WARN_NO_PARAMDOC       = NO
 
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text. Optionally the format may contain 
-# $version, which will be replaced by the version of the file (if it could 
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
 # be obtained via FILE_VERSION_FILTER)
 
 WARN_FORMAT            = "$file:$line: $text"
 
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
 # to stderr.
 
-WARN_LOGFILE           = 
+WARN_LOGFILE           =
 
 #---------------------------------------------------------------------------
 # configuration options related to the input files
 #---------------------------------------------------------------------------
 
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
 # with spaces.
 
 INPUT                  = src/ \
                          Doxy.page.h
 
-# This tag can be used to specify the character encoding of the source files 
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
-# also the default input encoding. Doxygen uses libiconv (or the iconv built 
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
 # the list of possible encodings.
 
 INPUT_ENCODING         = UTF-8
 
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
 # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
 
 FILE_PATTERNS          = *.c \
                          *.h
 
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
 # If left blank NO is used.
 
 RECURSIVE              = YES
 
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
 # subdirectory from a directory tree whose root is specified with the INPUT tag.
 
-EXCLUDE                = 
+EXCLUDE                =
 
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
-# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
 # from the input.
 
 EXCLUDE_SYMLINKS       = NO
 
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories. Note that the wildcards are matched 
-# against the file with absolute path, so to exclude all test directories 
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
 # for example use the pattern */test/*
 
-EXCLUDE_PATTERNS       = 
+EXCLUDE_PATTERNS       =
 
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
-# (namespaces, classes, functions, etc.) that should be excluded from the 
-# output. The symbol name can be a fully qualified name, a word, or if the 
-# wildcard * is used, a substring. Examples: ANamespace, AClass, 
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
 # AClass::ANamespace, ANamespace::*Test
 
-EXCLUDE_SYMBOLS        = 
+EXCLUDE_SYMBOLS        =
 
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
 # the \include command).
 
-EXAMPLE_PATH           = 
+EXAMPLE_PATH           =
 
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
 # blank all files are included.
 
 EXAMPLE_PATTERNS       = *
 
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
 # Possible values are YES and NO. If left blank NO is used.
 
 EXAMPLE_RECURSIVE      = NO
 
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
 # the \image command).
 
-IMAGE_PATH             = 
+IMAGE_PATH             =
 
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be
 # ignored.
 
-INPUT_FILTER           = 
+INPUT_FILTER           =
 
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
-# basis.  Doxygen will compare the file name with each pattern and apply the 
-# filter if there is a match.  The filters are a list of the form: 
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis.  Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.  The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
 # is applied to all files.
 
-FILTER_PATTERNS        = 
+FILTER_PATTERNS        =
 
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
 # files to browse (i.e. when SOURCE_BROWSER is set to YES).
 
 FILTER_SOURCE_FILES    = NO
@@ -701,53 +701,53 @@ FILTER_SOURCE_FILES    = NO
 # configuration options related to source browsing
 #---------------------------------------------------------------------------
 
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
 # VERBATIM_HEADERS is set to NO.
 
 SOURCE_BROWSER         = YES
 
-# Setting the INLINE_SOURCES tag to YES will include the body 
+# Setting the INLINE_SOURCES tag to YES will include the body
 # of functions and classes directly in the documentation.
 
 INLINE_SOURCES         = NO
 
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
 # fragments. Normal C and C++ comments will always remain visible.
 
 STRIP_CODE_COMMENTS    = YES
 
-# If the REFERENCED_BY_RELATION tag is set to YES 
-# then for each documented function all documented 
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
 # functions referencing it will be listed.
 
 REFERENCED_BY_RELATION = NO
 
-# If the REFERENCES_RELATION tag is set to YES 
-# then for each documented function all documented entities 
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
 # called/used by that function will be listed.
 
 REFERENCES_RELATION    = NO
 
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
 # link to the source code.  Otherwise they will link to the documentation.
 
 REFERENCES_LINK_SOURCE = YES
 
-# If the USE_HTAGS tag is set to YES then the references to source code 
-# will point to the HTML generated by the htags(1) tool instead of doxygen 
-# built-in source browser. The htags tool is part of GNU's global source 
-# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
 # will need version 4.8.6 or higher.
 
 USE_HTAGS              = NO
 
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
 # which an include is specified. Set to NO to disable this.
 
 VERBATIM_HEADERS       = YES
@@ -756,141 +756,141 @@ VERBATIM_HEADERS       = YES
 # configuration options related to the alphabetical class index
 #---------------------------------------------------------------------------
 
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
 # contains a lot of classes, structs, unions or interfaces.
 
 ALPHABETICAL_INDEX     = YES
 
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
 # in which this list will be split (can be a number in the range [1..20])
 
 COLS_IN_ALPHA_INDEX    = 5
 
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
 # should be ignored while generating the index headers.
 
-IGNORE_PREFIX          = 
+IGNORE_PREFIX          =
 
 #---------------------------------------------------------------------------
 # configuration options related to the HTML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
 # generate HTML output.
 
 GENERATE_HTML          = YES
 
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `html' will be used as the default path.
 
 HTML_OUTPUT            = html
 
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
 # doxygen will generate files with .html extension.
 
 HTML_FILE_EXTENSION    = .html
 
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
 # standard header.
 
-HTML_HEADER            = 
+HTML_HEADER            =
 
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
 # standard footer.
 
-HTML_FOOTER            = 
+HTML_FOOTER            =
 
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet. Note that doxygen will try to copy 
-# the style sheet file to the HTML output directory, so don't put your own 
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
 # stylesheet in the HTML output directory as well, or it will be erased!
 
-HTML_STYLESHEET        = 
+HTML_STYLESHEET        =
 
-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. 
-# Doxygen will adjust the colors in the stylesheet and background images 
-# according to this color. Hue is specified as an angle on a colorwheel, 
-# see http://en.wikipedia.org/wiki/Hue for more information. 
-# For instance the value 0 represents red, 60 is yellow, 120 is green, 
-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. 
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
+# Doxygen will adjust the colors in the stylesheet and background images
+# according to this color. Hue is specified as an angle on a colorwheel,
+# see http://en.wikipedia.org/wiki/Hue for more information.
+# For instance the value 0 represents red, 60 is yellow, 120 is green,
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
 # The allowed range is 0 to 359.
 
 HTML_COLORSTYLE_HUE    = 220
 
-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of 
-# the colors in the HTML output. For a value of 0 the output will use 
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
+# the colors in the HTML output. For a value of 0 the output will use
 # grayscales only. A value of 255 will produce the most vivid colors.
 
 HTML_COLORSTYLE_SAT    = 100
 
-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to 
-# the luminance component of the colors in the HTML output. Values below 
-# 100 gradually make the output lighter, whereas values above 100 make 
-# the output darker. The value divided by 100 is the actual gamma applied, 
-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, 
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
+# the luminance component of the colors in the HTML output. Values below
+# 100 gradually make the output lighter, whereas values above 100 make
+# the output darker. The value divided by 100 is the actual gamma applied,
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
 # and 100 does not change the gamma.
 
 HTML_COLORSTYLE_GAMMA  = 80
 
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 
-# page will contain the date and time when the page was generated. Setting 
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
 # this to NO can help when comparing the output of multiple runs.
 
 HTML_TIMESTAMP         = YES
 
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
 # NO a bullet list will be used.
 
 HTML_ALIGN_MEMBERS     = YES
 
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
-# documentation will contain sections that can be hidden and shown after the 
-# page has loaded. For this to work a browser that supports 
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
 # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
 
 HTML_DYNAMIC_SECTIONS  = NO
 
-# If the GENERATE_DOCSET tag is set to YES, additional index files 
-# will be generated that can be used as input for Apple's Xcode 3 
-# integrated development environment, introduced with OSX 10.5 (Leopard). 
-# To create a documentation set, doxygen will generate a Makefile in the 
-# HTML output directory. Running make will produce the docset in that 
-# directory and running "make install" will install the docset in 
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
-# it at startup. 
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
 # for more information.
 
 GENERATE_DOCSET        = NO
 
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
-# feed. A documentation feed provides an umbrella under which multiple 
-# documentation sets from a single provider (such as a company or product suite) 
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
 # can be grouped.
 
 DOCSET_FEEDNAME        = "Doxygen generated docs"
 
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
-# should uniquely identify the documentation set bundle. This should be a 
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
 # will append .docset to the name.
 
 DOCSET_BUNDLE_ID       = org.doxygen.Project
 
-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify 
-# the documentation publisher. This should be a reverse domain-name style 
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
 # string, e.g. com.mycompany.MyDocSet.documentation.
 
 DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
@@ -899,189 +899,189 @@ DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
 
 DOCSET_PUBLISHER_NAME  = Publisher
 
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
 # of the generated HTML documentation.
 
 GENERATE_HTMLHELP      = NO
 
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
 # written to the html output directory.
 
-CHM_FILE               = 
+CHM_FILE               =
 
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
 # the HTML help compiler on the generated index.hhp.
 
-HHC_LOCATION           = 
+HHC_LOCATION           =
 
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
 # it should be included in the master .chm file (NO).
 
 GENERATE_CHI           = NO
 
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file 
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
 # content.
 
-CHM_INDEX_ENCODING     = 
+CHM_INDEX_ENCODING     =
 
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
 # normal table of contents (NO) in the .chm file.
 
 BINARY_TOC             = NO
 
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
 # to the contents of the HTML help documentation and to the tree view.
 
 TOC_EXPAND             = NO
 
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 
-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated 
-# that can be used as input for Qt's qhelpgenerator to generate a 
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
+# that can be used as input for Qt's qhelpgenerator to generate a
 # Qt Compressed Help (.qch) of the generated HTML documentation.
 
 GENERATE_QHP           = NO
 
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can 
-# be used to specify the file name of the resulting .qch file. 
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
 # The path specified is relative to the HTML output folder.
 
-QCH_FILE               = 
+QCH_FILE               =
 
-# The QHP_NAMESPACE tag specifies the namespace to use when generating 
-# Qt Help Project output. For more information please see 
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
 # http://doc.trolltech.com/qthelpproject.html#namespace
 
 QHP_NAMESPACE          = org.doxygen.Project
 
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 
-# Qt Help Project output. For more information please see 
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
 # http://doc.trolltech.com/qthelpproject.html#virtual-folders
 
 QHP_VIRTUAL_FOLDER     = doc
 
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to 
-# add. For more information please see 
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
+# add. For more information please see
 # http://doc.trolltech.com/qthelpproject.html#custom-filters
 
-QHP_CUST_FILTER_NAME   = 
+QHP_CUST_FILTER_NAME   =
 
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the 
-# custom filter to add. For more information please see 
-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters"> 
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
 # Qt Help Project / Custom Filters</a>.
 
-QHP_CUST_FILTER_ATTRS  = 
+QHP_CUST_FILTER_ATTRS  =
 
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 
-# project's 
-# filter section matches. 
-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes"> 
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
 # Qt Help Project / Filter Attributes</a>.
 
-QHP_SECT_FILTER_ATTRS  = 
+QHP_SECT_FILTER_ATTRS  =
 
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 
-# be used to specify the location of Qt's qhelpgenerator. 
-# If non-empty doxygen will try to run qhelpgenerator on the generated 
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
 # .qhp file.
 
-QHG_LOCATION           = 
+QHG_LOCATION           =
 
-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files  
-# will be generated, which together with the HTML files, form an Eclipse help 
-# plugin. To install this plugin and make it available under the help contents 
-# menu in Eclipse, the contents of the directory containing the HTML and XML 
-# files needs to be copied into the plugins directory of eclipse. The name of 
-# the directory within the plugins directory should be the same as 
-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before 
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+# will be generated, which together with the HTML files, form an Eclipse help
+# plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
 # the help appears.
 
 GENERATE_ECLIPSEHELP   = NO
 
-# A unique identifier for the eclipse help plugin. When installing the plugin 
-# the directory name containing the HTML and XML files should also have 
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
 # this name.
 
 ECLIPSE_DOC_ID         = org.doxygen.Project
 
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
 # the value YES disables it.
 
 DISABLE_INDEX          = NO
 
-# This tag can be used to set the number of enum values (range [1..20]) 
+# This tag can be used to set the number of enum values (range [1..20])
 # that doxygen will group on one line in the generated HTML documentation.
 
 ENUM_VALUES_PER_LINE   = 4
 
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 
-# structure should be generated to display hierarchical information. 
-# If the tag value is set to YES, a side panel will be generated 
-# containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
 # Windows users are probably better off using the HTML help feature.
 
 GENERATE_TREEVIEW      = NO
 
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, 
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
 # and Class Hierarchy pages using a tree view instead of an ordered list.
 
 USE_INLINE_TREES       = NO
 
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
 # is shown.
 
 TREEVIEW_WIDTH         = 250
 
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open 
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
 # links to external symbols imported via tag files in a separate window.
 
 EXT_LINKS_IN_WINDOW    = NO
 
-# Use this tag to change the font size of Latex formulas included 
-# as images in the HTML documentation. The default is 10. Note that 
-# when you change the font size after a successful doxygen run you need 
-# to manually remove any form_*.png images from the HTML output directory 
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
 # to force them to be regenerated.
 
 FORMULA_FONTSIZE       = 10
 
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images 
-# generated for formulas are transparent PNGs. Transparent PNGs are 
-# not supported properly for IE 6.0, but are supported on all modern browsers. 
-# Note that when changing this option you need to delete any form_*.png files 
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are
+# not supported properly for IE 6.0, but are supported on all modern browsers.
+# Note that when changing this option you need to delete any form_*.png files
 # in the HTML output before the changes have effect.
 
 FORMULA_TRANSPARENT    = YES
 
-# When the SEARCHENGINE tag is enabled doxygen will generate a search box 
-# for the HTML output. The underlying search engine uses javascript 
-# and DHTML and should work on any modern browser. Note that when using 
-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets 
-# (GENERATE_DOCSET) there is already a search function so this one should 
-# typically be disabled. For large projects the javascript based search engine 
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
+# (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
 # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
 
 SEARCHENGINE           = YES
 
-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be 
-# implemented using a PHP enabled web server instead of at the web client 
-# using Javascript. Doxygen will generate the search PHP script and index 
-# file to put on the web server. The advantage of the server 
-# based approach is that it scales better to large projects and allows 
-# full text search. The disadvances is that it is more difficult to setup 
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a PHP enabled web server instead of at the web client
+# using Javascript. Doxygen will generate the search PHP script and index
+# file to put on the web server. The advantage of the server
+# based approach is that it scales better to large projects and allows
+# full text search. The disadvances is that it is more difficult to setup
 # and does not have live searching capabilities.
 
 SERVER_BASED_SEARCH    = NO
@@ -1090,84 +1090,84 @@ SERVER_BASED_SEARCH    = NO
 # configuration options related to the LaTeX output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
 # generate Latex output.
 
 GENERATE_LATEX         = NO
 
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `latex' will be used as the default path.
 
 LATEX_OUTPUT           = latex
 
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
-# invoked. If left blank `latex' will be used as the default command name. 
-# Note that when enabling USE_PDFLATEX this option is only used for 
-# generating bitmaps for formulas in the HTML output, but not in the 
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
 # Makefile that is written to the output directory.
 
 LATEX_CMD_NAME         = latex
 
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
 # default command name.
 
 MAKEINDEX_CMD_NAME     = makeindex
 
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
 # save some trees in general.
 
 COMPACT_LATEX          = NO
 
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
 # executive. If left blank a4wide will be used.
 
 PAPER_TYPE             = a4wide
 
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
 # packages that should be included in the LaTeX output.
 
-EXTRA_PACKAGES         = 
+EXTRA_PACKAGES         =
 
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
 # standard header. Notice: only use this tag if you know what you are doing!
 
-LATEX_HEADER           = 
+LATEX_HEADER           =
 
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
 # This makes the output suitable for online browsing using a pdf viewer.
 
 PDF_HYPERLINKS         = YES
 
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
 # higher quality PDF documentation.
 
 USE_PDFLATEX           = YES
 
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
 # This option is also used when generating formulas in HTML.
 
 LATEX_BATCHMODE        = NO
 
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
 # in the output.
 
 LATEX_HIDE_INDICES     = NO
 
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include 
-# source code with syntax highlighting in the LaTeX output. 
-# Note that which sources are shown also depends on other settings 
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
 # such as SOURCE_BROWSER.
 
 LATEX_SOURCE_CODE      = NO
@@ -1176,68 +1176,68 @@ LATEX_SOURCE_CODE      = NO
 # configuration options related to the RTF output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
 # other RTF readers or editors.
 
 GENERATE_RTF           = NO
 
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `rtf' will be used as the default path.
 
 RTF_OUTPUT             = rtf
 
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
 # save some trees in general.
 
 COMPACT_RTF            = NO
 
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
 # Note: wordpad (write) and others do not support links.
 
 RTF_HYPERLINKS         = NO
 
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
 # replacements, missing definitions are set to their default value.
 
-RTF_STYLESHEET_FILE    = 
+RTF_STYLESHEET_FILE    =
 
-# Set optional variables used in the generation of an rtf document. 
+# Set optional variables used in the generation of an rtf document.
 # Syntax is similar to doxygen's config file.
 
-RTF_EXTENSIONS_FILE    = 
+RTF_EXTENSIONS_FILE    =
 
 #---------------------------------------------------------------------------
 # configuration options related to the man page output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
 # generate man pages
 
 GENERATE_MAN           = NO
 
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `man' will be used as the default path.
 
 MAN_OUTPUT             = man
 
-# The MAN_EXTENSION tag determines the extension that is added to 
+# The MAN_EXTENSION tag determines the extension that is added to
 # the generated man pages (default is the subroutine's section .3)
 
 MAN_EXTENSION          = .3
 
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
 # would be unable to find the correct page. The default is NO.
 
 MAN_LINKS              = NO
@@ -1246,33 +1246,33 @@ MAN_LINKS              = NO
 # configuration options related to the XML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
 # the code including all documentation.
 
 GENERATE_XML           = NO
 
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `xml' will be used as the default path.
 
 XML_OUTPUT             = xml
 
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
 # syntax of the XML files.
 
-XML_SCHEMA             = 
+XML_SCHEMA             =
 
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
 # syntax of the XML files.
 
-XML_DTD                = 
+XML_DTD                =
 
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
 # enabling this will significantly increase the size of the XML output.
 
 XML_PROGRAMLISTING     = YES
@@ -1281,10 +1281,10 @@ XML_PROGRAMLISTING     = YES
 # configuration options for the AutoGen Definitions output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
 # and incomplete at the moment.
 
 GENERATE_AUTOGEN_DEF   = NO
@@ -1293,97 +1293,97 @@ GENERATE_AUTOGEN_DEF   = NO
 # configuration options related to the Perl module output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
 # moment.
 
 GENERATE_PERLMOD       = NO
 
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
 # to generate PDF and DVI output from the Perl module output.
 
 PERLMOD_LATEX          = NO
 
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader.  This is useful
+# if you want to understand what is going on.  On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
 # and Perl will parse it just the same.
 
 PERLMOD_PRETTY         = YES
 
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
 # Makefile don't overwrite each other's variables.
 
-PERLMOD_MAKEVAR_PREFIX = 
+PERLMOD_MAKEVAR_PREFIX =
 
 #---------------------------------------------------------------------------
 # Configuration options related to the preprocessor
 #---------------------------------------------------------------------------
 
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
 # files.
 
 ENABLE_PREPROCESSING   = YES
 
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
 # way by setting EXPAND_ONLY_PREDEF to YES.
 
 MACRO_EXPANSION        = NO
 
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
 # PREDEFINED and EXPAND_AS_DEFINED tags.
 
 EXPAND_ONLY_PREDEF     = NO
 
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
 # in the INCLUDE_PATH (see below) will be search if a #include is found.
 
 SEARCH_INCLUDES        = YES
 
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
 # the preprocessor.
 
-INCLUDE_PATH           = 
+INCLUDE_PATH           =
 
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
 # be used.
 
-INCLUDE_FILE_PATTERNS  = 
+INCLUDE_FILE_PATTERNS  =
 
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed. To prevent a macro definition from being 
-# undefined via #undef or recursively expanded use the := operator 
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
 # instead of the = operator.
 
-PREDEFINED             = 
+PREDEFINED             =
 
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
 # Use the PREDEFINED tag if you want to use a different macro definition.
 
-EXPAND_AS_DEFINED      = 
+EXPAND_AS_DEFINED      =
 
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse 
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
 # the parser if not removed.
 
 SKIP_FUNCTION_MACROS   = YES
@@ -1392,41 +1392,41 @@ SKIP_FUNCTION_MACROS   = YES
 # Configuration::additions related to external references
 #---------------------------------------------------------------------------
 
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
-# does not have to be run to correct the links. 
-# Note that each tag file must have a unique name 
-# (where the name does NOT include the path) 
-# If a tag file is not located in the directory in which doxygen 
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+#   TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+#   TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
 # is run, you must also specify the path to the tagfile here.
 
-TAGFILES               = 
+TAGFILES               =
 
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
 # a tag file that is based on the input files it reads.
 
-GENERATE_TAGFILE       = 
+GENERATE_TAGFILE       =
 
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
 # will be listed.
 
 ALLEXTERNALS           = NO
 
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
 # be listed.
 
 EXTERNAL_GROUPS        = YES
 
-# The PERL_PATH should be the absolute path and name of the perl script 
+# The PERL_PATH should be the absolute path and name of the perl script
 # interpreter (i.e. the result of `which perl').
 
 PERL_PATH              = /usr/bin/perl
@@ -1435,200 +1435,200 @@ PERL_PATH              = /usr/bin/perl
 # Configuration options related to the dot tool
 #---------------------------------------------------------------------------
 
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
-# or super classes. Setting the tag to NO turns the diagrams off. Note that 
-# this option is superseded by the HAVE_DOT option below. This is only a 
-# fallback. It is recommended to install and use dot, since it yields more 
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
 # powerful graphs.
 
 CLASS_DIAGRAMS         = YES
 
-# You can define message sequence charts within doxygen comments using the \msc 
-# command. Doxygen will then run the mscgen tool (see 
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
-# the mscgen tool resides. If left empty the tool is assumed to be found in the 
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
 # default search path.
 
-MSCGEN_PATH            = 
+MSCGEN_PATH            =
 
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
 # or is not a class.
 
 HIDE_UNDOC_RELATIONS   = YES
 
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
 # have no effect if this option is set to NO (the default)
 
 HAVE_DOT               = NO
 
-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is 
-# allowed to run in parallel. When set to 0 (the default) doxygen will 
-# base this on the number of processors available in the system. You can set it 
-# explicitly to a value larger than 0 to get control over the balance 
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
+# allowed to run in parallel. When set to 0 (the default) doxygen will
+# base this on the number of processors available in the system. You can set it
+# explicitly to a value larger than 0 to get control over the balance
 # between CPU load and processing speed.
 
 DOT_NUM_THREADS        = 0
 
-# By default doxygen will write a font called FreeSans.ttf to the output 
-# directory and reference it in all dot files that doxygen generates. This 
-# font does not include all possible unicode characters however, so when you need 
-# these (or just want a differently looking font) you can specify the font name 
-# using DOT_FONTNAME. You need need to make sure dot is able to find the font, 
-# which can be done by putting it in a standard location or by setting the 
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory 
+# By default doxygen will write a font called FreeSans.ttf to the output
+# directory and reference it in all dot files that doxygen generates. This
+# font does not include all possible unicode characters however, so when you need
+# these (or just want a differently looking font) you can specify the font name
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
 # containing the font.
 
 DOT_FONTNAME           = FreeSans.ttf
 
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
 # The default size is 10pt.
 
 DOT_FONTSIZE           = 10
 
-# By default doxygen will tell dot to use the output directory to look for the 
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a 
-# different font using DOT_FONTNAME you can set the path where dot 
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
 # can find it using this tag.
 
-DOT_FONTPATH           = 
+DOT_FONTPATH           =
 
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
 # the CLASS_DIAGRAMS tag to NO.
 
 CLASS_GRAPH            = YES
 
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
 # class references variables) of the class with other documented classes.
 
 COLLABORATION_GRAPH    = YES
 
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
 # will generate a graph for groups, showing the direct groups dependencies
 
 GROUP_GRAPHS           = YES
 
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
 # Language.
 
 UML_LOOK               = NO
 
-# If set to YES, the inheritance and collaboration graphs will show the 
+# If set to YES, the inheritance and collaboration graphs will show the
 # relations between templates and their instances.
 
 TEMPLATE_RELATIONS     = NO
 
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
 # other documented files.
 
 INCLUDE_GRAPH          = YES
 
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
 # indirectly include this file.
 
 INCLUDED_BY_GRAPH      = YES
 
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
-# doxygen will generate a call dependency graph for every global function 
-# or class method. Note that enabling this option will significantly increase 
-# the time of a run. So in most cases it will be better to enable call graphs 
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
 # for selected functions only using the \callgraph command.
 
 CALL_GRAPH             = NO
 
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
-# doxygen will generate a caller dependency graph for every global function 
-# or class method. Note that enabling this option will significantly increase 
-# the time of a run. So in most cases it will be better to enable caller 
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
 # graphs for selected functions only using the \callergraph command.
 
 CALLER_GRAPH           = NO
 
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
 # will graphical hierarchy of all classes instead of a textual one.
 
 GRAPHICAL_HIERARCHY    = YES
 
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
-# then doxygen will show the dependencies a directory has on other directories 
-# in a graphical way. The dependency relations are determined by the #include 
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
 # relations between the files in the directories.
 
 DIRECTORY_GRAPH        = YES
 
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
-# generated by dot. Possible values are png, jpg, or gif 
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
 # If left blank png will be used.
 
 DOT_IMAGE_FORMAT       = png
 
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
 # found. If left blank, it is assumed the dot tool can be found in the path.
 
-DOT_PATH               = 
+DOT_PATH               =
 
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
 # \dotfile command).
 
-DOTFILE_DIRS           = 
+DOTFILE_DIRS           =
 
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
-# nodes that will be shown in the graph. If the number of nodes in a graph 
-# becomes larger than this value, doxygen will truncate the graph, which is 
-# visualized by representing a node as a red box. Note that doxygen if the 
-# number of direct children of the root node in a graph is already larger than 
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
 # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
 
 DOT_GRAPH_MAX_NODES    = 50
 
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
-# graphs generated by dot. A depth value of 3 means that only nodes reachable 
-# from the root by following a path via at most 3 edges will be shown. Nodes 
-# that lay further from the root node will be omitted. Note that setting this 
-# option to 1 or 2 may greatly reduce the computation time needed for large 
-# code bases. Also note that the size of a graph can be further restricted by 
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
 # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
 
 MAX_DOT_GRAPH_DEPTH    = 0
 
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
-# background. This is disabled by default, because dot on Windows does not 
-# seem to support this out of the box. Warning: Depending on the platform used, 
-# enabling this option may lead to badly anti-aliased labels on the edges of 
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
 # a graph (i.e. they become hard to read).
 
 DOT_TRANSPARENT        = NO
 
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
-# files in one run (i.e. multiple -o and -T options on the command line). This 
-# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
 # support this, this feature is disabled by default.
 
 DOT_MULTI_TARGETS      = NO
 
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
 # arrows in the dot generated graphs.
 
 GENERATE_LEGEND        = YES
 
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
 # the various graphs.
 
 DOT_CLEANUP            = YES
diff --git a/README b/README
index fdd21729705f2f2b97bf709d3bf51ae47ed78957..9af717ba7c01a8142b583a6bda9f98990ed6ceb8 100644
--- a/README
+++ b/README
@@ -67,7 +67,7 @@ $ sudo make install
 $ sudo ldconfig
 
 Alternative packages for I386:
-$ # the required version of liburcu is not available in the default package 
+$ # the required version of liburcu is not available in the default package
 $ # sources.
 $
 $ wget http://bd.archive.ubuntu.com/ubuntu/pool/universe/libu/liburcu/liburcu0_0.5.4-1_i386.deb
@@ -142,7 +142,7 @@ Prerequisites:
 
 $ mkdir liburcu && cd liburcu
 $ wget "http://lttng.org/files/urcu/userspace-rcu-0.6.7.tar.bz2"
-$ patch -p1 < ../scripts/urcu-tls-compat.patch 
+$ patch -p1 < ../scripts/urcu-tls-compat.patch
 $ autoconf && ./configure && make && sudo make install
 $ # or follow installation instructions in INSTALL
 
@@ -160,13 +160,13 @@ Not all prerequisites are preinstalled for OS X.
 - liburcu >= 0.7.0 works with supplied compiler, however ARCH must still be set
   - alternative is to set it with configure parameter --target
 
-Compiling Knot DNS with gcc-mp-4.6 is recommended, but not necessary. 
+Compiling Knot DNS with gcc-mp-4.6 is recommended, but not necessary.
 
 Running
 =======
 
-First, each server needs configuration file. 
-Please see samples/knot.sample.conf for reference. 
+First, each server needs configuration file.
+Please see samples/knot.sample.conf for reference.
 Minimal configuration can be found in samples/knot.min.conf
 Configuration zone has to specify:
 * storage for PID files, compiled zones etc.
@@ -192,11 +192,10 @@ Running as daemon
 
 Controller runs server in daemonized mode as default. Disadvantage is, that
 it closes stdout/stderr so you need to set up either syslog or logging to
-own files in the configuration. Controller parameter '-w' waits for the 
+own files in the configuration. Controller parameter '-w' waits for the
 operation to finish. Let's test server functionality.
 
 $ knotc -c myserver.conf -w start # start server
 $ dig @$ADDR -p $PORT example.com # issue a query and see result
 $ ...
 $ knotc -c myserver.conf -w stop  # stop server
-
diff --git a/RELNOTES b/RELNOTES
index a5b04ceeb35b10df30ecf93a2e8dc13735c9858d..606fb23c5ca509854b44bc17cee67a9ffb5f6547 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -32,7 +32,7 @@ v1.2.0-rc2 - Feb 15, 2013
 
 Bugfixes:
 	* Fixed processing of some non-standard dnames.
-	* Correct checking of label length bounds in some cases. 
+	* Correct checking of label length bounds in some cases.
 	* More compliant rcodes in case of DDNS/TSIG failures.
 	* Correct processing of malformed DDNS prereq section.
 
@@ -55,7 +55,7 @@ v1.1.3-rc1 - Dec 6, 2012
 ------------------------
 
 Bugfixes:
-	* Fixed answering DS queries (RRSIGs not together with DS, AA bit 
+	* Fixed answering DS queries (RRSIGs not together with DS, AA bit
           missing).
 	* Fixed setting ARCOUNT in some error responses with EDNS enabled.
 	* Fixed crash when compiling zone zone with NSEC3PARAM but no NSEC3
@@ -89,17 +89,17 @@ v1.1.1-rc1 - Oct 23, 2012
 
 Bugfixes:
         * Crash after IXFR in certain cases when adding RRSIG in an IXFR.
-        * Fixed behaviour when incoming IXFR removes a zone cut. Previously 
-          occluded names now become properly visible. Previously lead to a 
+        * Fixed behaviour when incoming IXFR removes a zone cut. Previously
+          occluded names now become properly visible. Previously lead to a
           crash when the server was asked for the previously occluded name.
-        * Fixed handling of zero-length strings in text zone dump. Caused the 
+        * Fixed handling of zero-length strings in text zone dump. Caused the
           compilation to fail.
-        * Fixed TSIG algorithm name comparison - the names should be in 
+        * Fixed TSIG algorithm name comparison - the names should be in
           canonical form.
         * Fixed handling unknown RR types with type less than 251.
 
 Features:
-        * Improved compression of packets. Out-of-zone dnames present in RDATA 
+        * Improved compression of packets. Out-of-zone dnames present in RDATA
           were not compressed.
         * Slave zones are now automatically refreshed after startup.
         * Proper response to IXFR/UDP query (returns SOA in Authority section).
@@ -122,7 +122,7 @@ New features:
 	* Signing SOA with TSIG queries when checking zone version with master.
 
 Bugfixes:
-	* Fixed ixfr-from-differences journal generation in case of IPSECKEY 
+	* Fixed ixfr-from-differences journal generation in case of IPSECKEY
           and APL records.
 	* Fixed possible leak on server shutdown with a pending transfer.
 
@@ -142,7 +142,7 @@ New features:
         * Following DNAME if the synthetized name is in the same zone.
 
 Bugfixes:
-        * Crash when zone contained RRSIG signing a CNAME, but did not 
+        * Crash when zone contained RRSIG signing a CNAME, but did not
           contain the CNAME.
         * Malformed packets parsing.
         * Failed IXFR caused memory leaks.
@@ -153,10 +153,10 @@ Bugfixes:
         * Handling RRSets with different TTLs - TTL from the first RR is used.
         * Synchronization of zone reload and zone transfers.
         * Fixed build on NetBSD 5 and FreeBSD.
-        * Fixed binding to both IPv4 and IPv6 at the same time on special 
+        * Fixed binding to both IPv4 and IPv6 at the same time on special
           interfaces.
         * Fixed access rights of created files.
-        * Semantic checks corrupted RDATA domain names which are covered by 
+        * Semantic checks corrupted RDATA domain names which are covered by
           wildcard in the same zone.
 
 Other improvements:
@@ -165,7 +165,7 @@ Other improvements:
         * More detailed log messages (mostly transfer-related).
         * Copying Question section to error responses.
         * Using zone name from config file as default origin in zone file.
-        * Additional records are now added to response also from 
+        * Additional records are now added to response also from
           wildcard-covered names.
 
 v1.0.6 - Jun 13, 2012
@@ -191,16 +191,16 @@ New features:
         * RFC3339-complaint format of log time.
         * Support for TLSA (RR type 52).
         * knotc checkzone (as a dry-run of zone compile).
-        * knotc refresh for forcing Knot to update all zones from master 
+        * knotc refresh for forcing Knot to update all zones from master
           servers.
         * Reopening log files upon start (used to truncate them).
 
 Bugfixes:
         * Copying OPCODE and RD bit from query to NOTIMPL responses.
-        * Corrected response to CNAME queries if the canonical name was also 
+        * Corrected response to CNAME queries if the canonical name was also
           an alias (was adding the whole CNAME chain to the response).
         * Fixed crash when NS or MX points to an alias.
-        * Fixed problem with early closing of filedescriptors (lead to crash 
+        * Fixed problem with early closing of filedescriptors (lead to crash
           when compiling and loading or bootstrapping and restarting the server
           with a lot of zones).
 
@@ -281,7 +281,7 @@ New features:
         * CNAME loop detection.
         * Timeout on TCP connections.
         * Basic defense against DoS attacks.
-        
+
 Bugfixes:
         * Fixed IXFR processing.
         * Patched URCU so that it compiles on architectures without TLS in compiler (NetBSD, OpenBSD).
@@ -312,10 +312,10 @@ New features:
         * Use of sendmmsg() on Linux 3.0+ (improves performance).
 
 Bugfixes:
-        * Knot was not accepting AXFR-style IXFR with first SOA in a separate 
+        * Knot was not accepting AXFR-style IXFR with first SOA in a separate
           packet (i.e. from Power DNS).
         * Wrong SOA TTL in negative answers.
-        * Wrong max packet size for outgoing transfers (was causing the 
+        * Wrong max packet size for outgoing transfers (was causing the
           packets to be malformed).
         * Wrong handling of WKS record in zone compiler.
         * Problems with zone bootstrapping.
diff --git a/astylerc b/astylerc
index 95703db500cf1ebda2ad8aad65ec2397d3335111..c37e3fd78ffbd5585531f610843d9e367aae807f 100644
--- a/astylerc
+++ b/astylerc
@@ -9,4 +9,3 @@
 --align-pointer=name
 --mode=c
 --lineend=linux
-
diff --git a/doc/configuration.texi b/doc/configuration.texi
index b979c3815e5e4fe8486c65e63ec3294a5947d6d7..6ad8d663e40b129e143b1eacacaee36dbd202c68 100644
--- a/doc/configuration.texi
+++ b/doc/configuration.texi
@@ -4,12 +4,12 @@
 In this chapter we provide suggested configurations and explain the meaning of individual configuration options.
 
 @menu
-* Minimal configuration::       
-* Slave configuration::       
-* Master configuration::       
-* Configuring multiple interfaces::       
+* Minimal configuration::
+* Slave configuration::
+* Master configuration::
+* Configuring multiple interfaces::
 * Using DNS UPDATE::
-* Remote control interface::       
+* Remote control interface::
 * Enabling zone semantic checks::
 * Creating IXFR differences from zone file changes::
 * Using Response Rate Limiting::
@@ -43,21 +43,21 @@ log @{
 @}
 
 zones @{
-  example.com @{  
+  example.com @{
     file "/etc/knot/example.com";
   @}
 @}
-	
+
 @end example
 
 @page
 Now let's go step by step through this minimal configuration file:
 
-@enumerate 
+@enumerate
 
 @item
 In @code{system} statement we have configured @code{storage}
-directory where Knot DNS will store compiled zone files, 
+directory where Knot DNS will store compiled zone files,
 PID file and for slave zone also their journal files. (See @ref{system} and @ref{storage})
 
 @item
@@ -103,7 +103,7 @@ remotes @{
   subnet1 @{ address 192.168.1.0/24; @}
 @}
 zones @{
-  example.com @{  
+  example.com @{
     file "example.com"; # relative to 'storage'
     xfr-in master;      # define 'master' for this zone
     notify-in master;   # also allow NOTIFY from 'master'
@@ -127,7 +127,7 @@ remotes @{
   master @{ address 127.0.0.1@@53; key key0; @}
 @}
 zones @{
-  example.com @{  
+  example.com @{
     file "example.com"; # relative to 'storage'
     xfr-in master;      # define 'master' for this zone
     notify-in master;   # also allow NOTIFY from 'master'
@@ -151,7 +151,7 @@ remotes @{
   subnet2 @{ address 192.168.2.0/8; @}
 @}
 zones @{
-  example.com @{  
+  example.com @{
     file "/var/zones/example.com";
     xfr-out subnet1, subnet2; # allow outgoing transfers
     notify-out slave;
@@ -170,7 +170,7 @@ remotes @{
   any @{ address 0.0.0.0/0; key key0; @}
 @}
 zones @{
-  example.com @{  
+  example.com @{
     file "/var/zones/example.com";
     xfr-out any; # uses 'any' remote secured with TSIG key 'key0'
   @}
@@ -195,7 +195,7 @@ interfaces @{
 
 As noted in examples for master and slave, it is possible to accept DNS UPDATE messages.
 When the zone is configured as a slave and DNS UPDATE messages is accepted, server forwards the
-message to its primary master specified by @code{xfr-in} directive. When it receives 
+message to its primary master specified by @code{xfr-in} directive. When it receives
 the response from primary master, it forwards it back to the originator. This finishes the transaction.
 
 However, if the zone is configured as master (i.e. not having any @code{xfr-in} directive), it accepts
@@ -238,7 +238,7 @@ remotes @{
 control @{
 	listen-on @{ address 127.0.0.1; @}
 	allow ctl;
-@} 
+@}
 @end example
 
 The @code{allow} keyword accepts an ACL list, similar to @code{xfr-in} or @code{xfr-out},
@@ -253,7 +253,7 @@ which checks are enabled by default and which are optional.
 
 @node Creating IXFR differences from zone file changes
 @section Creating IXFR differences from zone file changes
-If Knot is being run as a master server, experimental feature @code{ixfr-from-differences} 
+If Knot is being run as a master server, experimental feature @code{ixfr-from-differences}
 can be enabled to create IXFR differences from changes made to the master zone file.
 See @ref{Controlling running daemon} for more information. For more about @code{zones} statement see @ref{zones}.
 
@@ -280,8 +280,6 @@ Example configuration:
 @example
 system @{
 	rate-limit 200;    # Each flow is allowed to 200 resp. per second
-	rate-limit-slip 2; # Every other response is slipped (default) 
+	rate-limit-slip 2; # Every other response is slipped (default)
 @}
 @end example
-
-
diff --git a/doc/installation.texi b/doc/installation.texi
index baec5eb8dd972b67cf15a120fd1b7e42d86a7e05..e89db1daa54145559a3f58be0b08c9a97863361e 100644
--- a/doc/installation.texi
+++ b/doc/installation.texi
@@ -2,10 +2,10 @@
 @chapter Knot DNS Installation
 
 @menu
-* Required build environment::  
-* Required libraries::          
-* Installation from the sources::  
-* Installation from packages::  
+* Required build environment::
+* Required libraries::
+* Installation from the sources::
+* Installation from packages::
 @end menu
 
 @node Required build environment
@@ -34,7 +34,7 @@ bison >= 2.3
 
 Knot DNS requires few libraries to be compiled:
 
-@itemize 
+@itemize
 
 @item
 OpenSSL, at least 0.9.8
@@ -46,7 +46,7 @@ Userspace RCU, at least 0.5.4
 libcap-ng, at least 0.6.4 (optional library)
 @end itemize
 
-If libcap-ng library is available, Knot DNS will take advantage of 
+If libcap-ng library is available, Knot DNS will take advantage of
 the POSIX 1003.1e capabilites(7) by sandboxing the exposed threads.
 Most rights are stripped from the exposed threads for security reasons.
 
@@ -56,7 +56,7 @@ your system or distribution.  If not, zlib resides at
 @url{http://www.openssl.org}.
 
 @menu
-* Userspace RCU::               
+* Userspace RCU::
 @end menu
 
 @node Userspace RCU
@@ -89,9 +89,9 @@ After unpacking the sources, the compilation and installation is
 a quite straightforward process using autotools.
 
 @menu
-* Configuring and generating Makefiles::  
-* Compilation::                 
-* Installation::                
+* Configuring and generating Makefiles::
+* Compilation::
+* Installation::
 @end menu
 
 @node Configuring and generating Makefiles
@@ -184,10 +184,10 @@ the Knot DNS might already be available in your favourite
 distribution, or in a ports tree.
 
 @menu
-* Installing Knot DNS packages on Debian::  
-* Installing Knot DNS packages on Ubuntu::  
+* Installing Knot DNS packages on Debian::
+* Installing Knot DNS packages on Ubuntu::
 * Installing Knot DNS packages on Fedora::
-* Installing Knot DNS from ports on FreeBSD::  
+* Installing Knot DNS from ports on FreeBSD::
 @end menu
 
 @node Installing Knot DNS packages on Debian
@@ -218,7 +218,7 @@ deb-src http://deb.knot-dns.cz/debian/ <codename> main
 EOF
 $ apt-get update
 $ apt-get install knot
-	
+
 @end example
 
 @node Installing Knot DNS packages on Ubuntu
@@ -238,7 +238,7 @@ the time of writing this manual this includes Ubuntu 10.04 LTS, 11.04,
 11.10 and 12.04 LTS.
 
 @menu
-* Adding official PPA repository for Knot DNS::  
+* Adding official PPA repository for Knot DNS::
 @end menu
 
 @node Adding official PPA repository for Knot DNS
@@ -253,7 +253,7 @@ the PPA.
 $ sudo add-apt-repository ppa:cz.nic-labs/knot-dns
 $ sudo apt-get update
 $ sudo apt-get install knot
-	  
+
 @end example
 
 @noindent
@@ -313,7 +313,6 @@ following command as the root user:
 Knot DNS is in ports tree under @code{dns/knot}.
 
 @example
-$ cd /usr/ports/dns/knot  
+$ cd /usr/ports/dns/knot
 $ sudo make install
 @end example
-
diff --git a/doc/introduction.texi b/doc/introduction.texi
index 36446364232ed1ba461e13b92556cbd4eeed40e8..39e10a27e75272516047e24917b40f8d243a6d64 100644
--- a/doc/introduction.texi
+++ b/doc/introduction.texi
@@ -5,16 +5,16 @@ The reader of this document is assumed to know the principles of
 Domain Name System.
 
 @menu
-* What is Knot DNS::            
+* What is Knot DNS::
 * Knot DNS features::
-* Scope of this document::           
+* Scope of this document::
 @end menu
 
 @node What is Knot DNS
 @section What is Knot DNS
 
-Knot DNS is a high-performance open source DNS server. It 
-implements only authoritative domain name service. Knot DNS 
+Knot DNS is a high-performance open source DNS server. It
+implements only authoritative domain name service. Knot DNS
 is best suited for use on TLD domains but can reliably serve
 any other zones as well.
 
@@ -47,13 +47,13 @@ Server features:
 @item Semantic checks of zones
 @end itemize
 
-For more info and downloads see 
+For more info and downloads see
 @url{http://www.knot-dns.cz, www.knot-dns.cz}.
 
-Git repository: 
+Git repository:
 @url{git://git.nic.cz/knot-dns.git, git://git.nic.cz/knot-dns.git}
 
-Knot DNS issue tracker: 
+Knot DNS issue tracker:
 @url{https://git.nic.cz/redmine/projects/knot-dns,
 git.nic.cz/redmine/projects/knot-dns}
 
@@ -65,4 +65,3 @@ Knot DNS users mailing list:
 
 This document covers the basic information on installing,
 configuring and troubleshooting the Knot DNS server.
-
diff --git a/doc/knot.texi b/doc/knot.texi
index ed67ec39333e766b6e75379d7b3019283c0ffc41..174f143a870a33bfafe75ded6d0cb293bb29e088 100644
--- a/doc/knot.texi
+++ b/doc/knot.texi
@@ -59,71 +59,71 @@ This manual is for Knot DNS (version @value{VERSION}, @value{UPDATED}).
 @end ifnottex
 
 @menu
-* Introduction::                
-* Knot DNS Resource Requirements::  
-* Knot DNS Installation::       
-* Knot DNS Configuration::      
-* Running Knot DNS::      
-* Troubleshooting::             
-* Statement Index::             
-* Knot DNS Configuration Reference::  
+* Introduction::
+* Knot DNS Resource Requirements::
+* Knot DNS Installation::
+* Knot DNS Configuration::
+* Running Knot DNS::
+* Troubleshooting::
+* Statement Index::
+* Knot DNS Configuration Reference::
 
 @detailmenu
  --- The Detailed Node Listing ---
 
 Introduction
 
-* What is Knot DNS::            
+* What is Knot DNS::
 * Knot DNS features::
-* Scope of this document::           
+* Scope of this document::
 
 Knot DNS Resource Requirements
 
-* Hardware requirements::       
-* CPU requirements::            
-* Memory requirements::         
-* Supported operating system::  
+* Hardware requirements::
+* CPU requirements::
+* Memory requirements::
+* Supported operating system::
 
 Knot DNS Installation
 
-* Required build environment::  
-* Required libraries::          
-* Installation from the sources::  
-* Installation from packages::  
+* Required build environment::
+* Required libraries::
+* Installation from the sources::
+* Installation from packages::
 
 Required libraries
 
-* Userspace RCU::               
+* Userspace RCU::
 
 Installation from the sources
 
-* Configuring and generating Makefiles::  
-* Compilation::                 
-* Installation::                
+* Configuring and generating Makefiles::
+* Compilation::
+* Installation::
 
 Installation from packages
 
-* Installing Knot DNS packages on Debian::  
-* Installing Knot DNS packages on Ubuntu::  
+* Installing Knot DNS packages on Debian::
+* Installing Knot DNS packages on Ubuntu::
 * Installing Knot DNS packages on Fedora::
-* Installing Knot DNS from ports on FreeBSD::  
+* Installing Knot DNS from ports on FreeBSD::
 
 Installing Knot DNS packages on Ubuntu
 
-* Adding official PPA repository for Knot DNS::  
+* Adding official PPA repository for Knot DNS::
 
 Knot DNS Configuration
 
-* Minimal configuration::       
-* Slave configuration::       
-* Master configuration::       
-* Configuring multiple interfaces::        
+* Minimal configuration::
+* Slave configuration::
+* Master configuration::
+* Configuring multiple interfaces::
 
 Sample Configurations
 
-* Minimal configuration::       
-* Slave configuration::       
-* Master configuration::       
+* Minimal configuration::
+* Slave configuration::
+* Master configuration::
 * Configuring multiple interfaces::
 * Enabling zone semantic checks::
 * Creating IXFR differences from zone file changes::
@@ -137,8 +137,8 @@ Running Knot DNS
 Troubleshooting
 
 * Submitting a bugreport::
-* Generating backtrace::  
-* Debug messages::      
+* Generating backtrace::
+* Debug messages::
 
 Debug messages
 
@@ -150,30 +150,30 @@ Enabling debug messages in server
 
 Knot DNS Configuration Reference
 
-* system::                      
-* keys::                        
-* interfaces::                  
-* remotes::                     
+* system::
+* keys::
+* interfaces::
+* remotes::
 * groups::
-* zones::                       
-* log::                         
+* zones::
+* log::
 * include::
 
 @code{system} Statement
 
-* system Syntax::               
-* system Statement Definition and Usage::  
-* system Example::              
+* system Syntax::
+* system Statement Definition and Usage::
+* system Example::
 
 Statement Definition and Usage
 
-* identity::                    
-* version::                     
-* nsid::                        
-* storage::                     
-* pidfile::                     
-* workers::                     
-* user::                        
+* identity::
+* version::
+* nsid::
+* storage::
+* pidfile::
+* workers::
+* user::
 * max-conn-idle::
 * max-conn-hs::
 * max-conn-reply::
@@ -183,28 +183,28 @@ Statement Definition and Usage
 
 @code{keys} Statement
 
-* keys Syntax::                 
-* keys Statement Definition and Usage::  
-* Example::                     
+* keys Syntax::
+* keys Statement Definition and Usage::
+* Example::
 
 Statement Definition and Usage
 
-* key_id::                      
+* key_id::
 
 interfaces
 
-* interfaces Syntax::           
-* interfaces Statement Definition and Usage::  
-* interfaces Examples::         
+* interfaces Syntax::
+* interfaces Statement Definition and Usage::
+* interfaces Examples::
 
 Statement Definition and Usage
 
-* interface_id::                
+* interface_id::
 
 @code{remotes} Statement
 
-* remotes Syntax::              
-* remotes Statement Definition and Grammar::  
+* remotes Syntax::
+* remotes Statement Definition and Grammar::
 
 @code{groups} Statement
 
@@ -213,14 +213,14 @@ Statement Definition and Usage
 
 @code{zones} Statement
 
-* zones Syntax::                
+* zones Syntax::
 * zones Statement Definition and Grammar::
 * zones List of zone semantic checks::
 
 @code{log} Statement
 
-* log Syntax::                  
-* log Statement Definition and Grammar::  
+* log Syntax::
+* log Statement Definition and Grammar::
 
 @code{include} Statement
 
diff --git a/doc/migration.texi b/doc/migration.texi
index 9d4e0fa26595322b685f9cbfb3428c36813b0abc..f6a493307e61490749d1055da013e2673f1ff121 100644
--- a/doc/migration.texi
+++ b/doc/migration.texi
@@ -2,10 +2,10 @@
 @appendix Migration for other DNS servers
 
 @menu
-* Knot DNS for BIND users::     
-* Knot DNS for NSD users::      
-* Knot DNS for PowerDNS users::  
-* Knot DNS for djbdns users::   
+* Knot DNS for BIND users::
+* Knot DNS for NSD users::
+* Knot DNS for PowerDNS users::
+* Knot DNS for djbdns users::
 @end menu
 
 @node Knot DNS for BIND users
diff --git a/doc/reference.texi b/doc/reference.texi
index 657c0e05e87d68fdc6331bbbf7f670cc60d44812..996490bdbc773ce626af43825932f630329f6bc1 100644
--- a/doc/reference.texi
+++ b/doc/reference.texi
@@ -4,14 +4,14 @@
 This reference describes every configuration option in Knot DNS server.
 
 @menu
-* system::                      
-* keys::                        
-* interfaces::                  
-* remotes::                     
+* system::
+* keys::
+* interfaces::
+* remotes::
 * groups::
 * control::
-* zones::                       
-* log::                         
+* zones::
+* log::
 * include::
 @end menu
 
@@ -24,9 +24,9 @@ operating system and other general options which do not fit anywhere
 else.
 
 @menu
-* system Syntax::               
-* system Statement Definition and Usage::  
-* system Example::              
+* system Syntax::
+* system Statement Definition and Usage::
+* system Example::
 @end menu
 
 @node system Syntax
@@ -55,16 +55,16 @@ else.
 @subsection Statement Definition and Usage
 
 @menu
-* identity::                    
-* version::                     
-* nsid::                        
-* storage::                     
-* pidfile::                     
-* workers::                     
-* user::                        
-* max-conn-idle::               
-* max-conn-hs::                 
-* max-conn-reply::              
+* identity::
+* version::
+* nsid::
+* storage::
+* pidfile::
+* workers::
+* user::
+* max-conn-idle::
+* max-conn-hs::
+* max-conn-reply::
 * transfers::
 * rate-limit::
 * rate-limit-size::
@@ -253,9 +253,9 @@ The @code{keys} statement sets up the TSIG keys used to authenticate
 zone transfers.
 
 @menu
-* keys Syntax::                 
-* keys Statement Definition and Usage::  
-* Example::                     
+* keys Syntax::
+* keys Statement Definition and Usage::
+* Example::
 @end menu
 
 @node keys Syntax
@@ -272,7 +272,7 @@ keys @{
 @subsection Statement Definition and Usage
 
 @menu
-* key_id::                      
+* key_id::
 @end menu
 
 @node key_id
@@ -305,10 +305,10 @@ You need to use bind or ldns utils to generate TSIG keys. Unfortunately, Knot DN
 
 $ dnssec-keygen -a HMAC-SHA256 -b 256 -n HOST foobar.example.com
 Kfoobar.example.com.+163+21239
-$ cat Kfoobar.example.com.+163+21239.key 
+$ cat Kfoobar.example.com.+163+21239.key
 foobar.example.com. ( IN KEY 512 3 163
                       rqv2WRyDgIUaHcJi03Zssor9jtG1kOpb3dPywxZfTeo= )
-	  
+
 @end example
 
 Key generated in previous paragraph would be written as:
@@ -319,7 +319,7 @@ keys @{
   foobar.example.com. hmac-sha256
   "rqv2WRyDgIUaHcJi03Zssor9jtG1kOpb3dPywxZfTeo=";
 @}
-	  
+
 @end example
 
 @node Example
@@ -332,7 +332,7 @@ keys @{
   key0.server0 hmac-md5 "Wg==";
   foobar.example.com. hmac-sha256 "RQ==";
 @}
-	
+
 @end example
 
 @node interfaces
@@ -342,9 +342,9 @@ keys @{
 The @code{interfaces} statement contains IP interfaces where Knot DNS listens for incoming queries.
 
 @menu
-* interfaces Syntax::           
-* interfaces Statement Definition and Usage::  
-* interfaces Examples::         
+* interfaces Syntax::
+* interfaces Statement Definition and Usage::
+* interfaces Examples::
 @end menu
 
 @node interfaces Syntax
@@ -363,7 +363,7 @@ The @code{interfaces} statement contains IP interfaces where Knot DNS listens fo
 @subsection Statement Definition and Usage
 
 @menu
-* interface_id::                
+* interface_id::
 @end menu
 
 @node interface_id
@@ -389,7 +389,7 @@ interfaces @{
     port 53;
   @}
 @}
-	
+
 @end example
 
 Short form:
@@ -399,7 +399,7 @@ Short form:
 interfaces @{
   my_second_ip @{ address 198.51.100.1@@53; @}
 @}
-	
+
 @end example
 
 Short form without port (defaults to 53):
@@ -409,7 +409,7 @@ Short form without port (defaults to 53):
 interfaces @{
   my_third_ip @{ address 203.0.113.1; @}
 @}
-	
+
 @end example
 
 @node remotes
@@ -424,8 +424,8 @@ client for one zone (e.g. downloading the updates) and as a master
 server for a different zone.
 
 @menu
-* remotes Syntax::              
-* remotes Statement Definition and Grammar::  
+* remotes Syntax::
+* remotes Statement Definition and Grammar::
 * remotes Examples::
 @end menu
 
@@ -496,9 +496,9 @@ server for a different zone.
 remotes @{
 
   # Format 1:
-  server0 @{            
-    address 127.0.0.1; 
-    port 53531;       
+  server0 @{
+    address 127.0.0.1;
+    port 53531;
     key key0.server0;
     via ipv4;             # reference to 'remotes'
     # via 82.35.64.59;    # direct IPv4
@@ -590,7 +590,7 @@ control @{
 @}
 @end example
 
-@node control 
+@node control
 @section @code{control} Statement
 
 The @code{control} statement specifies on which interface to listen for remote control commands.
@@ -600,8 +600,8 @@ for that reason, it is recommended to enable remote control only on private netw
 or loopback.
 
 @menu
-* control Syntax::              
-* control Statement Definition and Grammar::  
+* control Syntax::
+* control Statement Definition and Grammar::
 * control Examples::
 @end menu
 
@@ -647,10 +647,10 @@ control @{
 The @code{zones} statement contains definition of zones served by Knot DNS.
 
 @menu
-* zones Syntax::                
+* zones Syntax::
 * zones Statement Definition and Grammar::
 * zones Example::
-* zones List of zone semantic checks::     
+* zones List of zone semantic checks::
 @end menu
 
 @node zones Syntax
@@ -687,18 +687,18 @@ The @code{zones} statement contains definition of zones served by Knot DNS.
 @menu
 * zone_id::
 * file::
-* xfr-in::                    
-* xfr-out::                     
-* notify-in::                        
-* notify-out::                     
+* xfr-in::
+* xfr-out::
+* notify-in::
+* notify-out::
 * update-in::
-* semantic-checks::                     
+* semantic-checks::
 * ixfr-from-differences::
-* disable-any::                     
-* notify-timeout::                     
-* notify-retries::                     
-* zonefile-sync::                    
-* ixfr-fslimit::                     
+* disable-any::
+* notify-timeout::
+* notify-retries::
+* zonefile-sync::
+* ixfr-fslimit::
 @end menu
 
 @node zone_id
@@ -752,7 +752,7 @@ Remotes are defined in @code{remotes} section of configuration file (@pxref{remo
 
 @node semantic-checks
 @subsubsection semantic-checks
-@vindex semantic-checks 
+@vindex semantic-checks
 
 @code{semantic-checks} statement turns on optional semantic checks for this particular zone.
 See @ref{zones List of zone semantic checks} for more information.
@@ -766,7 +766,7 @@ Most checks are disabled by default.
 
 EXPERIMENTAL: option @code{ixfr-from-differences} is only relevant if you are running Knot DNS as a master for this zone.
 By turning the feature on you tell Knot to create differences from changes you made to a zone file upon server reload.
-See @ref{Controlling running daemon} for more information. 
+See @ref{Controlling running daemon} for more information.
 
 Possible values are @code{on} and @code{off}. Disabled by default.
 
@@ -788,7 +788,7 @@ By default, this value is set to 60 seconds.
 @subsubsection notify-retries
 @vindex notify-retries
 
-@code{notify-retries} tells the server how many times it can retry to send a NOTIFY. Possible values 
+@code{notify-retries} tells the server how many times it can retry to send a NOTIFY. Possible values
 are 1 to INT_MAX and default value is 5.
 
 @node zonefile-sync
@@ -836,7 +836,7 @@ zones @{
 @end group
 @end example
 
-@node zones List of zone semantic checks 
+@node zones List of zone semantic checks
 @subsection List of zone semantic checks
 
 The @code{semantic-checks} statement turns on extra zone file semantic
@@ -856,7 +856,7 @@ These checks are the following:
 @end example
 
 Following checks have to be turned on using @code{semantic-checks} and
-a zone containing following errors will be 
+a zone containing following errors will be
 loaded even upon discovering an error:
 
 @example
@@ -882,7 +882,7 @@ loaded even upon discovering an error:
 @stindex log
 
 @menu
-* log Syntax::                  
+* log Syntax::
 * log Statement Definition and Grammar::
 * log Example::
 @end menu
@@ -896,7 +896,7 @@ loaded even upon discovering an error:
     [ @kbd{category} @kbd{severity} [ @kbd{severity} @dots{} ]@code{;} ]
   @code{@}} ]
   [ @code{log_file} @kbd{filename} @{
-    [ @kbd{category} @kbd{severity} [ @kbd{severity} @dots{} ]@code{;} ] 
+    [ @kbd{category} @kbd{severity} [ @kbd{severity} @dots{} ]@code{;} ]
   @} ]
 @code{@}}
 
diff --git a/doc/requirements.texi b/doc/requirements.texi
index 136f3c6cc2ed650763747edf5171ebd48f33a94f..6bebf04c35a4fb617956e326f6579ee19089360f 100644
--- a/doc/requirements.texi
+++ b/doc/requirements.texi
@@ -2,10 +2,10 @@
 @chapter Knot DNS Resource Requirements
 
 @menu
-* Hardware requirements::       
-* CPU requirements::            
-* Memory requirements::         
-* Supported operating system::  
+* Hardware requirements::
+* CPU requirements::
+* Memory requirements::
+* Supported operating system::
 @end menu
 
 @node Hardware requirements
diff --git a/doc/running.texi b/doc/running.texi
index d549264d9c8d5f154bec066c88167048f48777a9..4ef2d4a8df1ffb77cd699bbf2abd08ccc7aab77e 100644
--- a/doc/running.texi
+++ b/doc/running.texi
@@ -2,9 +2,9 @@
 @chapter Running Knot DNS
 
 @menu
-* Running a slave server::       
-* Running a master server::       
-* Controlling running daemon::       
+* Running a slave server::
+* Running a master server::
+* Controlling running daemon::
 @end menu
 
 Use knotc tool for convenience when working with the server daemon.
@@ -22,19 +22,19 @@ If you want to control the daemon directly, use @code{SIGINT} to quit the proces
 Usage: knotc [parameters] <action> [action_args]
 
 Parameters:
- -c [file], --config=[file]	Select configuration file.
- -j [num], --jobs=[num]    	Number of parallel tasks to run when compiling.
- -s [server]               	Remote server address (default 127.0.0.1)
- -p [port]                 	Remote server port (default 5553)
- -y [hmac:]name:key]       	Use key_id specified on the command line.
- -k [file]                 	Use key file (as in config section 'keys').
-                           	  f.e. echo "knotc-key hmac-md5 Wg==" > knotc.key
- -f, --force               	Force operation - override some checks.
- -v, --verbose             	Verbose mode - additional runtime information.
- -V, --version             	Print knot server version.
- -w, --wait                	Wait for the server to finish start/stop operations.
- -i, --interactive         	Interactive mode (do not daemonize).
- -h, --help                	Print help and usage.
+ -c [file], --config=[file]     Select configuration file.
+ -j [num], --jobs=[num]         Number of parallel tasks to run when compiling.
+ -s [server]                    Remote server address (default 127.0.0.1)
+ -p [port]                      Remote server port (default 5553)
+ -y [hmac:]name:key]            Use key_id specified on the command line.
+ -k [file]                      Use key file (as in config section 'keys').
+                                  f.e. echo "knotc-key hmac-md5 Wg==" > knotc.key
+ -f, --force                    Force operation - override some checks.
+ -v, --verbose                  Verbose mode - additional runtime information.
+ -V, --version                  Print knot server version.
+ -w, --wait                     Wait for the server to finish start/stop operations.
+ -i, --interactive              Interactive mode (do not daemonize).
+ -h, --help                     Print help and usage.
 
 Actions:
  start				Start server (no-op if running).
@@ -127,7 +127,7 @@ $ knotc -w -c master.conf start
 Knot DNS was designed to allow server reconfiguration on-the-fly without interrupting
 its operation. Thus it is possible to change both configuration and zone files and
 also add or remove zones without restarting the server. This can be done with the
-@code{knotc reload} action. 
+@code{knotc reload} action.
 
 @example
 $ knotc -c master.conf reload  # reconfigure and load updated zones
diff --git a/doc/troubleshooting.texi b/doc/troubleshooting.texi
index 18fee7a625ac28ed5865a017683f53de662173b1..f15115357f75d9ed8e7960bd90eb879a571df921 100644
--- a/doc/troubleshooting.texi
+++ b/doc/troubleshooting.texi
@@ -2,23 +2,23 @@
 @chapter Troubleshooting
 
 @menu
-* Submitting a bugreport:: 
-* Generating backtrace::  
+* Submitting a bugreport::
+* Generating backtrace::
 * Debug messages::
 @end menu
 
 First of all, check the logs (@pxref{log}).
 By default, Knot DNS logs all error messages to syslog. Enabling at least
-the @code{warning} message severity may help you identify some problems. 
+the @code{warning} message severity may help you identify some problems.
 
 @node Submitting a bugreport
 @section Submitting a bugreport
 
 If you are unable to solve the problem by yourselves, you can submit a
-bugreport to the Knot DNS team. For security issues (e.g. crash) do not 
-use the public mailinglist. Instead, write to 
-@url{mailto:knot-dns@@labs.nic.cz, knot-dns@@labs.nic.cz}. All other bugs 
-and questions may be directed to the Knot DNS users mailinglist 
+bugreport to the Knot DNS team. For security issues (e.g. crash) do not
+use the public mailinglist. Instead, write to
+@url{mailto:knot-dns@@labs.nic.cz, knot-dns@@labs.nic.cz}. All other bugs
+and questions may be directed to the Knot DNS users mailinglist
 (@url{mailto:knot-dns-users@@lists.nic.cz, knot-dns-users@@lists.nic.cz}).
 
 The bugreport should contain at least:
@@ -27,7 +27,7 @@ The bugreport should contain at least:
 @item type and version of your operating system,
 @item basic hardware information,
 @item description of the bug,
-@item log output of all messages (category @code{any}) with severity Info 
+@item log output of all messages (category @code{any}) with severity Info
 and higher (severities @code{info, notice, warning, error}, or @code{any} if debug messages are not turned on (see below)),
 @item steps to reproduce the bug (if known),
 @item backtrace (if the bug caused a crash; see next section).
@@ -76,10 +76,10 @@ $ sudo gdb --pid <KNOT_PID>
 In some cases the aforementioned information may not be enough to find
 and fix the bug. In these cases it may be useful to turn on debug messages.
 
-Two steps are required in order to log debug messages. First you need to 
+Two steps are required in order to log debug messages. First you need to
 allow the debug messages in the server. Then the logging must be configured
-to log debug messages (@pxref{log}). It is recommended to log these 
-messages to a file. Firstly, the debug output may be rather large and 
+to log debug messages (@pxref{log}). It is recommended to log these
+messages to a file. Firstly, the debug output may be rather large and
 secondly, it is easier to use the data for debugging.
 
 @node Enabling debug messages in server
@@ -89,7 +89,7 @@ secondly, it is easier to use the data for debugging.
 * Debug messages Example::
 @end menu
 
-Allowing debug messages in the server is possible only when configuring the 
+Allowing debug messages in the server is possible only when configuring the
 sources. Two @command{configure} options are required to do this:
 
 @itemize
@@ -99,15 +99,15 @@ want to enable debug messages. One or more of the following modules may be
 listed, separated by commas:
 
 @itemize
-@item @code{server} - Messages related to networking, threads and low-level 
+@item @code{server} - Messages related to networking, threads and low-level
       journal handling.
-@item @code{zones} - All operations with zones - loading, updating, saving, 
+@item @code{zones} - All operations with zones - loading, updating, saving,
       timers, high-level journal management.
 @item @code{xfr} - AXFR, IXFR and NOTIFY handling.
 @item @code{packet} - Packet parsing and response creation.
 @item @code{dname} - Parsing, comparing and other operations on domain names.
 @item @code{rr} - Details of processed resource records.
-@item @code{ns} - Query processing, high-level handling of all requests 
+@item @code{ns} - Query processing, high-level handling of all requests
       (transfers, NOTIFY, normal queries).
 @item @code{hash} - Details of hash table (the main data structure) operation.
 @item @code{compiler} - Zone file compilation.
@@ -116,7 +116,7 @@ listed, separated by commas:
 @item
 The @code{--enable-debuglevel} option is used to specify the verbosity of the
 debug output. Be careful with this, as the @code{details} verbosity may produce
-really large logs (in order of GBs). There are three levels of verbosity: 
+really large logs (in order of GBs). There are three levels of verbosity:
 @code{brief}, @code{verbose} and @code{details}.
 
 @end itemize
@@ -127,5 +127,3 @@ really large logs (in order of GBs). There are three levels of verbosity:
 @example
 $ ./configure --enable-debug=server,zones --enable-debuglevel=verbose
 @end example
-
-
diff --git a/m4/ax_ext.m4 b/m4/ax_ext.m4
index 898f2bfd5111712cd9be9a11f85c88077f8310ad..21896aa0a11eb4f43a0be080c0a358861d230ab5 100644
--- a/m4/ax_ext.m4
+++ b/m4/ax_ext.m4
@@ -39,13 +39,13 @@
 AC_DEFUN([AX_EXT],
 [
   AC_REQUIRE([AX_GCC_X86_CPUID])
-  
+
   AX_GCC_X86_CPUID([0x00000001])
   if test "$ax_cv_gcc_x86_cpuid_0x00000001" != "unknown"; then
     ecx=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 3`
     edx=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 4`
   fi
-  
+
   AC_CACHE_CHECK([whether mmx is supported], [ax_cv_have_mmx_ext],
   [
     ax_cv_have_mmx_ext=no
diff --git a/m4/ax_gcc_x86_cpuid.m4 b/m4/ax_gcc_x86_cpuid.m4
index e9231b814140a7a61898f6505234e13772034066..792e68403fa5b0f6b995c34b0f8f9bc02b21092c 100644
--- a/m4/ax_gcc_x86_cpuid.m4
+++ b/m4/ax_gcc_x86_cpuid.m4
@@ -57,7 +57,7 @@ AC_CACHE_CHECK([for x86 cpuid $1 output], [ax_cv_gcc_x86_cpuid_$1],
      fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
      fclose(f);
      return 0;
-])], 
+])],
      [ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid],
      [ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid],
      [ax_cv_gcc_x86_cpuid_$1=unknown])])
diff --git a/m4/ax_recvmmsg.m4 b/m4/ax_recvmmsg.m4
index eb5c4d6b36f54d9e4421b708f71e217b01e567e8..bc7bfe30fd66f8b3ebce7f05db6a004f988e2974 100644
--- a/m4/ax_recvmmsg.m4
+++ b/m4/ax_recvmmsg.m4
@@ -37,7 +37,7 @@ AC_DEFUN([AX_MSG_WAITFORONE],
 
 volatile int _intr = 0;
 void sighandle(int s) {
-     _intr = 1;	   
+     _intr = 1;
 }
       ]],[[
 #ifndef MSG_WAITFORONE
@@ -45,7 +45,7 @@ void sighandle(int s) {
 #else
   int port = 35353;
   int fd = socket(AF_INET, SOCK_DGRAM, 0);
-  if (fd < 0) return 1; 
+  if (fd < 0) return 1;
   struct mmsghdr msgs[2];
   struct iovec iovecs[2];
   char bufs[2][64];
@@ -63,7 +63,7 @@ void sighandle(int s) {
   sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
   sa.sin_port = htons(port); /* Find free port. */
   while (bind(fd, (struct sockaddr *)&sa, sizeof(sa)) == -1) {
-  if (errno == EADDRINUSE) sa.sin_port = ++port; 
+  if (errno == EADDRINUSE) sa.sin_port = ++port;
   else break;
   }
 
@@ -83,7 +83,7 @@ void sighandle(int s) {
   close(fd);
   if (ret < 0) { /* Completely failed. */
     return 2;
-  } 
+  }
 
   return _intr; /* OK if not interrupted. */
 #endif
diff --git a/man/knot.conf.5in b/man/knot.conf.5in
index 78429828aaecace98f5e8180066b609348660651..1a11f652f7263f490c377eeb60b63573a3a9a9ac 100644
--- a/man/knot.conf.5in
+++ b/man/knot.conf.5in
@@ -2,7 +2,7 @@
 .SH "NAME"
 .LP
 .B knot.conf
-\- Configuration file manual for Knot DNS server. 
+\- Configuration file manual for Knot DNS server.
 .SH "SYNOPSIS"
 .LP
 .B knot.conf
@@ -33,7 +33,7 @@ serves as an example of the configuration for knotc(8) and knotd(8).
   # Version of the server (see RFC 4892). Not used yet.
   version "1.2;
 
-  # Server identifier 
+  # Server identifier
   # Use string format "text"
   # Or hexstring 0x01ab00
   nsid "myserver0";
@@ -85,12 +85,12 @@ serves as an example of the configuration for knotc(8) and knotd(8).
   # it is recommended to do so as well due to better distribution.
   # Tweak if you experience a lot of hash collisions, estimated memory overhead
   # is approx. 16B per bucket
-  # Default: 1572869 
+  # Default: 1572869
   rate-limit-size 1572869;
 
-  # Rate limit SLIP 
+  # Rate limit SLIP
   # Each Nth blocked response will be sent as truncated, this is a way to allow
-  # legitimate requests to get a chance to reconnect using TCP 
+  # legitimate requests to get a chance to reconnect using TCP
   # Default: 2
   rate-limit-slip 2;
  }
@@ -119,11 +119,11 @@ serves as an example of the configuration for knotc(8) and knotd(8).
  interfaces {
 
   # Interface entry
-  # 
+  #
   # Format 1: <name> { address <address>; [port <port>;] }
   ipv4 {                # <name> is an arbitrary symbolic name
     address 127.0.0.1;  # <address> may be ither IPv4 or IPv6 address
-    port 53531;         # port is required for XFR/IN and NOTIFY/OUT 
+    port 53531;         # port is required for XFR/IN and NOTIFY/OUT
   }
 
   # Format 2: <name> { address <address>@<port>; }
@@ -173,7 +173,7 @@ serves as an example of the configuration for knotc(8) and knotd(8).
   #       with MitM type attacks, so you should keep the interface on localnet.
   # Default port is: 5553
   listen-on { address 127.0.0.1@5553; }
-  
+
   # Specifies ACL list for remote control
   # Same syntax as for ACLs in zones
   # List of remotes delimited by comma
@@ -195,7 +195,7 @@ serves as an example of the configuration for knotc(8) and knotd(8).
   # Possible values: on|off
   # Default value: off
   semantic-checks off;
-  
+
   # Disable ANY type queries for authoritative answers (if 'on')
   # Possible values: on|off
   # Default value: off
@@ -233,7 +233,7 @@ serves as an example of the configuration for knotc(8) and knotd(8).
     #   it is considered relative to the current directory from which the server
     #   was started.
     file "samples/example.com.zone";
-    
+
     # Build differences from zone file changes
     # Possible values: on|off
     # Default value: off
@@ -266,16 +266,16 @@ serves as an example of the configuration for knotc(8) and knotd(8).
     # f.e. 1s = 1 second, 1m = 1 minute, 1h = 1 hour, 1d = 1 day
     zonefile-sync 1h;
 
-    # XFR master server 
+    # XFR master server
     xfr-in server0;
 
     # ACL list of XFR slaves
     xfr-out server0, server1;
 
-    # ACL list of servers allowed to send NOTIFY queries 
+    # ACL list of servers allowed to send NOTIFY queries
     notify-in server0;
 
-    # List of servers to send NOTIFY to 
+    # List of servers to send NOTIFY to
     notify-out server0, server1;
 
     # List of servers to allow UPDATE queries
@@ -285,15 +285,15 @@ serves as an example of the configuration for knotc(8) and knotd(8).
 
  # Section 'log' configures logging of server messages.
  #
- # Logging recognizes 3 symbolic names of log devices: 
+ # Logging recognizes 3 symbolic names of log devices:
  #   stdout    - Standard output
  #   stderr    - Standard error output
  #   syslog    - Syslog
- # 
+ #
  # In addition, arbitrary number of log files may be specified (see below).
  #
  # Log messages are characterized by severity and category.
- # Supported severities: 
+ # Supported severities:
  #   debug     - Debug messages. Must be turned on at compile time.
  #   info      - Informational messages.
  #   notice    - Notices and hints.
@@ -312,8 +312,8 @@ serves as an example of the configuration for knotc(8) and knotd(8).
  #   any       - All categories
  #
  # More severities (separated by commas) may be listed for each category.
- # All applicable severities must be listed. 
- #   (I.e. specifying 'error' severity does mean: 'log error messages', 
+ # All applicable severities must be listed.
+ #   (I.e. specifying 'error' severity does mean: 'log error messages',
  #    and NOT 'log all messages of severity error and above'.)
  #
  # Default settings (in case there are no entries in 'log' section or the section
@@ -325,14 +325,14 @@ serves as an example of the configuration for knotc(8) and knotd(8).
 
   # Log entry
   #
-  # Format 1: 
-  # <log> { 
-  #   <category1> <severity1> [, <severity2> ...]; 
+  # Format 1:
+  # <log> {
+  #   <category1> <severity1> [, <severity2> ...];
   #   <category2> <severity1> [, <severity2> ...];
   #   ...
-  # } 
+  # }
   syslog {     # <log> is a symbolic name of a log device (see above)
-    # log errors of any category 
+    # log errors of any category
     any error;    # for <category> and <severity> see above
     # log also warnings and notices from category 'zone'
     zone warning, notice;
diff --git a/man/knotc.8in b/man/knotc.8in
index c4ebccdc662f5287de9e5f4035cac546c143ec31..422fde9daf240772f59873ed062604aabe912aa4 100644
--- a/man/knotc.8in
+++ b/man/knotc.8in
@@ -10,13 +10,13 @@
 .HP
 \fB\-c\fR [file], \fB\-\-config\fR=\fI[file]\fR Select configuration file.
 .TP
-\fB\-s\fR [server]\fR Remote server address (default 127.0.0.1) 
+\fB\-s\fR [server]\fR Remote server address (default 127.0.0.1)
 .TP
 \fB\-p\fR [port]\fR Remote server port (default 5553)
 .TP
 \fB\-y\fR [hmac:]name:key]\fR Use key_id for specified on the command line.
 .TP
-\fB\-k\fR [file]\fR Use key file (as in config section 'keys'). 
+\fB\-k\fR [file]\fR Use key file (as in config section 'keys').
 f.e. echo "knotc-key hmac-md5 Wg==" > knotc.key
 If you omit algorithm, hmac-md5 will be used as default.
 .TP
@@ -68,11 +68,11 @@ Check server configuration.
 .TP
 checkzone
 Check zones before compiling (accepts specific zones, f.e. 'knotc checkzone example1.com example2.com').
-.SS "EXAMPLES" 
+.SS "EXAMPLES"
 .TP
 .B Setup a keyfile for remote control
 .TP
-1. Generate keys 
+1. Generate keys
 dnssec-keygen -a hmac-md5 -b 256 -n HOST knotc-key
 .TP
 2. Extract secret in base64 format and create keyfile
diff --git a/samples/example.com.zone b/samples/example.com.zone
index 4e585c1cef871782389e438441fe879f6354f35d..ee51895f11886639337f4c7d2421eb469afff668 100644
--- a/samples/example.com.zone
+++ b/samples/example.com.zone
@@ -20,4 +20,3 @@ dns2	A	192.0.2.2
 
 mail	A	192.0.2.3
 	AAAA	2001:DB8::3
-
diff --git a/samples/knot.full.conf b/samples/knot.full.conf
index 8b7ebbc55294894b6e5b73da2eca271f433419e7..8fe017d1e1681ddf4a825792af294c4db57e344d 100644
--- a/samples/knot.full.conf
+++ b/samples/knot.full.conf
@@ -20,7 +20,7 @@ system {
   # Version of the server (see RFC 4892). Not used yet.
   version "1.2";
 
-  # Server identifier 
+  # Server identifier
   # Use string format "text"
   # Or hexstring 0x01ab00
   nsid "myserver0";
@@ -65,25 +65,25 @@ system {
   # This number also includes pending SOA queries
   # Minimal value is number of CPUs
   # Default: 10
-  transfers 10; 
+  transfers 10;
 
   # Rate limit
   # in queries / second
   # Default: off (=0)
   rate-limit 0;
-  
+
   # Rate limit bucket size
   # Number of hashtable buckets, set to reasonable value as default.
   # We chose a reasonably large prime number as it's used for hashtable size,
   # it is recommended to do so as well due to better distribution.
-  # Rule of thumb is to set it to about 1.2 * (maximum_qps) 
+  # Rule of thumb is to set it to about 1.2 * (maximum_qps)
   # Memory cost is approx. 32B per bucket
-  # Default: 393241 
+  # Default: 393241
   rate-limit-size 393241;
 
-  # Rate limit SLIP 
+  # Rate limit SLIP
   # Each Nth blocked response will be sent as truncated, this is a way to allow
-  # legitimate requests to get a chance to reconnect using TCP 
+  # legitimate requests to get a chance to reconnect using TCP
   # Default: 2
   rate-limit-slip 2;
 }
@@ -118,11 +118,11 @@ include "knot.keys.conf";
 interfaces {
 
   # Interface entry
-  # 
+  #
   # Format 1: <name> { address <address>; [port <port>;] }
   ipv4 {                # <name> is an arbitrary symbolic name
     address 127.0.0.1;  # <address> may be ither IPv4 or IPv6 address
-    port 53531;         # port is required for XFR/IN and NOTIFY/OUT 
+    port 53531;         # port is required for XFR/IN and NOTIFY/OUT
   }
 
   # Format 2: <name> { address <address>@<port>; }
@@ -184,7 +184,7 @@ control {
   #       with MitM type attacks, so you should keep the interface on localnet.
   # Default port is: 5553
   listen-on { address 127.0.0.1@5553; }
-  
+
   # Specifies ACL list for remote control
   # Same syntax as for ACLs in zones
   # List of remotes or groups delimited by comma
@@ -206,7 +206,7 @@ zones {
   # Possible values: on|off
   # Default value: off
   semantic-checks off;
-  
+
   # Disable ANY type queries for authoritative answers (if 'on')
   # Possible values: on|off
   # Default value: off
@@ -244,7 +244,7 @@ zones {
     #   it is considered relative to the current directory from which the server
     #   was started.
     file "samples/example.com.zone";
-    
+
     # Build differences from zone file changes
     # Possible values: on|off
     # Default value: off
@@ -277,16 +277,16 @@ zones {
     # f.e. 1s = 1 second, 1m = 1 minute, 1h = 1 hour, 1d = 1 day
     zonefile-sync 1h;
 
-    # XFR master server 
+    # XFR master server
     xfr-in server0;
 
     # ACL list of XFR slaves
     xfr-out server0, server1;
 
-    # ACL list of servers allowed to send NOTIFY queries 
+    # ACL list of servers allowed to send NOTIFY queries
     notify-in server0;
 
-    # List of servers to send NOTIFY to 
+    # List of servers to send NOTIFY to
     notify-out server0, server1;
 
     # List of servers to allow UPDATE queries
@@ -296,15 +296,15 @@ zones {
 
 # Section 'log' configures logging of server messages.
 #
-# Logging recognizes 3 symbolic names of log devices: 
+# Logging recognizes 3 symbolic names of log devices:
 #   stdout    - Standard output
 #   stderr    - Standard error output
 #   syslog    - Syslog
-# 
+#
 # In addition, arbitrary number of log files may be specified (see below).
 #
 # Log messages are characterized by severity and category.
-# Supported severities: 
+# Supported severities:
 #   debug     - Debug messages. Must be turned on at compile time.
 #   info      - Informational messages.
 #   notice    - Notices and hints.
@@ -323,8 +323,8 @@ zones {
 #   any       - All categories
 #
 # More severities (separated by commas) may be listed for each category.
-# All applicable severities must be listed. 
-#   (I.e. specifying 'error' severity does mean: 'log error messages', 
+# All applicable severities must be listed.
+#   (I.e. specifying 'error' severity does mean: 'log error messages',
 #    and NOT 'log all messages of severity error and above'.)
 #
 # Default settings (in case there are no entries in 'log' section or the section
@@ -336,14 +336,14 @@ log {
 
   # Log entry
   #
-  # Format 1: 
-  # <log> { 
-  #   <category1> <severity1> [, <severity2> ...]; 
+  # Format 1:
+  # <log> {
+  #   <category1> <severity1> [, <severity2> ...];
   #   <category2> <severity1> [, <severity2> ...];
   #   ...
-  # } 
+  # }
   syslog {     # <log> is a symbolic name of a log device (see above)
-    # log errors of any category 
+    # log errors of any category
     any error;    # for <category> and <severity> see above
     # log also warnings and notices from category 'zone'
     zone warning, notice;
diff --git a/samples/knot.min.conf b/samples/knot.min.conf
index 6b7c1af1d16541e07fc9cae7c860222226cb2fb1..b3dad31cfdfbc4838f3ad4ea212afcaa1ba8dbd3 100644
--- a/samples/knot.min.conf
+++ b/samples/knot.min.conf
@@ -17,8 +17,8 @@ interfaces {
 }
 
 zones {
-  example.com {  
-    file "samples/example.com.zone"; 
+  example.com {
+    file "samples/example.com.zone";
   }
 }
 
diff --git a/scripts/parse_dump.py b/scripts/parse_dump.py
index d9cc44b6998ca68fad2f8d4c2e32ae97ebac5020..4097fc433916530ac17a44a08cd1603ef00d5b7c 100755
--- a/scripts/parse_dump.py
+++ b/scripts/parse_dump.py
@@ -70,7 +70,7 @@ def chop_and_write_rr_response(rr):
 			fp.write(pack('H', len(rr.rdata)))
 			fp.write(rr.rdata)
 
-	
+
 	if rr.type == 50:
 		f = open('nsec3debug', 'wb')
 		rdata.to_wire(f)
@@ -101,12 +101,12 @@ def chop_and_write_packet(packet):
 #	fp.write(pack('H', packet.qr))
 #	fp.write(pack('H', packet.opcode))
 #	fp.write(pack('H', packet.aa)) #TODO these are not uint16_t
-#	fp.write(pack('H', packet.rcode)) 
+#	fp.write(pack('H', packet.rcode))
 	fp.write(pack('H', packet.qdcount))
 	fp.write(pack('H', packet.ancount))
 	fp.write(pack('H', packet.nscount))
 	fp.write(pack('H', packet.arcount))
-	
+
 #write query flag
 	fp.write(pack('H', packet.qr))
 
diff --git a/src/Makefile.am b/src/Makefile.am
index e254e961eabdf18395fdb56d86f595736b7ca275..37941a945084e04e870d8347fc19e5c2fc50ed1a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -345,4 +345,3 @@ zscanner_tool_LDADD = libknots.la libknot.la libknotd.la libzscanner.la @LIBOBJS
 
 tests/sample_conf.rc: tests/files/sample_conf
 	../resource.sh tests/files/sample_conf >$@
-
diff --git a/src/common/acl.c b/src/common/acl.c
index e3412e3dccc1a253c4943cf4c239e032dcbc54c0..ac305186853cbc021cb576a33112e38bc6db98e0 100644
--- a/src/common/acl.c
+++ b/src/common/acl.c
@@ -55,7 +55,7 @@ static int acl_compare(void *k1, void *k2)
 
 	/* Compare integers if IPv4. */
 	if (sockaddr_family(a1) == AF_INET) {
-		
+
 		/* Compute mask .*/
 		uint32_t mask = acl_fill_mask32(a1->prefix);
 
@@ -70,14 +70,14 @@ static int acl_compare(void *k1, void *k2)
 	/* IPv6 matching. */
 #ifndef DISABLE_IPV6
 	if (sockaddr_family(a1) == AF_INET6) {
-		
+
 		/* Get mask .*/
 		short chunk = a1->prefix;
-		
+
 		/* Compare address by 32bit chunks. */
 		uint32_t* a1p = (uint32_t *)(&a1->addr6.sin6_addr);
 		uint32_t* a2p = (uint32_t *)(&a2->addr6.sin6_addr);
-		
+
 		/* Mask 0 = 0 bits to compare from LO->HO (in big-endian).
 		 * Mask 128 = 128 bits to compare.
 		 */
@@ -125,7 +125,7 @@ acl_t *acl_new(acl_rule_t default_rule, const char *name)
 		free(acl);
 		return 0;
 	}
-	
+
 	/* Initialize skip list for rules with TSIG. */
 	/*! \todo This needs a better structure to make
 	 *        nodes with TSIG preferred, but for now
@@ -172,12 +172,12 @@ int acl_create(acl_t *acl, const sockaddr_t* addr, acl_rule_t rule, void *val,
 	if (key == NULL) {
 		return ACL_ERROR;
 	}
-	
+
 	memcpy(&key->addr, addr, sizeof(sockaddr_t));
 	key->rule = rule;
 	key->val = val;
 
-	
+
 	if (flags & ACL_PREFER) {
 		skip_insert(acl->rules_pref, &key->addr, key, 0);
 	} else {
@@ -197,12 +197,12 @@ int acl_match(acl_t *acl, const sockaddr_t* addr, acl_key_t **key)
 	if (found == NULL) {
 		found = skip_find(acl->rules, (void*)addr);
 	}
-	
+
 	/* Set stored value if exists. */
 	if (key != NULL) {
 		*key = found;
 	}
-	
+
 	/* Return appropriate rule. */
 	if (found == NULL) {
 		return acl->default_rule;
diff --git a/src/common/base32hex.c b/src/common/base32hex.c
index b5a31230deb9892db554e0aa09103fe3ad49b31b..d6d58f36e6e7cc42addb239b0cb1f906465e55cf 100644
--- a/src/common/base32hex.c
+++ b/src/common/base32hex.c
@@ -427,4 +427,3 @@ int32_t base32hex_decode_alloc(const uint8_t  *in,
 	// Decoding data.
 	return base32hex_decode(in, in_len, *out, out_len);
 }
-
diff --git a/src/common/base64.c b/src/common/base64.c
index 67e3817c95dae3def8d73e89418e0c703d55e134..563f77d5fd9000b95471fde4d68e1039b20e57ac 100644
--- a/src/common/base64.c
+++ b/src/common/base64.c
@@ -277,4 +277,3 @@ int32_t base64_decode_alloc(const uint8_t  *in,
 		return ret;
 	}
 }
-
diff --git a/src/common/dSFMT-params.h b/src/common/dSFMT-params.h
index c779d8a66bb21267a89eeab37b893b65a9332619..610eb6a4a9f3ee3375d0a9e71c01c408e227635d 100644
--- a/src/common/dSFMT-params.h
+++ b/src/common/dSFMT-params.h
@@ -10,7 +10,7 @@
   following definitions are in dSFMT-paramsXXXX.h file.
   ----------------------*/
 /** the pick up position of the array.
-#define DSFMT_POS1 122 
+#define DSFMT_POS1 122
 */
 
 /** the parameter of shift left as four 32-bit registers.
diff --git a/src/common/dSFMT.c b/src/common/dSFMT.c
index 090bb800400e1e8c0d60f6dbc5a2106dee61faeb..17db8285162f27f01cc1baca3ca6c8e793cdd037 100644
--- a/src/common/dSFMT.c
+++ b/src/common/dSFMT.c
@@ -1,5 +1,5 @@
-/** 
- * @file dSFMT.c 
+/**
+ * @file dSFMT.c
  * @brief double precision SIMD-oriented Fast Mersenne Twister (dSFMT)
  * based on IEEE 754 format.
  *
@@ -128,7 +128,7 @@ static void setup_const(void) {
  */
 inline static void do_recursion(w128_t *r, w128_t *a, w128_t *b, w128_t *u) {
     __m128i v, w, x, y, z;
-    
+
     x = a->si;
     z = _mm_slli_epi64(x, DSFMT_SL1);
     y = _mm_shuffle_epi32(u->si, SSE2_SHUFF);
@@ -237,7 +237,7 @@ inline static void convert_o0o1(w128_t *w) {
  * This function fills the user-specified array with double precision
  * floating point pseudorandom numbers of the IEEE 754 format.
  * @param dsfmt dsfmt state vector.
- * @param array an 128-bit array to be filled by pseudorandom numbers.  
+ * @param array an 128-bit array to be filled by pseudorandom numbers.
  * @param size number of 128-bit pseudorandom numbers to be generated.
  */
 inline static void gen_rand_array_c1o2(dsfmt_t *dsfmt, w128_t *array,
@@ -275,7 +275,7 @@ inline static void gen_rand_array_c1o2(dsfmt_t *dsfmt, w128_t *array,
  * This function fills the user-specified array with double precision
  * floating point pseudorandom numbers of the IEEE 754 format.
  * @param dsfmt dsfmt state vector.
- * @param array an 128-bit array to be filled by pseudorandom numbers.  
+ * @param array an 128-bit array to be filled by pseudorandom numbers.
  * @param size number of 128-bit pseudorandom numbers to be generated.
  */
 inline static void gen_rand_array_c0o1(dsfmt_t *dsfmt, w128_t *array,
@@ -318,7 +318,7 @@ inline static void gen_rand_array_c0o1(dsfmt_t *dsfmt, w128_t *array,
  * This function fills the user-specified array with double precision
  * floating point pseudorandom numbers of the IEEE 754 format.
  * @param dsfmt dsfmt state vector.
- * @param array an 128-bit array to be filled by pseudorandom numbers.  
+ * @param array an 128-bit array to be filled by pseudorandom numbers.
  * @param size number of 128-bit pseudorandom numbers to be generated.
  */
 inline static void gen_rand_array_o0o1(dsfmt_t *dsfmt, w128_t *array,
@@ -361,7 +361,7 @@ inline static void gen_rand_array_o0o1(dsfmt_t *dsfmt, w128_t *array,
  * This function fills the user-specified array with double precision
  * floating point pseudorandom numbers of the IEEE 754 format.
  * @param dsfmt dsfmt state vector.
- * @param array an 128-bit array to be filled by pseudorandom numbers.  
+ * @param array an 128-bit array to be filled by pseudorandom numbers.
  * @param size number of 128-bit pseudorandom numbers to be generated.
  */
 inline static void gen_rand_array_o0c1(dsfmt_t *dsfmt, w128_t *array,
@@ -634,7 +634,7 @@ void dsfmt_chk_init_gen_rand(dsfmt_t *dsfmt, uint32_t seed, int mexp) {
     psfmt = &dsfmt->status[0].u32[0];
     psfmt[idxof(0)] = seed;
     for (i = 1; i < (DSFMT_N + 1) * 4; i++) {
-        psfmt[idxof(i)] = 1812433253UL 
+        psfmt[idxof(i)] = 1812433253UL
 	    * (psfmt[idxof(i - 1)] ^ (psfmt[idxof(i - 1)] >> 30)) + i;
     }
     initial_mask(dsfmt);
@@ -685,7 +685,7 @@ void dsfmt_chk_init_by_array(dsfmt_t *dsfmt, uint32_t init_key[],
     } else {
 	count = size;
     }
-    r = ini_func1(psfmt32[idxof(0)] ^ psfmt32[idxof(mid % size)] 
+    r = ini_func1(psfmt32[idxof(0)] ^ psfmt32[idxof(mid % size)]
 		  ^ psfmt32[idxof((size - 1) % size)]);
     psfmt32[idxof(mid % size)] += r;
     r += key_length;
@@ -693,8 +693,8 @@ void dsfmt_chk_init_by_array(dsfmt_t *dsfmt, uint32_t init_key[],
     psfmt32[idxof(0)] = r;
     count--;
     for (i = 1, j = 0; (j < count) && (j < key_length); j++) {
-	r = ini_func1(psfmt32[idxof(i)] 
-		      ^ psfmt32[idxof((i + mid) % size)] 
+	r = ini_func1(psfmt32[idxof(i)]
+		      ^ psfmt32[idxof((i + mid) % size)]
 		      ^ psfmt32[idxof((i + size - 1) % size)]);
 	psfmt32[idxof((i + mid) % size)] += r;
 	r += init_key[j] + i;
@@ -703,8 +703,8 @@ void dsfmt_chk_init_by_array(dsfmt_t *dsfmt, uint32_t init_key[],
 	i = (i + 1) % size;
     }
     for (; j < count; j++) {
-	r = ini_func1(psfmt32[idxof(i)] 
-		      ^ psfmt32[idxof((i + mid) % size)] 
+	r = ini_func1(psfmt32[idxof(i)]
+		      ^ psfmt32[idxof((i + mid) % size)]
 		      ^ psfmt32[idxof((i + size - 1) % size)]);
 	psfmt32[idxof((i + mid) % size)] += r;
 	r += i;
@@ -713,8 +713,8 @@ void dsfmt_chk_init_by_array(dsfmt_t *dsfmt, uint32_t init_key[],
 	i = (i + 1) % size;
     }
     for (j = 0; j < size; j++) {
-	r = ini_func2(psfmt32[idxof(i)] 
-		      + psfmt32[idxof((i + mid) % size)] 
+	r = ini_func2(psfmt32[idxof(i)]
+		      + psfmt32[idxof((i + mid) % size)]
 		      + psfmt32[idxof((i + size - 1) % size)]);
 	psfmt32[idxof((i + mid) % size)] ^= r;
 	r -= i;
diff --git a/src/common/dSFMT.h b/src/common/dSFMT.h
index f1aa9bd3e499d24885509dae740608b85336df70..8441b952b0aa295570093d6c303cb97b2dbfa96e 100644
--- a/src/common/dSFMT.h
+++ b/src/common/dSFMT.h
@@ -1,5 +1,5 @@
-/** 
- * @file dSFMT.h 
+/**
+ * @file dSFMT.h
  *
  * @brief double precision SIMD oriented Fast Mersenne Twister(dSFMT)
  * pseudorandom number generator based on IEEE 754 format.
@@ -18,7 +18,7 @@
  * and you have to define PRIu64 and PRIx64 in this file as follows:
  * @verbatim
  typedef unsigned int uint32_t
- typedef unsigned long long uint64_t  
+ typedef unsigned long long uint64_t
  #define PRIu64 "llu"
  #define PRIx64 "llx"
 @endverbatim
@@ -45,7 +45,7 @@
 /*-----------------
   BASIC DEFINITIONS
   -----------------*/
-/* Mersenne Exponent. The period of the sequence 
+/* Mersenne Exponent. The period of the sequence
  *  is a multiple of 2^DSFMT_MEXP-1.
  * #define DSFMT_MEXP 19937 */
 /** DSFMT generator has an internal state array of 128-bit integers,
@@ -119,7 +119,7 @@ typedef unsigned __int64 uint64_t;
 #endif
 
 #ifndef UINT64_C
-#  define UINT64_C(v) (v ## ULL) 
+#  define UINT64_C(v) (v ## ULL)
 #endif
 
 /*------------------------------------------
@@ -313,7 +313,7 @@ inline static double dsfmt_gv_genrand_close_open(void) {
  * This function generates and returns double precision pseudorandom
  * number which distributes uniformly in the range (0, 1].
  * dsfmt_init_gen_rand() or dsfmt_init_by_array() must be called
- * before this function. 
+ * before this function.
  * @param dsfmt dsfmt internal state date
  * @return double precision floating point pseudorandom number
  */
diff --git a/src/common/descriptor.c b/src/common/descriptor.c
index ec0daf33d34e30a94234bc9aa1e0ac57b3c90cdb..e713ba19c92084ebc700bbdd0fe94510891c034d 100644
--- a/src/common/descriptor.c
+++ b/src/common/descriptor.c
@@ -20,7 +20,7 @@
 #include <stdio.h>			// snprintf
 #include <stdlib.h>			// strtoul
 
-/*! 
+/*!
  * \brief The last RR type number in the descriptors table.
  */
 const int KNOT_RRTYPE_LAST = KNOT_RRTYPE_ANY;
diff --git a/src/common/errcode.c b/src/common/errcode.c
index 7b26c8af8d396a5f0830bfca98ffb0377f875cbe..4d524d6ac767137161a6f00587cf42b9161b1915 100644
--- a/src/common/errcode.c
+++ b/src/common/errcode.c
@@ -19,12 +19,12 @@
 
 const error_table_t knot_error_msgs[] = {
 	{KNOT_EOK, "OK"},
-	
+
 	/* TSIG errors. */
 	{KNOT_TSIG_EBADSIG, "Failed to verify TSIG MAC." },
 	{KNOT_TSIG_EBADKEY, "TSIG key not recognized or invalid." },
 	{KNOT_TSIG_EBADTIME, "TSIG signing time out of range." },
-	
+
 	/* Directly mapped error codes. */
 	{KNOT_ENOMEM, "Not enough memory."},
 	{KNOT_EINVAL, "Invalid parameter."},
@@ -37,7 +37,7 @@ const error_table_t knot_error_msgs[] = {
 	{KNOT_EADDRINUSE, "Address already in use."},
 	{KNOT_ENOENT, "Resource not found."},
 	{KNOT_ERANGE, "Value is out of range."},
-	
+
 	/* General errors. */
 	{KNOT_ERROR, "General error."},
 	{KNOT_ENOTRUNNING, "Resource is not running."},
diff --git a/src/common/evqueue.c b/src/common/evqueue.c
index efd6d4dd846420a007632a2c232c959374704fe8..c3a629685d6868add1a5baaba02c2309667371a4 100644
--- a/src/common/evqueue.c
+++ b/src/common/evqueue.c
@@ -133,4 +133,3 @@ int evqueue_add(evqueue_t *q, const event_t *ev)
 
 	return 0;
 }
-
diff --git a/src/common/evsched.c b/src/common/evsched.c
index 5e2073af2f4d3efc09858d0c29d57f62c99e9638..c5eae1492ec59c0d7342a8c14c04eafeaaedc798 100644
--- a/src/common/evsched.c
+++ b/src/common/evsched.c
@@ -106,7 +106,7 @@ void evsched_delete(evsched_t **s)
 		heap_delmin(&(*s)->heap);
 		evsched_event_free((*s), e);
 	}
-	
+
 	free((*s)->heap.data);
 	(*s)->heap.data = NULL;;
 
@@ -195,7 +195,7 @@ event_t* evsched_next(evsched_t *s)
 					pthread_mutex_lock(&s->mx);
 					continue;
                 }
-				
+
 				return next_ev;
 			}
 
@@ -243,10 +243,10 @@ int evsched_schedule(evsched_t *s, event_t *ev, uint32_t dt)
 	/* Update event timer. */
 	evsched_settimer(ev, dt);
 	ev->parent = s;
-	
+
 	/* Lock calendar. */
 	pthread_mutex_lock(&s->mx);
-	
+
 	heap_insert(&s->heap, ev);
 
 	/* Unlock calendar. */
@@ -317,7 +317,7 @@ int evsched_cancel(evsched_t *s, event_t *ev)
 	if ((found = heap_find(&s->heap, ev))) {
 		heap_delete(&s->heap, found);
 	}
-	
+
 	/* Check if not being processed, invalidate if yes.
 	 * Could happen if next 'cur' was set, but
 	 * the evsched_next() waits until we release rl.
@@ -336,4 +336,3 @@ int evsched_cancel(evsched_t *s, event_t *ev)
 
 	return found;
 }
-
diff --git a/src/common/fdset.c b/src/common/fdset.c
index c304840f6f6fc22a3c3427a92737fa7e4724c519..36584b6946bf49f95c951783adf6e5c5a072673b 100644
--- a/src/common/fdset.c
+++ b/src/common/fdset.c
@@ -146,13 +146,13 @@ int fdset_set_watchdog(fdset_t* fdset, int fd, int interval)
 	if (base == NULL || base->atimes == NULL) {
 		return -1;
 	}
-	
+
 	/* Lift watchdog if interval is negative. */
 	if (interval < 0) {
 		skip_remove(base->atimes, (void*)((size_t)fd), NULL, free);
 		return 0;
 	}
-	
+
 	/* Find if exists. */
 	timev_t *ts = NULL;
 	ts = (timev_t*)skip_find(base->atimes, (void*)((size_t)fd));
@@ -163,12 +163,12 @@ int fdset_set_watchdog(fdset_t* fdset, int fd, int interval)
 		}
 		skip_insert(base->atimes, (void*)((size_t)fd), (void*)ts, NULL);
 	}
-	
+
 	/* Update clock. */
 	if (time_now(ts) < 0) {
 		return -1;
 	}
-	
+
 	ts->tv_sec += interval; /* Only seconds precision. */
 	return 0;
 }
@@ -179,19 +179,19 @@ int fdset_sweep(fdset_t* fdset, void(*cb)(fdset_t*, int, void*), void *data)
 	if (base == NULL || base->atimes == NULL) {
 		return -1;
 	}
-	
+
 	/* Get time threshold. */
 	timev_t now;
 	if (time_now(&now) < 0) {
 		return -1;
 	}
-	
+
 	/* Inspect all nodes. */
 	int sweeped = 0;
 	const skip_node_t *n = skip_first(base->atimes);
 	while (n != NULL) {
 		const skip_node_t* pnext = skip_next(n);
-		
+
 		/* Evaluate */
 		timev_t *ts = (timev_t*)n->value;
 		if (ts->tv_sec <= now.tv_sec) {
@@ -200,7 +200,7 @@ int fdset_sweep(fdset_t* fdset, void(*cb)(fdset_t*, int, void*), void *data)
 		}
 		n = pnext;
 	}
-	
+
 	return sweeped;
 }
 
@@ -210,7 +210,7 @@ int fdset_sweep(fdset_t* fdset, void(*cb)(fdset_t*, int, void*), void *data)
  * Like select(2) but set the signals to block while waiting in
  * select.  This version is not entirely race condition safe.  Only
  * operating system support can make it so.
- * 
+ *
  * Copyright (c) 2001-2011, NLnet Labs. All rights reserved.
  *
  * This software is open source.
@@ -269,7 +269,7 @@ pselect_compat (int n,
 	} else {
 		result = select(n, readfds, writefds, exceptfds, NULL);
 	}
-	
+
 	if (sigmask && sigprocmask(SIG_SETMASK, &saved_sigmask, NULL) == -1)
 		return -1;
 
diff --git a/src/common/fdset_epoll.c b/src/common/fdset_epoll.c
index d4481b58f613119ad6eeb74d42217c436b4f6b5c..f889dd33c557430fb884966e891f56125ecb086f 100644
--- a/src/common/fdset_epoll.c
+++ b/src/common/fdset_epoll.c
@@ -43,11 +43,11 @@ fdset_t *fdset_epoll_new()
 	if (set) {
 		/* Blank memory. */
 		memset(set, 0, sizeof(fdset_t));
-	
+
 		/* Create epoll fd. */
 		set->epfd = epoll_create(OS_FDS_CHUNKSIZE);
 	}
-	
+
 	return set;
 }
 
@@ -110,7 +110,7 @@ int fdset_epoll_remove(fdset_t *fdset, int fd)
 	/* Trim excessive memory if possible (retval is not interesting). */
 	mreserve((char **)&fdset->events, sizeof(struct epoll_event),
 	         fdset->nfds + 1, OS_FDS_CHUNKSIZE, &fdset->reserved);
-	
+
 	return 0;
 }
 
diff --git a/src/common/fdset_kqueue.c b/src/common/fdset_kqueue.c
index a45da96d3d78f5cbda9ada0b0c18f345b42b442c..7c52f71ba96cac4c82ccf5f7104573d2f96b5597 100644
--- a/src/common/fdset_kqueue.c
+++ b/src/common/fdset_kqueue.c
@@ -47,7 +47,7 @@ fdset_t *fdset_kqueue_new()
 	if (set) {
 		/* Blank memory. */
 		memset(set, 0, sizeof(fdset_t));
-	
+
 		/* Create kqueue fd. */
 		set->kq = kqueue();
 		if (set->kq < 0) {
@@ -55,7 +55,7 @@ fdset_t *fdset_kqueue_new()
 			set = 0;
 		}
 	}
-	
+
 	return set;
 }
 
@@ -106,7 +106,7 @@ int fdset_kqueue_remove(fdset_t *fdset, int fd)
 	if (fdset == NULL || fd < 0) {
 		return -1;
 	}
-	
+
 	/* Find in set. */
 	int pos = -1;
 	for (int i = 0; i < fdset->nfds; ++i) {
@@ -115,11 +115,11 @@ int fdset_kqueue_remove(fdset_t *fdset, int fd)
 			break;
 		}
 	}
-	
+
 	if (pos < 0) {
 		return -1;
 	}
-	
+
 	/* Remove filters. */
 	EV_SET(&fdset->events[pos], fd, EVFILT_READ,
 	       EV_DISABLE|EV_DELETE, 0, 0, 0);
@@ -127,7 +127,7 @@ int fdset_kqueue_remove(fdset_t *fdset, int fd)
 	/* Attempt to remove from set. */
 	size_t remaining = ((fdset->nfds - pos) - 1) * sizeof(struct kevent);
 	memmove(fdset->events + pos, fdset->events + (pos + 1), remaining);
-	
+
 	/* Attempt to remove from revents set. */
 	pos = -1;
 	for (int i = 0; i < fdset->nfds; ++i) {
@@ -141,7 +141,7 @@ int fdset_kqueue_remove(fdset_t *fdset, int fd)
 		memmove(fdset->revents + pos, fdset->revents + (pos + 1), remaining);
 	}
 
-	
+
 	/* Overwrite current item. */
 	--fdset->nfds;
 
diff --git a/src/common/fdset_poll.c b/src/common/fdset_poll.c
index 9b1c135dc9bd0d6207509e00ecb9d5da0ecce435..e16ae11e0bfd8ced9eef2b26bec7df8539324767 100644
--- a/src/common/fdset_poll.c
+++ b/src/common/fdset_poll.c
@@ -108,7 +108,7 @@ int fdset_poll_remove(fdset_t *fdset, int fd)
 	/* Trim excessive memory if possible (retval is not interesting). */
 	mreserve((char **)&fdset->fds, sizeof(struct pollfd), fdset->nfds,
 	         OS_FDS_CHUNKSIZE, &fdset->reserved);
-	
+
 	return 0;
 }
 
diff --git a/src/common/getline.c b/src/common/getline.c
index 67c15724ba94484f2ffaccb1f2ea1607463d39df..6a5e0ad26b2a410ddbc7fcbde7716701800912e1 100644
--- a/src/common/getline.c
+++ b/src/common/getline.c
@@ -51,7 +51,7 @@ ssize_t knot_getline(char **lineptr, size_t *n, FILE *stream)
 		}
 		*lineptr = tmp;
 	}
-		
+
 	memcpy(*lineptr, buffer, length);
 	(*lineptr)[length] = '\0';
 	*n = length;
diff --git a/src/common/hattrie/ahtable.c b/src/common/hattrie/ahtable.c
index 74a0fe545a13b38b50683917c5f78b8c37e03615..c9979c7feba0f514efca1cbfeb22fd81bd72da84 100644
--- a/src/common/hattrie/ahtable.c
+++ b/src/common/hattrie/ahtable.c
@@ -129,7 +129,7 @@ void ahtable_clear(ahtable_t* T)
     const size_t sslen = 2 * T->n * sizeof(uint32_t); /* used | reserved */
     T->slot_sizes = realloc(T->slot_sizes, sslen);
     memset(T->slot_sizes, 0, sslen);
-    
+
     if (T->index) {
         free(T->index);
         T->index = NULL;
@@ -263,7 +263,7 @@ static value_t* insert_key(ahtable_t* T, uint32_t h, const char* key, size_t len
     value_t *val = NULL;
     ins_key(T->slots[h] + T->slot_sizes[h], key, len, &val);
     T->slot_sizes[h] = new_size;
-    
+
     return val;
 }
 
@@ -314,7 +314,7 @@ value_t* ahtable_get(ahtable_t* T, const char* key, size_t len)
     if (ret == NULL) { /* insert if not found */
         ret = insert_key(T, i, key, len);
     }
-    
+
     return ret;
 }
 
@@ -336,11 +336,11 @@ void ahtable_build_index(ahtable_t* T)
         free(T->index);
         T->index = NULL;
     }
-    
+
     if (T->m == 0) return;
-    
+
     T->index = malloc(T->m * sizeof(slot_t));
-    
+
     slot_t s;
     size_t j, k, u;
     for (j = 0, u = 0; j < T->n; ++j) {
@@ -352,7 +352,7 @@ void ahtable_build_index(ahtable_t* T)
             s += k + sizeof(value_t);
         }
     }
-    
+
     qsort(T->index, T->m, sizeof(slot_t), cmpkey);
 }
 
@@ -361,7 +361,7 @@ int ahtable_find_leq (ahtable_t* T, const char* key, size_t len, value_t** dst)
     *dst = NULL;
     if (T->m == 0) return 1;
     assert(T->index != NULL);
-    
+
     /* the array is T->m size and sorted, use binary search */
     int r = 0;
     int a = 0, b = T->m - 1, k = 0;
@@ -376,11 +376,11 @@ int ahtable_find_leq (ahtable_t* T, const char* key, size_t len, value_t** dst)
         } else {
             a = k + 1;
         }
-        
+
     }
-    
-    
-    if (r < 0) { 
+
+
+    if (r < 0) {
         --k;    /* k is after previous node */
         r = -1;
     } else if (r > 0) {
@@ -399,7 +399,7 @@ void ahtable_insert (ahtable_t* T, const char* key, size_t len, value_t val)
     if (T->m >= T->max_m) {
         ahtable_expand(T);
     }
-    
+
     uint32_t i = hash(key, len) % T->n;
     *insert_key(T, i, key, len) = val;
 }
@@ -456,7 +456,7 @@ static void ahtable_sorted_iter_begin(ahtable_t* T, ahtable_iter_t *i)
         i->flags |= AH_INDEXED;
         return;
     }
-    
+
     i->d.xs = malloc(T->m * sizeof(slot_t));
 
     slot_t s;
@@ -563,7 +563,7 @@ static void ahtable_unsorted_iter_del(ahtable_iter_t* i)
     memmove(i->d.s, t, i->T->slot_sizes[i->i] - (size_t)(t - i->T->slots[i->i]));
     i->T->slot_sizes[i->i] -= (size_t)(t - i->d.s);
     --i->T->m;
-    
+
     /* find next filled slot*/
     if ((size_t) (i->d.s - i->T->slots[i->i]) >= i->T->slot_sizes[i->i]) {
         do {
@@ -653,4 +653,3 @@ value_t* ahtable_iter_val(ahtable_iter_t* i)
     if (i->flags & AH_SORTED) return ahtable_sorted_iter_val(i);
     else                      return ahtable_unsorted_iter_val(i);
 }
-
diff --git a/src/common/hattrie/ahtable.h b/src/common/hattrie/ahtable.h
index 6dae09b08d0f6b09f62165a238140e6e8d421495..b4bed739e6c5142661897fb25fc70c7ccd8a1125 100644
--- a/src/common/hattrie/ahtable.h
+++ b/src/common/hattrie/ahtable.h
@@ -34,7 +34,7 @@ typedef unsigned char* slot_t;
 typedef struct ahtable_t_
 {
     /* these fields are reserved for hattrie to fiddle with */
-    uint8_t flag; 
+    uint8_t flag;
     unsigned char c0;
     unsigned char c1;
 
@@ -101,7 +101,7 @@ typedef struct ahtable_iter_t_
         slot_t* xs; // pointers to keys
         slot_t s;           // slot position
     } d;
-    
+
 } ahtable_iter_t;
 
 void            ahtable_iter_begin     (ahtable_t*, ahtable_iter_t*, bool sorted);
@@ -118,4 +118,3 @@ value_t*        ahtable_iter_val       (ahtable_iter_t*);
 #endif
 
 #endif
-
diff --git a/src/common/hattrie/hat-trie.c b/src/common/hattrie/hat-trie.c
index fdab3854d24cafa1a8d5050901206160c95af001..8f8ef5afb0ca6d027b1de0b464bffffbc8a1dcb7 100644
--- a/src/common/hattrie/hat-trie.c
+++ b/src/common/hattrie/hat-trie.c
@@ -72,7 +72,7 @@ static trie_node_t* alloc_trie_node(hattrie_t* T, node_ptr child)
 static node_ptr hattrie_consume_ns(node_ptr **s, size_t *sp, size_t slen,
                                 const char **k, size_t *l, unsigned brk)
 {
-    
+
     node_ptr *bs = *s;
     node_ptr node = bs[*sp].t->xs[(unsigned char) **k];
     while (*node.flag & NODE_TYPE_TRIE && *l > brk) {
@@ -101,7 +101,7 @@ static node_ptr hattrie_consume_ns(node_ptr **s, size_t *sp, size_t slen,
         bs[*sp] = node;
         node = node.t->xs[(unsigned char) **k];
     }
-    
+
     /* stack top is always parent node */
     assert(*bs[*sp].flag & NODE_TYPE_TRIE);
     return node;
@@ -156,11 +156,11 @@ static value_t* hattrie_find_rightmost(node_ptr node)
         if (node.t->flag & NODE_HAS_VAL) {
             return &node.t->val;
         }
-        
+
         /* no non-empty children? */
         return NULL;
     }
-    
+
     /* node is ahtable */
     if (node.b->m == 0) {
         return NULL;
@@ -179,7 +179,7 @@ static node_ptr hattrie_find_ns(node_ptr **s, size_t *sp, size_t slen,
     if (*len == 0) return (*s)[*sp]; /* parent, as sp == 0 */
 
     node_ptr node = hattrie_consume_ns(s, sp, slen, key, len, 1);
-    
+
     /* if the trie node consumes value, use it */
     if (*node.flag & NODE_TYPE_TRIE) {
         if (!(node.t->flag & NODE_HAS_VAL)) {
@@ -190,10 +190,10 @@ static node_ptr hattrie_find_ns(node_ptr **s, size_t *sp, size_t slen,
 
     /* pure bucket holds only key suffixes, skip current char */
     if (*node.flag & NODE_TYPE_PURE_BUCKET) {
-        ++*key; 
+        ++*key;
         --*len;
     }
-    
+
     /* do not scan bucket, it's not needed for this operation */
     return node;
 }
@@ -275,7 +275,7 @@ void hattrie_clear(hattrie_t* T)
 hattrie_t* hattrie_dup(const hattrie_t* T, value_t (*nval)(value_t))
 {
     hattrie_t *N = hattrie_create();
-    
+
     /* assignment */
     if (!nval) nval = hattrie_setval;
 
@@ -382,7 +382,7 @@ int hattrie_split_mid(node_ptr node, unsigned *left_m, unsigned *right_m)
         }
         else break;
     }
-    
+
     return j;
 }
 
@@ -433,10 +433,10 @@ static void hattrie_split_fill(node_ptr src, node_ptr left, node_ptr right, uint
                 }
             }   /* keep the node in left */
         }
-        
+
         ahtable_iter_next(&i);
     }
-    
+
     ahtable_iter_free(&i);
 }
 
@@ -467,7 +467,7 @@ static void hattrie_split_h(node_ptr parent, node_ptr node)
         right.b = node.b;
         left.b = ahtable_create();
     }
-    
+
     /* setup created nodes */
     left.b->c0    = c0;
     left.b->c1    = j;
@@ -591,12 +591,12 @@ value_t* hattrie_tryget(hattrie_t* T, const char* key, size_t len)
     if (node.flag == NULL) {
         return NULL;
     }
-    
+
     /* if the trie node consumes value, use it */
     if (*node.flag & NODE_TYPE_TRIE) {
         return &node.t->val;
     }
-    
+
     return ahtable_tryget(node.b, key, len);
 }
 
@@ -622,17 +622,17 @@ static value_t* hattrie_walk(node_ptr* s, size_t sp,
         if (s[sp].t->flag & NODE_HAS_VAL) {
             return &s[sp].t->val;
         }
-        
+
         /* consumed whole stack */
         if (sp == 0) {
             break;
         }
-        
+
         /* pop stack */
         --key;
         --sp;
     }
-    
+
     return NULL;
 }
 
@@ -643,7 +643,7 @@ int hattrie_find_leq (hattrie_t* T, const char* key, size_t len, value_t** dst)
     node_ptr bs[NODESTACK_INIT];  /* base stack (will be enough mostly) */
     node_ptr *ns = bs;            /* generic ptr, could point to new mem */
     ns[sp] = T->root;
-    
+
     /* find node for given key */
     int ret = 1; /* no node on the left matches */
     node_ptr node = hattrie_find_ns(&ns, &sp, NODESTACK_INIT, &key, &len);
@@ -655,7 +655,7 @@ int hattrie_find_leq (hattrie_t* T, const char* key, size_t len, value_t** dst)
         }
         return 1; /* no previous key found */
     }
-    
+
     /* assign value from trie or find in table */
     if (*node.flag & NODE_TYPE_TRIE) {
         *dst = &node.t->val;
@@ -668,7 +668,7 @@ int hattrie_find_leq (hattrie_t* T, const char* key, size_t len, value_t** dst)
             ret = ahtable_find_leq(node.b, key, len, dst);
         }
     }
-    
+
     /* return if found equal or left in ahtable */
     if (*dst == 0) {
         *dst = hattrie_walk(ns, sp, key, hattrie_find_rightmost);
@@ -678,7 +678,7 @@ int hattrie_find_leq (hattrie_t* T, const char* key, size_t len, value_t** dst)
             ret = 1; /* no previous key found */
         }
     }
-    
+
     if (ns != bs) free(ns);
     return ret;
 }
@@ -694,7 +694,7 @@ int hattrie_del(hattrie_t* T, const char* key, size_t len)
     if (node.flag == NULL) {
         return -1;
     }
-    
+
     /* if consumed on a trie node, clear the value */
     if (*node.flag & NODE_TYPE_TRIE) {
         return hattrie_clrval(T, node);
@@ -704,10 +704,10 @@ int hattrie_del(hattrie_t* T, const char* key, size_t len)
     size_t m_old = ahtable_size(node.b);
     int ret =  ahtable_del(node.b, key, len);
     T->m -= (m_old - ahtable_size(node.b));
-    
+
     /* merge empty buckets */
     /*! \todo */
-    
+
     return ret;
 }
 
@@ -790,7 +790,7 @@ static void hattrie_iter_nextnode(hattrie_iter_t* i)
         /* push all child nodes from right to left */
         int j;
         for (j = TRIE_MAXCHAR; j >= 0; --j) {
-            
+
             /* skip repeated pointers to hybrid bucket */
             if (j < TRIE_MAXCHAR && node.t->xs[j].t == node.t->xs[j + 1].t) continue;
 
diff --git a/src/common/hattrie/hat-trie.h b/src/common/hattrie/hat-trie.h
index 8562f44d2f5e211d7169cced34150432e3910e3f..7842d213a597c2a484c017696f9515328bd7c353 100644
--- a/src/common/hattrie/hat-trie.h
+++ b/src/common/hattrie/hat-trie.h
@@ -84,5 +84,3 @@ value_t*        hattrie_iter_val       (hattrie_iter_t*);
 #endif
 
 #endif
-
-
diff --git a/src/common/hattrie/murmurhash3.c b/src/common/hattrie/murmurhash3.c
index cb24c8fb8c4411bfceefe7a5e43a8904bcfd1340..612f1f7e70f2e7e87bf57e66d717bb313971bddd 100644
--- a/src/common/hattrie/murmurhash3.c
+++ b/src/common/hattrie/murmurhash3.c
@@ -74,4 +74,3 @@ uint32_t hash(const char* data, size_t len_)
 
     return h1;
 }
-
diff --git a/src/common/hattrie/murmurhash3.h b/src/common/hattrie/murmurhash3.h
index ada7e476aeb5ddc868fbdf8cea37deb5c858ce97..d0e5812fb8333f7ec9c015860f2b0b39276c9b25 100644
--- a/src/common/hattrie/murmurhash3.h
+++ b/src/common/hattrie/murmurhash3.h
@@ -8,4 +8,3 @@
 uint32_t hash(const char* data, size_t len);
 
 #endif
-
diff --git a/src/common/heap.c b/src/common/heap.c
index 61498a892a726452658a2c7c2d13fe3789a5e2fb..8a2f1823043c6811d6fd768619b645ae0509f3f7 100644
--- a/src/common/heap.c
+++ b/src/common/heap.c
@@ -86,7 +86,7 @@ static inline void _heap_bubble_up(struct heap *h, int e)
 		heap_swap(HELEMENT(h,e),HELEMENT(h,e1));
 		e = e1;
 	}
-		
+
 }
 
 void heap_delmin(struct heap *h)
@@ -142,4 +142,3 @@ void heap_delete(struct heap *h, int e)
 		h->data = realloc(h->data, (h->max_size + 1) * sizeof(heap_val_t));
 	}
 }
-
diff --git a/src/common/heap.h b/src/common/heap.h
index 6fe355c6c517541886a6a1041a6bd561b09e70f4..5be7cfa3ddea9de69a9119d32c71cf02602ec20d 100644
--- a/src/common/heap.h
+++ b/src/common/heap.h
@@ -40,7 +40,7 @@ struct heap {
 #define INITIAL_HEAP_SIZE 512 /* initial heap size */
 #define HEAP_INCREASE_STEP 2  /* multiplier for each inflation, keep conservative */
 #define HEAP_DECREASE_THRESHOLD 2 /* threshold for deflation, keep conservative */
-#define HELEMENT(h,num) ((h)->data + (num)) 
+#define HELEMENT(h,num) ((h)->data + (num))
 #define HHEAD(h) HELEMENT((h),1)
 #define EMPTY_HEAP(h) ((h)->num == 0)			/* h->num == 0 */
 
diff --git a/src/common/libtap/README b/src/common/libtap/README
index d57b81de4b8d7b9761f27e86f608c595b24811d2..6c8a00af854c55fa5490b28ac65704d301684892 100644
--- a/src/common/libtap/README
+++ b/src/common/libtap/README
@@ -7,7 +7,7 @@ SYNOPSIS
 ========
 
     #include <tap.h>
-    
+
     int   foo () {return 3;}
     char *bar () {return "fnord";}
 
@@ -51,13 +51,13 @@ FUNCTIONS
 
 -   plan(tests)
 -   plan(NO_PLAN)
-    
-    Use this to start a series of tests. When you know how many tests there 
-    will be, you can put a number as a number of tests you expect to run. If 
+
+    Use this to start a series of tests. When you know how many tests there
+    will be, you can put a number as a number of tests you expect to run. If
     you do not know how many tests there will be, you can use plan(NO_PLAN)
     or not call this function. When you pass it a number of tests to run, a
     message similar to the following will appear in the output:
-    
+
         1..5
 
 -   ok(test)
@@ -65,17 +65,17 @@ FUNCTIONS
 
     Specify a test. the test can be any statement returning a true or false
     value. You may optionally pass a format string describing the test.
-    
+
         ok(r = reader_new("Of Mice and Men"), "create a new reader");
         ok(reader_go_to_page(r, 55), "can turn the page");
         ok(r->page == 55, "page turned to the right one");
-    
+
     Should print out:
-    
+
         ok 1 - create a new reader
         ok 2 - can turn the page
         ok 3 - page turned to the right one
-    
+
     On failure, a diagnostic message will be printed out.
 
         not ok 3 - page turned to the right one
@@ -89,11 +89,11 @@ FUNCTIONS
 
     Tests that the string you got is what you expected. with isnt, it is the
     reverse.
-    
+
         is("this", "that", "this is that");
 
     prints:
-    
+
         not ok 1 - this is that
         #   Failed test 'this is that'
         #   at is.c line 6.
@@ -106,11 +106,11 @@ FUNCTIONS
     Compares two ints with any binary operator that doesn't require an lvalue.
     This is nice to use since it provides a better error message than an
     equivalent ok.
-    
+
         cmp_ok(420, ">", 666);
-    
+
     prints:
-    
+
         not ok 1
         #   Failed test at cmpok.c line 5.
         #     420
@@ -125,11 +125,11 @@ FUNCTIONS
     Tests that the string you got matches the expected extended POSIX regex.
     unlike is the reverse. These macros are the equivalent of a skip on
     Windows.
-    
+
         like("stranger", "^s.(r).*\\1$", "matches the regex");
-        
+
     prints:
-    
+
         ok 1 - matches the regex
 
 -   pass()
@@ -147,28 +147,28 @@ FUNCTIONS
 
     Tests whether the given code causes your program to exit. The code gets
     passed to a macro that will test it in a forked process. If the code
-    succeeds it will be executed in the parent process. You can test things 
-    like passing a function a null pointer and make sure it doesnt 
+    succeeds it will be executed in the parent process. You can test things
+    like passing a function a null pointer and make sure it doesnt
     dereference it and crash.
-    
+
         dies_ok({abort();}, "abort does close your program");
         dies_ok({int x = 0/0;}, "divide by zero crash");
         lives ok({pow(3.0, 5.0)}, "nothing wrong with taking 3**5");
-    
+
     On Windows, these macros are the equivalent of a skip.
 
 -   exit_status()
 
     Summarizes the tests that occurred. If there was no plan, it will print
     out the number of tests as.
-    
+
         1..5
-    
+
     It will also print a diagnostic message about how many
     failures there were.
-    
+
         # Looks like you failed 2 tests of 3 run.
-    
+
     If all planned tests were successful, it will return 0. If any test fails,
     it will return the number of failed tests (including ones that were
     missing). If they all passed, but there were missing tests, it will return
@@ -178,20 +178,20 @@ FUNCTIONS
 -   diag(fmt, ...)
 
     print out a message to the tap output. note prints to stdout and diag
-    prints to stderr. Each line is preceeded by a "# " so that you know its a 
+    prints to stderr. Each line is preceeded by a "# " so that you know its a
     diagnostic message.
-    
+
         note("This is\na note\nto describe\nsomething.");
-    
+
     prints:
-    
+
         # This is
         # a note
         # to describe
         # something
-    
+
     ok() and these functions return ints so you can use them like:
-    
+
         ok(1) && note("yo!");
         ok(0) || diag("I have no idea what just happened");
 
@@ -202,14 +202,14 @@ FUNCTIONS
     Skip a series of n tests if test is true. You may give a reason why you are
     skipping them or not. The (possibly) skipped tests must occur between the
     skip and endskip macros.
-    
+
         skip(TRUE, 2);
         ok(1);
         ok(0);
         endskip;
 
     prints:
-    
+
         ok 1 # skip
         ok 2 # skip
 
@@ -223,9 +223,8 @@ FUNCTIONS
         todo()
         ok(0);
         endtodo;
-    
+
     prints:
-    
+
         not ok 1 # TODO
         #   Failed (TODO) test at todo.c line 7
-
diff --git a/src/common/libtap/tap.c b/src/common/libtap/tap.c
index 0cfa25f1e5b4b8cfe6755b4258d77bf4146e4d17..79fdce5f39be2b50e232c99bb498d96509cdc2fb 100644
--- a/src/common/libtap/tap.c
+++ b/src/common/libtap/tap.c
@@ -322,4 +322,3 @@ like_at_loc (int for_match, const char *file, int line, const char *got,
     return test;
 }
 #endif
-
diff --git a/src/common/libtap/tap.h b/src/common/libtap/tap.h
index 89484f477fd88d4e0b5e63a5d05e7f8369553b0a..40e7bf34c0f38a176575a0c28e9fb11298421635 100644
--- a/src/common/libtap/tap.h
+++ b/src/common/libtap/tap.h
@@ -111,4 +111,3 @@ int tap_test_died (int status);
 #endif
 
 #endif
-
diff --git a/src/common/libtap/tap_unit.h b/src/common/libtap/tap_unit.h
index c248fdec64b5a4af19b5df1204b604fc14363ac2..8cd20ad7a25446d51351e5766ebc873658a404e6 100644
--- a/src/common/libtap/tap_unit.h
+++ b/src/common/libtap/tap_unit.h
@@ -91,4 +91,3 @@ typedef struct {
 #endif // _TAP_UNIT_H_
 
 /*! @} */
-
diff --git a/src/common/mempattern.c b/src/common/mempattern.c
index 3b8315aa23e7a8e711faa0a0bc5ac2c6d355c71f..6a0e0dab6b77be32c7336c2d65709c25c64ea013 100644
--- a/src/common/mempattern.c
+++ b/src/common/mempattern.c
@@ -53,7 +53,7 @@ int mreserve(char **p, size_t tlen, size_t min, size_t allow, size_t *reserved)
 	if (maxlen < min) {
 		return -2; /* size_t overflow */
 	}
-	
+
 	/* Meet target size but trim excessive amounts. */
 	if (*reserved < min || *reserved > maxlen) {
 		void *trimmed = realloc(*p, maxlen * tlen);
@@ -64,7 +64,7 @@ int mreserve(char **p, size_t tlen, size_t min, size_t allow, size_t *reserved)
 			return -1;
 		}
 	}
-	
+
 	return 0;
 }
 
@@ -73,21 +73,21 @@ char* sprintf_alloc(const char *fmt, ...)
 	int size = 100;
 	char *p = NULL, *np = NULL;
 	va_list ap;
-	
+
 	if ((p = malloc(size)) == NULL)
 		return NULL;
-	
+
 	while (1) {
-		
+
 		/* Try to print in the allocated space. */
 		va_start(ap, fmt);
 		int n = vsnprintf(p, size, fmt, ap);
 		va_end(ap);
-		
+
 		/* If that worked, return the string. */
 		if (n > -1 && n < size)
 			return p;
-		
+
 		/* Else try again with more space. */
 		if (n > -1) {       /* glibc 2.1 */
 			size = n+1; /* precisely what is needed */
@@ -101,7 +101,7 @@ char* sprintf_alloc(const char *fmt, ...)
 			p = np;
 		}
 	}
-	
+
 	/* Should never get here. */
 	return p;
 }
@@ -111,7 +111,7 @@ char* strcdup(const char *s1, const char *s2)
 	if (!s1 || !s2) {
 		return NULL;
 	}
-	
+
 	size_t slen = strlen(s1);
 	size_t s2len = strlen(s2);
 	size_t nlen = slen + s2len + 1;
diff --git a/src/common/print.c b/src/common/print.c
index 382a80e093a8a1cd5ec18e3da94b38809344f788..7ebc0f59cb6207417f271f8c9562cfbeec8dea9f 100644
--- a/src/common/print.c
+++ b/src/common/print.c
@@ -86,4 +86,3 @@ float time_diff(struct timeval *begin, struct timeval *end)
 	       (end->tv_usec - begin->tv_usec) / 1000.0;
 
 }
-
diff --git a/src/common/print.h b/src/common/print.h
index 5190aa7a268d0ff39399e8a60f12248f4e660670..bd676107ce296513749fed6a0ae78180f880900e 100644
--- a/src/common/print.h
+++ b/src/common/print.h
@@ -103,4 +103,3 @@ float time_diff(struct timeval *begin, struct timeval *end);
 #endif /* _KNOTD_COMMON_PRINT_H_ */
 
 /*! @} */
-
diff --git a/src/common/slab/slab.c b/src/common/slab/slab.c
index 9e0651d6b969d6658bec4d50ad8875a7b15399ee..d3d059494baa76f2ede3552224fafbe7d3e79a40 100644
--- a/src/common/slab/slab.c
+++ b/src/common/slab/slab.c
@@ -148,7 +148,7 @@ void __attribute__ ((constructor)) slab_init()
 	if (slab_size < 0) {
 		slab_size = SLAB_MINSIZE;
 	}
-	
+
 	// Fetch page size
 	SLAB_SZ = (size_t)slab_size;
 	unsigned slab_logsz = fastlog2(SLAB_SZ);
@@ -521,5 +521,3 @@ int slab_cache_reap(slab_cache_t* cache)
 	cache->empty = 0;
 	return count;
 }
-
-
diff --git a/src/common/sockaddr.c b/src/common/sockaddr.c
index 6d8646dad476f697a3cb5eb09e5e66a23290deb2..72b92acb6fabc92c97cdfe4e8dc98cdd55850dde 100644
--- a/src/common/sockaddr.c
+++ b/src/common/sockaddr.c
@@ -57,7 +57,7 @@ int sockaddr_copy(sockaddr_t *dst, const sockaddr_t *src)
 	if (memcpy(dst, src, sizeof(sockaddr_t)) != NULL) {
 		return 0;
 	}
-	
+
 	return -1;
 }
 
@@ -104,7 +104,7 @@ int sockaddr_setprefix(sockaddr_t *dst, int prefix)
 	if (dst == NULL || prefix < 0) {
 		return -1;
 	}
-	
+
 	return dst->prefix = prefix;
 }
 
diff --git a/src/knot.service b/src/knot.service
index 36864d05fc603d7abf178ae4deef772f7552c5b1..da800cea178a320a924ce843acd17cbc701bf70d 100644
--- a/src/knot.service
+++ b/src/knot.service
@@ -10,4 +10,3 @@ Restart=on-abort
 
 [Install]
 WantedBy=multi-user.target
-
diff --git a/src/knot.spec b/src/knot.spec
index 5856aab5eec6668d6fd1f2b3a09b87f545f1670b..65191c4f1ac494e4c6dedc384627f86141345ba6 100644
--- a/src/knot.spec
+++ b/src/knot.spec
@@ -88,4 +88,3 @@ fi
 
 * Thu Nov 3 2011 - feela@network.cz
 - Initial version
-
diff --git a/src/knot.sysconfig b/src/knot.sysconfig
index 99daeba74eef91527a64d979d122b19878261da6..857f9f20eed8a97465b90659ae9827251ef2adb4 100644
--- a/src/knot.sysconfig
+++ b/src/knot.sysconfig
@@ -1,4 +1,3 @@
 # Settings for the KNOT DNS daemon.
 # KNOTARGS= :  any extra command-line startup arguments for knot dns
 KNOTARGS=
-
diff --git a/src/knot/conf/cf-lex.l b/src/knot/conf/cf-lex.l
index 69daa6cb22e617d999129e03abe1bba1c06836e7..15b3fd0411833118a24a44d579612f31c4e35b7c 100644
--- a/src/knot/conf/cf-lex.l
+++ b/src/knot/conf/cf-lex.l
@@ -252,7 +252,7 @@ include BEGIN(include);
        }
     }
   }
-  
+
   return HEXSTR;
 }
 
@@ -324,4 +324,3 @@ hmac-sha512     { lval.alg = KNOT_TSIG_ALG_HMAC_SHA512; return TSIG_ALGO_NAME; }
 <include>["][^"\n]*\n cf_error(yyscanner, "Unterminated string.");
 
 %%
-
diff --git a/src/knot/conf/cf-parse.y b/src/knot/conf/cf-parse.y
index 151fc456ffef338f1969099b718c3a78e877e17e..8e675fd14018a7048fef0f9cd70b16f80fe50153 100644
--- a/src/knot/conf/cf-parse.y
+++ b/src/knot/conf/cf-parse.y
@@ -90,7 +90,7 @@ static void conf_remote_set_via(void *scanner, char *item) {
          break;
       }
    }
-   
+
    /* Check */
    if (!found) {
       cf_error(scanner, "interface '%s' is not defined", item);
@@ -265,10 +265,10 @@ static int conf_key_add(void *scanner, knot_tsig_key_t **key, char *item)
 {
     /* Reset */
     *key = 0;
-    
+
     /* Find in keys */
     knot_dname_t *sample = knot_dname_new_from_str(item, strlen(item), 0);
-    
+
     conf_key_t* r = 0;
     WALK_LIST (r, new_config->keys) {
         if (knot_dname_compare(r->k.name, sample) == 0) {
@@ -518,8 +518,8 @@ system:
 		     "and has no effect.\n");
      free($4.t);
  }
- | system WORKERS NUM ';' { 
-     if ($3.i <= 0) { 
+ | system WORKERS NUM ';' {
+     if ($3.i <= 0) {
         cf_error(scanner, "worker count must be greater than 0\n");
      } else {
         new_config->workers = $3.i;
@@ -543,7 +543,7 @@ system:
      } else {
        cf_error(scanner, "invalid user name '%s'", $3.t);
      }
-     
+
      free($3.t);
  }
  | system MAX_CONN_IDLE INTERVAL ';' { new_config->max_conn_idle = $3.i; }
@@ -563,13 +563,13 @@ keys:
      if (knot_tsig_digest_length($3.alg) == 0) {
         cf_error(scanner, "unsupported digest algorithm");
      }
-     
+
      /* Normalize to FQDN */
      char *fqdn = $2.t;
      size_t fqdnl = strlen(fqdn);
      if (fqdn[fqdnl - 1] != '.') {
         fqdnl = ((fqdnl + 2)/4+1)*4; /* '.', '\0' */
-        char* tmpdn = malloc(fqdnl); 
+        char* tmpdn = malloc(fqdnl);
 	if (!tmpdn) {
 	   cf_error(scanner, "out of memory when allocating string");
 	   free(fqdn);
@@ -604,7 +604,7 @@ keys:
      } else {
          free($4.t);
      }
-     
+
      free(fqdn);
 }
 
@@ -993,4 +993,3 @@ control:
 conf: ';' | system '}' | interfaces '}' | keys '}' | remotes '}' | groups '}' | zones '}' | log '}' | control '}';
 
 %%
-
diff --git a/src/knot/conf/conf.c b/src/knot/conf/conf.c
index 165880401f3780c472c3125d845c6191238e8b89..9c42fe04db6fe18b601a42c7ff7f190d1c7ac4ab 100644
--- a/src/knot/conf/conf.c
+++ b/src/knot/conf/conf.c
@@ -105,7 +105,7 @@ static void conf_parse_begin(conf_t *conf)
 	conf->names = hattrie_create();
 }
 
-static void conf_parse_end(conf_t *conf) 
+static void conf_parse_end(conf_t *conf)
 {
 	if (conf->names) {
 		hattrie_free(conf->names);
@@ -150,7 +150,7 @@ static int conf_process(conf_t *conf)
 			return KNOT_ENOMEM;
 		}
 	}
-	
+
 	// Normalize paths
 	conf->storage = strcpath(conf->storage);
 
@@ -175,7 +175,7 @@ static int conf_process(conf_t *conf)
 			return KNOT_ENOMEM;
 		}
 	}
-	
+
 	/* Default TCP/UDP limits. */
 	if (conf->max_conn_idle < 1) {
 		conf->max_conn_idle = CONFIG_IDLE_WD;
@@ -186,7 +186,7 @@ static int conf_process(conf_t *conf)
 	if (conf->max_conn_reply < 1) {
 		conf->max_conn_reply = CONFIG_REPLY_WD;
 	}
-	
+
 	// Postprocess interfaces
 	conf_iface_t *cfg_if = NULL;
 	WALK_LIST(cfg_if, conf->ifaces) {
@@ -197,7 +197,7 @@ static int conf_process(conf_t *conf)
 	if (conf->ctl.iface && conf->ctl.iface->port <= 0) {
 		conf->ctl.iface->port = REMOTE_DPORT;
 	}
-	
+
 	/* Default RRL limits. */
 	if (conf->rrl_slip < 0) {
 		conf->rrl_slip = CONFIG_RRL_SLIP;
@@ -205,7 +205,7 @@ static int conf_process(conf_t *conf)
 	if (conf->rrl_size == 0) {
 		conf->rrl_size = CONFIG_RRL_SIZE;
 	}
-	
+
 	/* Default parallel transfers. */
 	if (conf->xfers <= 0) conf->xfers = CONFIG_XFERS;
 
@@ -219,7 +219,7 @@ static int conf_process(conf_t *conf)
 		if (zone->dbsync_timeout < 0) {
 			zone->dbsync_timeout = conf->dbsync_timeout;
 		}
-		
+
 		// Default policy for ixfr-from-differences
 		if (zone->build_diffs < 0) {
 			zone->build_diffs = conf->build_diffs;
@@ -229,7 +229,7 @@ static int conf_process(conf_t *conf)
 		if (zone->enable_checks < 0) {
 			zone->enable_checks = conf->zone_checks;
 		}
-		
+
 		// Default policy for disabling ANY type queries for AA
 		if (zone->disable_any < 0) {
 			zone->disable_any = conf->disable_any;
@@ -249,7 +249,7 @@ static int conf_process(conf_t *conf)
 		if (zone->ixfr_fslimit == 0) {
 			zone->ixfr_fslimit = conf->ixfr_fslimit;
 		}
-		
+
 		// Default zone file
 		if (zone->file == NULL) {
 			zone->file = strcdup(zone->name, ".zone");
@@ -258,7 +258,7 @@ static int conf_process(conf_t *conf)
 				continue;
 			}
 		}
-		
+
 		// Relative zone filenames should be relative to storage
 		if (zone->file[0] != '/') {
 			size_t prefix_len = strlen(conf->storage) + 1; // + '\0'
@@ -295,7 +295,7 @@ static int conf_process(conf_t *conf)
 			continue;
 		}
 		char *dpos = dest;
-		
+
 		/* Since we have already allocd dest to accomodate
 		 * storage/zname length strcpy is safe. */
 		memcpy(dpos, conf->storage, stor_len + 1);
@@ -310,7 +310,7 @@ static int conf_process(conf_t *conf)
 		for (int i = 0; i < zname_len; ++i) {
 			if (dpos[i] == '/') dpos[i] = '_';
 		}
-		
+
 		memcpy(dpos + zname_len, "db", 3);
 		zone->db = dest;
 
@@ -327,7 +327,7 @@ static int conf_process(conf_t *conf)
 		memcpy(dpos, conf->storage, stor_len + 1);
 		dpos += stor_len;
 		if (conf->storage[stor_len - 1] != '/') {
-			*(dpos++) = '/';	
+			*(dpos++) = '/';
 			*dpos = '\0';
 		}
 
@@ -339,11 +339,11 @@ static int conf_process(conf_t *conf)
 		memcpy(dpos + zname_len, dbext, strlen(dbext) + 1);
 		zone->ixfr_db = dest;
 	}
-	
+
 	/* Update UID and GID. */
 	if (conf->uid < 0) conf->uid = getuid();
 	if (conf->gid < 0) conf->gid = getgid();
-	
+
 	/* Build remote control ACL. */
 	sockaddr_t addr;
 	conf_remote_t *r = NULL;
@@ -438,7 +438,7 @@ static int conf_fparser(conf_t *conf)
 
 	int ret = KNOT_EOK;
 	pthread_mutex_lock(&_parser_lock);
-	
+
 	// {
 	// Hook new configuration
 	new_config = conf;
@@ -462,7 +462,7 @@ static int conf_fparser(conf_t *conf)
 	fclose(f);
 	// }
 	pthread_mutex_unlock(&_parser_lock);
-	
+
 	return ret;
 }
 
@@ -534,7 +534,7 @@ conf_t *conf_new(const char* path)
 	c->xfers = -1;
 	c->rrl_slip = -1;
 	c->build_diffs = 0; /* Disable by default. */
-	
+
 	/* ACLs. */
 	c->ctl.acl = acl_new(ACL_DENY, "remote_ctl");
 	if (!c->ctl.acl) {
@@ -569,7 +569,7 @@ int conf_parse(conf_t *conf)
 	conf_parse_begin(conf);
 	int ret = conf_fparser(conf);
 	conf_parse_end(conf);
-	
+
 	/* Postprocess config. */
 	if (ret == 0) {
 		ret = conf_process(conf);
@@ -685,17 +685,17 @@ void conf_truncate(conf_t *conf, int unload_hooks)
 		free(conf->nsid);
 		conf->nsid = 0;
 	}
-	
+
 	/* Free remote control list. */
 	WALK_LIST_DELSAFE(n, nxt, conf->ctl.allow) {
 		conf_free_remote((conf_remote_t*)n);
 	}
 	conf->remotes_count = 0;
 	init_list(&conf->remotes);
-	
+
 	/* Free remote control ACL. */
 	acl_truncate(conf->ctl.acl);
-	
+
 	/* Free remote control iface. */
 	conf_free_iface(conf->ctl.iface);
 }
@@ -708,7 +708,7 @@ void conf_free(conf_t *conf)
 
 	/* Truncate config. */
 	conf_truncate(conf, 1);
-	
+
 	/* Free remote control ACL. */
 	acl_delete(&conf->ctl.acl);
 
@@ -771,7 +771,7 @@ int conf_open(const char* path)
 		/* Postprocess config. */
 		ret = conf_process(nconf);
 	}
-	
+
 	if (ret != KNOT_EOK) {
 		conf_free(nconf);
 		return ret;
@@ -810,7 +810,7 @@ char* strcpath(char *path)
 	if (!path) {
 		return NULL;
 	}
-	
+
 	// Remote trailing slash
 	size_t plen = strlen(path);
 	if (path[plen - 1] == '/') {
@@ -850,7 +850,7 @@ char* strcpath(char *path)
 		npath[0] = '\0';
 		strncpy(npath, path, (size_t)(remainder - path));
 		strncat(npath, tild_exp, tild_len);
-		
+
 		// Append remainder
 		++remainder;
 		strncat(npath, remainder, strlen(remainder));
@@ -934,4 +934,3 @@ void conf_free_log(conf_log_t *log)
 
 	free(log);
 }
-
diff --git a/src/knot/conf/conf.h b/src/knot/conf/conf.h
index d39d0fdab26b15dd539673078bdf46042dc5fa24..64616eca15887bd99dd2ff1bd9faa1c893282421 100644
--- a/src/knot/conf/conf.h
+++ b/src/knot/conf/conf.h
@@ -249,7 +249,7 @@ typedef struct conf_t {
 	size_t ixfr_fslimit; /*!< File size limit for IXFR journal. */
 	int build_diffs;     /*!< Calculate differences from changes. */
 	hattrie_t *names; /*!< Zone tree for duplicate checking. */
-	
+
 	/*
 	 * Remote control interface.
 	 */
diff --git a/src/knot/conf/logconf.c b/src/knot/conf/logconf.c
index 0d2b7da80d5256418130cdbb1a886eac815da27c..fa37273edcafea36eeebbd9ce5e848ef9068aab5 100644
--- a/src/knot/conf/logconf.c
+++ b/src/knot/conf/logconf.c
@@ -98,4 +98,3 @@ int log_conf_hook(const struct conf_t *conf, void *data)
 
 	return KNOT_EOK;
 }
-
diff --git a/src/knot/ctl/knotc_main.c b/src/knot/ctl/knotc_main.c
index a8d747fea62ae63c0347b5a953a7b1ce718e3be0..9c114458947531a7eb2a3eb37d7d9d87c5966dee 100644
--- a/src/knot/ctl/knotc_main.c
+++ b/src/knot/ctl/knotc_main.c
@@ -139,12 +139,12 @@ static int cmd_remote_print_reply(const knot_rrset_t *rr)
 	if (knot_rrset_type(rr) != KNOT_RRTYPE_TXT) {
 		return KNOT_EMALF;
 	}
-	
+
 	for (uint16_t i = 0; i < knot_rrset_rdata_rr_count(rr); i++) {
 		/* Parse TXT. */
 		remote_print_txt(rr, i);
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -157,7 +157,7 @@ static int cmd_remote_reply(int c)
 		knot_packet_free(&reply);
 		return KNOT_ENOMEM;
 	}
-	
+
 	/* Read response packet. */
 	int n = tcp_recv(c, rwire, SOCKET_MTU_SZ, NULL);
 	if (n <= 0) {
@@ -166,7 +166,7 @@ static int cmd_remote_reply(int c)
 		free(rwire);
 		return KNOT_ECONN;
 	}
-	
+
 	/* Parse packet and check response. */
 	int ret = remote_parse(reply, rwire, n);
 	if (ret == KNOT_EOK) {
@@ -186,7 +186,7 @@ static int cmd_remote_reply(int c)
 			break;
 		}
 	}
-	
+
 	/* Response cleanup. */
 	knot_packet_free(&reply);
 	free(rwire);
@@ -204,7 +204,7 @@ static int cmd_remote(const char *cmd, uint16_t rrt, int argc, char *argv[])
 		                 cmd);
 		return 1;
 	}
-	
+
 	/* Make query. */
 	uint8_t *buf = NULL;
 	size_t buflen = 0;
@@ -214,7 +214,7 @@ static int cmd_remote(const char *cmd, uint16_t rrt, int argc, char *argv[])
 		                   cmd);
 		return 1;
 	}
-	
+
 	/* Build query data. */
 	knot_rrset_t *rr = remote_build_rr("data.", rrt);
 	for (int i = 0; i < argc; ++i) {
@@ -238,7 +238,7 @@ static int cmd_remote(const char *cmd, uint16_t rrt, int argc, char *argv[])
 	if (r->key) {
 		remote_query_sign(buf, &buflen, qr->max_size, r->key);
 	}
-	
+
 	/* Send query. */
 	int s = socket_create(r->family, SOCK_STREAM, IPPROTO_TCP);
 	int conn_state = socket_connect(s, r->address, r->port);
@@ -247,7 +247,7 @@ static int cmd_remote(const char *cmd, uint16_t rrt, int argc, char *argv[])
 		                 " %s@%d.\n", r->address, r->port);
 		rc = 1;
 	}
-	
+
 	/* Wait for reply. */
 	if (rc == 0) {
 		int ret = KNOT_EOK;
@@ -260,11 +260,11 @@ static int cmd_remote(const char *cmd, uint16_t rrt, int argc, char *argv[])
 			}
 		}
 	}
-	
+
 	/* Cleanup. */
 	if (rc == 0) printf("\n");
 	knot_rrset_deep_free(&rr, 1, 1);
-	
+
 	/* Close connection. */
 	socket_close(s);
 	knot_packet_free(&qr);
@@ -277,13 +277,13 @@ static int tsig_parse_str(knot_tsig_key_t *key, const char *str)
 	if (!h) {
 		return KNOT_ENOMEM;
 	}
-	
+
 	char *k = NULL, *s = NULL;
 	if ((k = (char*)strchr(h, ':'))) { /* Second part - NAME|SECRET */
 		*k++ = '\0';               /* String separator */
 		s = (char*)strchr(k, ':'); /* Thirt part - |SECRET */
 	}
-	
+
 	/* Determine algorithm. */
 
 	int algorithm = KNOT_TSIG_ALG_HMAC_MD5;
@@ -301,7 +301,7 @@ static int tsig_parse_str(knot_tsig_key_t *key, const char *str)
 		s = k; /* Ignore first part, push down. */
 		k = h;
 	}
-	
+
 	/* Parse key name. */
 
 	int result = knot_tsig_create_key(k, algorithm, s, key);
@@ -331,13 +331,13 @@ static int tsig_parse_line(knot_tsig_key_t *k, char *l)
 	if (!n) {
 		return KNOT_EMALF;
 	}
-	
+
 	/* Assume hmac-md5 if no algo specified. */
 	if (!s) {
 		s = a;
 		a = "hmac-md5";
 	}
-	
+
 	/* Lookup algorithm. */
 	knot_lookup_table_t *alg;
 	alg = knot_lookup_by_name(knot_tsig_alg_domain_names, a);
@@ -345,7 +345,7 @@ static int tsig_parse_line(knot_tsig_key_t *k, char *l)
 	if (!alg) {
 		return KNOT_EMALF;
 	}
-	
+
 	/* Create the key data. */
 	return knot_tsig_create_key(n, alg->id, s, k);
 }
@@ -357,7 +357,7 @@ static int tsig_parse_file(knot_tsig_key_t *k, const char *f)
 		log_server_error("Couldn't open key-file '%s'.\n", f);
 		return KNOT_EINVAL;
 	}
-	
+
 	int c = 0;
 	int ret = KNOT_EOK;
 	char *line = malloc(64);
@@ -366,7 +366,7 @@ static int tsig_parse_file(knot_tsig_key_t *k, const char *f)
 	if (line) {
 		lres = 64;
 	}
-	
+
 	while ((c = fgetc(fp)) != EOF) {
 		if (mreserve(&line, sizeof(char), llen + 1, 512, &lres) != 0) {
 			ret = KNOT_ENOMEM;
@@ -386,9 +386,9 @@ static int tsig_parse_file(knot_tsig_key_t *k, const char *f)
 		} else {
 			line[llen++] = (char)c;
 		}
-		
+
 	}
-	
+
 	free(line);
 	fclose(fp);
 	return ret;
@@ -401,18 +401,18 @@ int main(int argc, char **argv)
 	unsigned flags = F_NULL;
 	char *config_fn = NULL;
 	char *default_config = conf_find_default();
-	
+
 	/* Remote server descriptor. */
 	int ret = KNOT_EOK;
 	const char *r_addr = NULL;
 	int r_port = -1;
 	knot_tsig_key_t r_key;
 	memset(&r_key, 0, sizeof(knot_tsig_key_t));
-	
+
 	/* Initialize. */
 	log_init();
 	log_levels_set(LOG_SYSLOG, LOG_ANY, 0);
-	
+
 	/* Long options. */
 	struct option opts[] = {
 		{"wait", no_argument, 0, 'w'},
@@ -498,7 +498,7 @@ int main(int argc, char **argv)
 		free(default_config);
 		return 1;
 	}
-	
+
 	/* Find requested command. */
 	knot_cmd_t *cmd = knot_cmd_tbl;
 	while (cmd->name) {
@@ -507,7 +507,7 @@ int main(int argc, char **argv)
 		}
 		++cmd;
 	}
-	
+
 	/* Command not found. */
 	if (!cmd->name) {
 		log_server_error("Invalid command: '%s'\n", argv[optind]);
@@ -524,7 +524,7 @@ int main(int argc, char **argv)
 			flags |= F_NOCONF;
 		}
 	}
-	
+
 	/* Create remote iface if not present in config. */
 	conf_iface_t *ctl_if = conf()->ctl.iface;
 	if (!ctl_if) {
@@ -532,7 +532,7 @@ int main(int argc, char **argv)
 		assert(ctl_if);
 		conf()->ctl.iface = ctl_if;
 		memset(ctl_if, 0, sizeof(conf_iface_t));
-		
+
 		/* Fill defaults. */
 		if (!r_addr) r_addr = "127.0.0.1";
 		if (r_port < 0) r_port =  REMOTE_DPORT;
@@ -550,7 +550,7 @@ int main(int argc, char **argv)
 			ctl_if->key = &r_key;
 		}
 	}
-	
+
 	/* Override from command line. */
 	if (r_addr) {
 		free(ctl_if->address);
@@ -587,17 +587,17 @@ static int cmd_start(int argc, char *argv[], unsigned flags)
 		                 "continue.\n");
 		return 1;
 	}
-	
+
 	/* Fetch PID. */
 	char *pidfile = pid_filename();
 	pid_t pid = pid_read(pidfile);
 	log_server_info("Starting server...\n");
-	
+
 	/* Prevent concurrent daemon launch. */
 	int rc = 0;
 	struct stat st;
 	int is_pidf = 0;
-	
+
 	/* Check PID. */
 	if (pid > 0 && pid_running(pid)) {
 		log_server_error("Server PID found, already running.\n");
@@ -617,7 +617,7 @@ static int cmd_start(int argc, char *argv[], unsigned flags)
 			pid_remove(pidfile);
 		}
 	}
-	
+
 	/* Prepare command */
 	const char *cfg = conf()->filename;
 	size_t args_c = 6;
@@ -629,7 +629,7 @@ static int cmd_start(int argc, char *argv[], unsigned flags)
 		has_flag(flags, F_VERBOSE) ? "-v" : "",
 		argc > 0 ? argv[0] : ""
 	};
-	
+
 	/* Execute command */
 	if (has_flag(flags, F_INTERACTIVE)) {
 		log_server_info("Running in interactive mode.\n");
@@ -659,7 +659,7 @@ static int cmd_start(int argc, char *argv[], unsigned flags)
 			select(0, 0, 0, 0, &tv);
 		}
 	}
-	
+
 	free(pidfile);
 	return rc;
 }
@@ -678,7 +678,7 @@ static int cmd_stop(int argc, char *argv[], unsigned flags)
 	pid_t pid = pid_read(pidfile);
 	int rc = 0;
 	struct stat st;
-	
+
 	/* Check for non-existent PID file. */
 	int has_pidf = (stat(pidfile, &st) == 0);
 	if(has_pidf && pid <= 0) {
@@ -704,7 +704,7 @@ static int cmd_stop(int argc, char *argv[], unsigned flags)
 		pid_remove(pidfile);
 		rc = 1;
 	}
-	
+
 
 	/* Wait for finish */
 	if (rc == 0 && has_flag(flags, F_WAIT)) {
@@ -717,7 +717,7 @@ static int cmd_stop(int argc, char *argv[], unsigned flags)
 			pid = pid_read(pidfile); /* Update */
 		}
 	}
-	
+
 	return rc;
 }
 
@@ -729,7 +729,7 @@ static int cmd_restart(int argc, char *argv[], unsigned flags)
 		                 "continue.\n");
 		return 1;
 	}
-	
+
 	int rc = 0;
 	rc |= cmd_stop(argc, argv, flags | F_WAIT);
 	rc |= cmd_start(argc, argv, flags);
@@ -771,7 +771,7 @@ static int cmd_checkconf(int argc, char *argv[], unsigned flags)
 	} else {
 		log_server_info("OK, configuration is valid.\n");
 	}
-	
+
 	return 0;
 }
 
@@ -780,7 +780,7 @@ static int cmd_checkzone(int argc, char *argv[], unsigned flags)
 	/* Zone checking */
 	int rc = 0;
 	node *n = 0;
-	
+
 	/* Generate databases for all zones */
 	WALK_LIST(n, conf()->zones) {
 		/* Fetch zone */
@@ -788,7 +788,7 @@ static int cmd_checkzone(int argc, char *argv[], unsigned flags)
 		int zone_match = 0;
 		for (unsigned i = 0; i < argc; ++i) {
 			size_t len = strlen(zone->name);
-			
+
 			/* All (except root) without final dot */
 			if (len > 1) {
 				len -= 1;
@@ -803,7 +803,7 @@ static int cmd_checkzone(int argc, char *argv[], unsigned flags)
 			/* WALK_LIST is a for-cycle. */
 			continue;
 		}
-		
+
 		/* Create zone loader context. */
 		zloader_t *l = NULL;
 		int ret = knot_zload_open(&l, zone->file, zone->name,
@@ -815,7 +815,7 @@ static int cmd_checkzone(int argc, char *argv[], unsigned flags)
 			rc = 1;
 			continue;
 		}
-		
+
 		knot_zone_t *z = knot_zload_load(l);
 		if (z == NULL) {
 			log_zone_error("Loading of zone %s failed.\n",
@@ -824,10 +824,10 @@ static int cmd_checkzone(int argc, char *argv[], unsigned flags)
 			rc = 1;
 			continue;
 		}
-		
+
 		knot_zone_deep_free(&z);
 		knot_zload_close(l);
-		
+
 		log_zone_info("Zone %s OK.\n", zone->name);
 	}
 
diff --git a/src/knot/ctl/process.c b/src/knot/ctl/process.c
index 374505d2b2ab7056f9e63acaa3313f08b4305ef8..d91127308332569fe43dc525633e3c5b7dab541e 100644
--- a/src/knot/ctl/process.c
+++ b/src/knot/ctl/process.c
@@ -143,7 +143,7 @@ int proc_update_privileges(int uid, int gid)
 		}
 	}
 #endif
-	
+
 	/* Watch uid/gid. */
 	if (gid != getgid()) {
 		log_server_info("Changing group id to '%d'.\n", gid);
@@ -159,7 +159,7 @@ int proc_update_privileges(int uid, int gid)
 			                 uid);
 		}
 	}
-	
+
 	/* Check storage writeability. */
 	int ret = KNOT_EOK;
 	char *lfile = strcdup(conf()->storage, "/knot.lock");
@@ -194,7 +194,7 @@ pid_t pid_start(const char *argv[], int argc, int drop_privs)
 {
 	pid_t chproc = fork();
 	if (chproc == 0) {
-	
+
 		/* Alter privileges. */
 		if (drop_privs) {
 			proc_update_privileges(conf()->uid, conf()->gid);
@@ -226,7 +226,7 @@ pid_t pid_start(const char *argv[], int argc, int drop_privs)
 		exit(1);
 		return -1;
 	}
-	
+
 	return chproc;
 }
 
diff --git a/src/knot/ctl/remote.c b/src/knot/ctl/remote.c
index b6d8410579011ef195d3f71b0bb991a23ee0d643..8b58794731dcf87b846dff1c80e5efb508008f39 100644
--- a/src/knot/ctl/remote.c
+++ b/src/knot/ctl/remote.c
@@ -81,21 +81,21 @@ static int remote_rdata_apply(server_t *s, remote_cmdargs_t* a, remote_zonef_t *
 	if (!s || !a || !cb) {
 		return KNOT_EINVAL;
 	}
-	
+
 	knot_nameserver_t *ns = s->nameserver;
 	knot_zone_t *zone = NULL;
 	int ret = KNOT_EOK;
-	
+
 	/* Refresh specific zones. */
 	for (unsigned i = 0; i < a->argc; ++i) {
 		rcu_read_lock();
-		
+
 		/* Process all zones in data section. */
 		const knot_rrset_t *rr = a->arg[i];
 		if (knot_rrset_type(rr) != KNOT_RRTYPE_NS) {
 			continue;
 		}
-		
+
 		for (uint16_t i = 0; i < knot_rrset_rdata_rr_count(rr); i++) {
 			/* Refresh zones. */
 			const knot_dname_t *dn =
@@ -107,7 +107,7 @@ static int remote_rdata_apply(server_t *s, remote_cmdargs_t* a, remote_zonef_t *
 		}
 		rcu_read_unlock();
 	}
-	
+
 	return ret;
 }
 
@@ -117,21 +117,21 @@ static int remote_zone_refresh(server_t *s, const knot_zone_t *z)
 	if (!s || !z) {
 		return KNOT_EINVAL;
 	}
-	
+
 	knot_nameserver_t *ns =  s->nameserver;
 	evsched_t *sch = ((server_t *)knot_ns_get_data(ns))->sched;
 	zonedata_t *zd = (zonedata_t *)knot_zone_data(z);
 	if (!sch || !zd) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Expire REFRESH timer. */
 	if (zd->xfr_in.timer) {
 		evsched_cancel(sch, zd->xfr_in.timer);
 		evsched_schedule(sch, zd->xfr_in.timer,
 		                 tls_rand() * 1000);
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -141,21 +141,21 @@ static int remote_zone_flush(server_t *s, const knot_zone_t *z)
 	if (!s || !z) {
 		return KNOT_EINVAL;
 	}
-	
+
 	knot_nameserver_t *ns =  s->nameserver;
 	evsched_t *sch = ((server_t *)knot_ns_get_data(ns))->sched;
 	zonedata_t *zd = (zonedata_t *)knot_zone_data(z);
 	if (!sch || !zd) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Expire IXFR sync timer. */
 	if (zd->ixfr_dbsync) {
 		evsched_cancel(sch, zd->ixfr_dbsync);
 		evsched_schedule(sch, zd->ixfr_dbsync,
 		                 tls_rand() * 1000);
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -194,14 +194,14 @@ static int remote_c_zonestatus(server_t *s, remote_cmdargs_t* a)
 	dbg_server("remote: %s\n", __func__);
 	char *dst = a->resp;
 	size_t rb = sizeof(a->resp) - 1;
-	
+
 	int ret = KNOT_EOK;
 	rcu_read_lock();
 	knot_nameserver_t *ns =  s->nameserver;
 	const knot_zone_t **zones = knot_zonedb_zones(ns->zone_db);
 	for (unsigned i = 0; i < knot_zonedb_zone_count(ns->zone_db); ++i) {
 		zonedata_t *zd = (zonedata_t *)zones[i]->data;
-		
+
 		/* Fetch latest serial. */
 		const knot_rrset_t *soa_rrs = 0;
 		uint32_t serial = 0;
@@ -212,7 +212,7 @@ static int remote_c_zonestatus(server_t *s, remote_cmdargs_t* a)
 			assert(soa_rrs != NULL);
 			serial = knot_rrset_rdata_soa_serial(soa_rrs);
 		}
-		
+
 		/* Evalute zone type. */
 		const char *state = NULL;
 		if (serial == 0)  {
@@ -220,7 +220,7 @@ static int remote_c_zonestatus(server_t *s, remote_cmdargs_t* a)
 		} else if (zd->xfr_in.has_master) {
 			state = "xfer";
 		}
-		
+
 		/* Evaluate zone state. */
 		char *when = NULL;
 		if (zd->xfr_in.state == XFR_PENDING) {
@@ -260,16 +260,16 @@ static int remote_c_zonestatus(server_t *s, remote_cmdargs_t* a)
 			ret = KNOT_ESPACE;
 			break;
 		}
-		
+
 		memcpy(dst, buf, n);
 		rb -= n;
 		dst += n;
-		
-		
+
+
 	}
 	rcu_read_unlock();
 	free(zones);
-	
+
 	a->rlen = sizeof(a->resp) - 1 - rb;
 	return ret;
 }
@@ -289,7 +289,7 @@ static int remote_c_refresh(server_t *s, remote_cmdargs_t* a)
 		dbg_server_verb("remote: refreshing all zones\n");
 		return server_refresh(s);
 	}
-	
+
 	/* Refresh specific zones. */
 	return remote_rdata_apply(s, a, &remote_zone_refresh);
 }
@@ -318,7 +318,7 @@ static int remote_c_flush(server_t *s, remote_cmdargs_t* a)
 		free(zones);
 		return ret;
 	}
-	
+
 	/* Flush specific zones. */
 	return remote_rdata_apply(s, a, &remote_zone_flush);
 }
@@ -344,7 +344,7 @@ int remote_bind(conf_iface_t *desc)
 	if (!desc) {
 		return -1;
 	}
-	
+
 	/* Create new socket. */
 	int s = socket_create(desc->family, SOCK_STREAM, IPPROTO_TCP);
 	if (s < 0) {
@@ -353,7 +353,7 @@ int remote_bind(conf_iface_t *desc)
 				 knot_strerror(s));
 		return KNOT_ERROR;
 	}
-	
+
 	/* Bind to interface and start listening. */
 	int r = socket_bind(s, desc->family, desc->address, desc->port);
 	if (r == KNOT_EOK) {
@@ -366,7 +366,7 @@ int remote_bind(conf_iface_t *desc)
 				 desc->address, desc->port);
 		return r;
 	}
-	
+
 	return s;
 }
 
@@ -375,7 +375,7 @@ int remote_unbind(int r)
 	if (r < 0) {
 		return KNOT_EINVAL;
 	}
-	
+
 	return socket_close(r);
 }
 
@@ -384,7 +384,7 @@ int remote_poll(int r)
 	if (r < 0) {
 		return -1;
 	}
-	
+
 	/* Wait for events. */
 	fd_set rfds;
 	FD_ZERO(&rfds);
@@ -408,7 +408,7 @@ int remote_recv(int r, sockaddr_t *a, uint8_t* buf, size_t *buflen)
 		socket_close(c);
 		return KNOT_ECONNREFUSED;
 	}
-	
+
 	return c;
 }
 
@@ -425,7 +425,7 @@ int remote_parse(knot_packet_t* pkt, const uint8_t* buf, size_t buflen)
 		dbg_server("remote: failed to parse packet data\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	return ret;
 }
 
@@ -462,7 +462,7 @@ static int remote_send_chunk(int c, knot_packet_t *pkt, const char* d,
 	if (len == 0) {
 		return KNOT_ERROR;
 	}
-	
+
 	/* Evaluate output. */
 	uint16_t rr_count = 0;
 	knot_rrset_t *rr = remote_build_rr("result.", KNOT_RRTYPE_TXT);
@@ -479,11 +479,11 @@ static int remote_send_chunk(int c, knot_packet_t *pkt, const char* d,
 	len += rrlen;
 	rlen -= rrlen;
 	knot_rrset_deep_free(&rr, 1, 1);
-	
+
 	if (len > 0) {
 		return tcp_send(c, rwire, len);
 	}
-	
+
 	return len;
 }
 
@@ -511,7 +511,7 @@ int remote_answer(int fd, server_t *s, knot_packet_t *pkt, uint8_t* rwire, size_
 		return KNOT_EMALF;
 	}
 	knot_dname_free(&realm);
-	
+
 	/* Command:
 	 * QNAME: leftmost label of QNAME
 	 */
@@ -541,13 +541,13 @@ int remote_answer(int fd, server_t *s, knot_packet_t *pkt, uint8_t* rwire, size_
 		}
 		++c;
 	}
-	
+
 	/* Prepare response. */
 	if (ret != KNOT_EOK || args->rlen == 0) {
 		args->rlen = strlen(knot_strerror(ret));
 		strncpy(args->resp, knot_strerror(ret), args->rlen);
 	}
-	
+
 	unsigned p = 0;
 	size_t chunk = 16384;
 	for (; p + chunk < args->rlen; p += chunk) {
@@ -558,7 +558,7 @@ int remote_answer(int fd, server_t *s, knot_packet_t *pkt, uint8_t* rwire, size_
 	if (r > 0) {
 		remote_send_chunk(fd, pkt, args->resp + p, r, rwire, rlen);
 	}
-	
+
 	free(args);
 	free(cmd);
 	return ret;
@@ -571,11 +571,11 @@ int remote_process(server_t *s, int r, uint8_t* buf, size_t buflen)
 		dbg_server("remote: not enough space to allocate query\n");
 		return KNOT_ENOMEM;
 	}
-	
+
 	/* Initialize remote party address. */
 	sockaddr_t a;
 	sockaddr_prep(&a);
-	
+
 	/* Accept incoming connection and read packet. */
 	size_t wire_len = buflen;
 	int c = remote_recv(r, &a, buf, &wire_len);
@@ -584,11 +584,11 @@ int remote_process(server_t *s, int r, uint8_t* buf, size_t buflen)
 		knot_packet_free(&pkt);
 		return c;
 	}
-	
+
 	/* Parse packet and answer if OK. */
 	int ret = remote_parse(pkt, buf, wire_len);
 	if (ret == KNOT_EOK) {
-		
+
 		/* Check ACL list. */
 		char straddr[SOCKADDR_STRLEN];
 		sockaddr_tostr(&a, straddr, sizeof(straddr));
@@ -614,7 +614,7 @@ int remote_process(server_t *s, int r, uint8_t* buf, size_t buflen)
 			k = ((conf_iface_t *)m->val)->key;
 		}
 		rcu_read_unlock();
-		
+
 		/* Check TSIG. */
 		if (k) {
 			if (!tsig_rr) {
@@ -638,11 +638,11 @@ int remote_process(server_t *s, int r, uint8_t* buf, size_t buflen)
 				return KNOT_EACCES;
 			}
 		}
-		
+
 		/* Answer packet. */
 		remote_answer(c, s, pkt, buf, buflen);
 	}
-	
+
 	knot_packet_free(&pkt);
 	socket_close(c);
 	return ret;
@@ -653,21 +653,21 @@ knot_packet_t* remote_query(const char *query, const knot_tsig_key_t *key)
 	if (!query) {
 		return NULL;
 	}
-	
+
 	knot_packet_t *qr = knot_packet_new(KNOT_PACKET_PREALLOC_QUERY);
 	if (!qr) {
 		return NULL;
 	}
-	
+
 	knot_packet_set_max_size(qr, 512);
 	knot_query_init(qr);
 	knot_packet_set_random_id(qr);
-	
+
 	/* Reserve space for TSIG. */
 	if (key) {
 		knot_packet_set_tsig_size(qr, tsig_wire_maxsize(key));
 	}
-	
+
 	/* Question section. */
 	knot_question_t q;
 	char *qname = strcdup(query, KNOT_CTL_REALM_EXT);
@@ -683,13 +683,13 @@ knot_packet_t* remote_query(const char *query, const knot_tsig_key_t *key)
 	/* Cannot return != KNOT_EOK, but still. */
 	if (knot_query_set_question(qr, &q) != KNOT_EOK) {
 		knot_packet_free(&qr);
-        	free(qname);
-        	return NULL;
+		free(qname);
+		return NULL;
 	}
 
 	knot_dname_release(q.qname);
 	free(qname);
-	
+
 	return qr;
 }
 
@@ -698,7 +698,7 @@ int remote_query_append(knot_packet_t *qry, knot_rrset_t *data)
 	if (!qry || !data) {
 		return KNOT_EINVAL;
 	}
-	
+
 	uint8_t *sp = qry->wireformat + qry->size;
 	uint16_t rrs = 0;
 	size_t bsize = 0;
@@ -706,7 +706,7 @@ int remote_query_append(knot_packet_t *qry, knot_rrset_t *data)
 	if (ret == KNOT_EOK) {
 		qry->header.nscount += rrs;
 	}
-	
+
 	/* Finalize packet size. */
 	qry->size += bsize;
 	return KNOT_EOK;
@@ -719,17 +719,17 @@ int remote_query_sign(uint8_t *wire, size_t *size, size_t maxlen,
 	if (!wire || !size || !key) {
 		return KNOT_EINVAL;
 	}
-	
+
 	size_t dlen = knot_tsig_digest_length(key->algorithm);
 	uint8_t *digest = malloc(dlen);
 	if (!digest) {
 		return KNOT_ENOMEM;
 	}
-	
+
 	int ret = knot_tsig_sign(wire, size, maxlen, NULL, 0, digest, &dlen,
 	                         key, 0, 0);
 	free(digest);
-	
+
 	return ret;
 }
 
@@ -738,13 +738,13 @@ knot_rrset_t* remote_build_rr(const char *k, uint16_t t)
 	if (!k) {
 		return NULL;
 	}
-	
+
 	/* Assert K is FQDN. */
 	knot_dname_t *key = knot_dname_new_from_nonfqdn_str(k, strlen(k), 0);
 	if (!key) {
 		return NULL;
 	}
-	
+
 	/* Create RRSet. */
 	knot_rrset_t *rr = knot_rrset_new(key, t, KNOT_CLASS_CH, 0);
 	knot_dname_release(key);
@@ -756,12 +756,12 @@ int remote_create_txt(knot_rrset_t *rr, const char *v, size_t v_len)
 	if (!rr || !v) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Number of chunks. */
 	const size_t K = 255;
 	unsigned chunks = v_len / K + 1;
 	uint8_t *raw = knot_rrset_create_rdata(rr, v_len + chunks);
-	
+
 	/* Write TXT item. */
 	unsigned p = 0;
 	if (v_len > K) {
@@ -792,7 +792,7 @@ int remote_create_ns(knot_rrset_t *rr, const char *d)
 	if (!dn) {
 		return KNOT_ERROR;
 	}
-	
+
 	/* Build RDATA. */
 	uint8_t *rdata = knot_rrset_create_rdata(rr, sizeof(knot_dname_t *));
 	if (!rdata) {
@@ -800,7 +800,7 @@ int remote_create_ns(knot_rrset_t *rr, const char *d)
 		return KNOT_ERROR;
 	}
 	memcpy(rdata, &dn, sizeof(knot_dname_t *));
-	
+
 	return KNOT_EOK;
 }
 
diff --git a/src/knot/main.c b/src/knot/main.c
index f95726f15b683787ff602a2570be6c345af4fb8b..a3a45d2f7f18c3c95e6084a543db3aff917e0c9d 100644
--- a/src/knot/main.c
+++ b/src/knot/main.c
@@ -51,13 +51,13 @@ void interrupt_handle(int s)
 		sig_req_reload = 1;
 		return;
 	}
-	
+
 	// Refresh
 	if (s == SIGUSR2) {
 		sig_req_refresh = 1;
 		return;
 	}
-	
+
 	// Stop server
 	if (s == SIGINT || s == SIGTERM) {
 		if (sig_stopping == 0) {
@@ -88,7 +88,7 @@ int main(int argc, char **argv)
 	int verbose = 0;
 	int daemonize = 0;
 	char* config_fn = NULL;
-	
+
 	/* Long options. */
 	struct option opts[] = {
 		{"config",    required_argument, 0, 'c'},
@@ -98,7 +98,7 @@ int main(int argc, char **argv)
 		{"help",      no_argument,       0, 'h'},
 		{0, 0, 0, 0}
 	};
-	
+
 	while ((c = getopt_long(argc, argv, "c:dvVh", opts, &li)) != -1) {
 		switch (c)
 		{
@@ -178,7 +178,7 @@ int main(int argc, char **argv)
 			config_fn = rpath;
 		}
 	}
-	
+
 	// Create server
 	server_t *server = server_create();
 
@@ -187,33 +187,33 @@ int main(int argc, char **argv)
 	conf_add_hook(conf(), CONF_LOG, log_conf_hook, 0);
 	conf_add_hook(conf(), CONF_ALL, server_conf_hook, server);
 	rcu_read_unlock();
-	
+
 	/* POSIX 1003.1e capabilities. */
 #ifdef HAVE_CAP_NG_H
-	
+
 	/* Drop all capabilities. */
 	if (capng_have_capability(CAPNG_EFFECTIVE, CAP_SETPCAP)) {
 		capng_clear(CAPNG_SELECT_BOTH);
-	
-	
+
+
 		/* Retain ability to set capabilities and FS access. */
 		capng_type_t tp = CAPNG_EFFECTIVE|CAPNG_PERMITTED;
 		capng_update(CAPNG_ADD, tp, CAP_SETPCAP);
 		capng_update(CAPNG_ADD, tp, CAP_DAC_OVERRIDE);
 		capng_update(CAPNG_ADD, tp, CAP_CHOWN); /* Storage ownership. */
-		
+
 		/* Allow binding to privileged ports.
 		 * (Not inheritable)
 		 */
 		capng_update(CAPNG_ADD, tp, CAP_NET_BIND_SERVICE);
-		
+
 		/* Allow setuid/setgid. */
 		capng_update(CAPNG_ADD, tp, CAP_SETUID);
 		capng_update(CAPNG_ADD, tp, CAP_SETGID);
-		
+
 		/* Allow priorities changing. */
 		capng_update(CAPNG_ADD, tp, CAP_SYS_NICE);
-		
+
 		/* Apply */
 		if (capng_apply(CAPNG_SELECT_BOTH) < 0) {
 			log_server_error("Couldn't set process capabilities - "
@@ -262,7 +262,7 @@ int main(int argc, char **argv)
 		return 1;
 	}
 	fclose(f);
-	
+
 	/* Load zones and add hook. */
 	zones_ns_conf_hook(conf(), server->nameserver);
 	conf_add_hook(conf(), CONF_ALL, zones_ns_conf_hook, server->nameserver);
@@ -330,8 +330,8 @@ int main(int argc, char **argv)
 		} else {
 			remote = evqueue()->fds[EVQUEUE_READFD];
 		}
-		
-		
+
+
 		/* Run event loop. */
 		for(;;) {
 			pthread_sigmask(SIG_UNBLOCK, &sa.sa_mask, NULL);
@@ -357,7 +357,7 @@ int main(int argc, char **argv)
 					                 "slave zones - %s",
 					                 knot_strerror(cf_ret));
 				}
-				
+
 			}
 
 			/* Events. */
@@ -367,7 +367,7 @@ int main(int argc, char **argv)
 			}
 		}
 		pthread_sigmask(SIG_UNBLOCK, &sa.sa_mask, NULL);
-		
+
 		/* Close remote control interface */
 		if (remote > -1) {
 			close(remote);
@@ -402,7 +402,7 @@ int main(int argc, char **argv)
 	// Destroy event loop
 	evqueue_t *q = evqueue();
 	evqueue_free(&q);
-	
+
 	rcu_unregister_thread();
 
 	// Free default config filename if exists
diff --git a/src/knot/server/dthreads.c b/src/knot/server/dthreads.c
index d3a9a93124830797343a617d467fa8d46c493b5f..4b3e1c8e7ec00753409ffc8c0a64cdc41e3c2d15 100644
--- a/src/knot/server/dthreads.c
+++ b/src/knot/server/dthreads.c
@@ -138,7 +138,7 @@ static void *thread_ep(void *data)
 	rcu_register_thread();
 
 	dbg_dt("dthreads: [%p] entered ep\n", thread);
-	
+
 	/* Drop capabilities except FS access. */
 #ifdef HAVE_CAP_NG_H
 	if (capng_have_capability(CAPNG_EFFECTIVE, CAP_SETPCAP)) {
@@ -659,10 +659,10 @@ int dt_setaffinity(dthread_t *thread, unsigned* cpu_id, size_t cpu_count)
 	if (thread == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 #ifdef HAVE_PTHREAD_SETAFFINITY_NP
 	int ret = -1;
-	
+
 /* Linux, FreeBSD interface. */
 #if defined(HAVE_CPUSET_LINUX) || defined(HAVE_CPUSET_BSD)
 	cpu_set_t set;
@@ -692,7 +692,7 @@ int dt_setaffinity(dthread_t *thread, unsigned* cpu_id, size_t cpu_count)
 #else /* HAVE_PTHREAD_SETAFFINITY_NP */
 	return KNOT_ENOTSUP;
 #endif
-	
+
 	return KNOT_EOK;
 }
 
@@ -829,7 +829,7 @@ int dt_optimal_size()
 	if (ret > 0) {
 		return ret + CPU_ESTIMATE_MAGIC;
 	}
-	
+
 	dbg_dt("dthreads: failed to fetch the number of online CPUs.");
 	return DEFAULT_THR_COUNT;
 }
@@ -856,7 +856,7 @@ unsigned dt_get_id(dthread_t *thread)
 			return tid;
 		}
 	}
-	
+
 	return 0;
 }
 
diff --git a/src/knot/server/journal.c b/src/knot/server/journal.c
index a3179e1752cfaa96fa187dccd5b6604965f8c0f2..2fe9f317ec96de1b50e6bc61a583405b496f6b63 100644
--- a/src/knot/server/journal.c
+++ b/src/knot/server/journal.c
@@ -65,12 +65,12 @@ static int journal_recover(journal_t *j)
 	if (j == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Attempt to recover queue. */
 	int qstate[2] = { -1, -1 };
 	unsigned c = 0, p = j->max_nodes - 1;
 	while (1) {
-		
+
 		/* Fetch previous and current node. */
 		journal_node_t *np = j->nodes + p;
 		journal_node_t *nc = j->nodes + c;
@@ -94,7 +94,7 @@ static int journal_recover(journal_t *j)
 			dbg_journal_verb("journal: recovered qtail=%u\n",
 			                 qstate[1]);
 		}
-		
+
 		/* Both qstates set. */
 		if (qstate[0] > -1 && qstate[1] > -1) {
 			break;
@@ -103,33 +103,33 @@ static int journal_recover(journal_t *j)
 		/* Set prev and next. */
 		p = c;
 		c = (c + 1) % j->max_nodes;
-		
+
 		/* All nodes probed. */
 		if (c == 0) {
 			dbg_journal("journal: failed to recover node queue\n");
 			break;
 		}
 	}
-	
+
 	/* Evaluate */
 	if (qstate[0] < 0 || qstate[1] < 0) {
 		return KNOT_ERANGE;
 	}
-	
+
 	/* Write back. */
 	int seek_ret = lseek(j->fd, JOURNAL_HSIZE - 2 * sizeof(uint16_t), SEEK_SET);
 	if (seek_ret < 0 || !sfwrite(qstate, 2 * sizeof(uint16_t), j->fd)) {
 		dbg_journal("journal: failed to write back queue state\n");
 		return KNOT_ERROR;
 	}
-	
+
 	/* Reset queue state. */
 	j->qhead = qstate[0];
 	j->qtail = qstate[1];
 	dbg_journal("journal: node queue=<%u,%u> recovered\n",
 	            qstate[0], qstate[1]);
-	
-	
+
+
 	return KNOT_EOK;
 }
 
@@ -179,7 +179,7 @@ int journal_write_in(journal_t *j, journal_node_t **rn, uint64_t id, size_t len)
 			                 j->fsize);
 		}
 	}
-	
+
 	/* Evict occupied nodes if necessary. */
 	while (j->free.len < len ||
 	       j->nodes[jnext].flags > JOURNAL_FREE) {
@@ -252,7 +252,7 @@ int journal_write_out(journal_t *journal, journal_node_t *n)
 		journal->free.pos += size;
 		journal->free.len -= size;
 	}
-	
+
 	dbg_journal("journal: finishing node=%u id=%llu flags=0x%x, "
 	            "data=<%u, %u> free=<%u, %u>\n",
 	            journal->qtail, (unsigned long long)n->id,
@@ -270,7 +270,7 @@ int journal_write_out(journal_t *journal, journal_node_t *n)
 		            "free segment descriptor\n");
 		return KNOT_ERROR;
 	}
-	
+
 	/* Node write successful. */
 	journal->qtail = jnext;
 
@@ -294,7 +294,7 @@ int journal_update_crc(int fd)
 	if (fcntl(fd, F_GETFL) < 0) {
 		return KNOT_EINVAL;
 	}
-	
+
 	char buf[4096];
 	ssize_t rb = 0;
 	crc_t crc = crc_init();
@@ -311,7 +311,7 @@ int journal_update_crc(int fd)
 		dbg_journal("journal: couldn't write CRC to fd=%d\n", fd);
 		return KNOT_ERROR;
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -320,7 +320,7 @@ int journal_create(const char *fn, uint16_t max_nodes)
 	if (fn == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* File lock. */
 	struct flock fl;
 	memset(&fl, 0, sizeof(struct flock));
@@ -329,14 +329,14 @@ int journal_create(const char *fn, uint16_t max_nodes)
 	fl.l_start = 0;
 	fl.l_len = 0;
 	fl.l_pid = getpid();
-	
+
 	/* Create journal file. */
 	int fd = open(fn, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
 	if (fd < 0) {
 		dbg_journal("journal: failed to create file '%s'\n", fn);
 		return knot_map_errno(errno);
 	}
-	
+
 	/* Lock. */
 	fcntl(fd, F_SETLKW, &fl);
 	fl.l_type  = F_UNLCK;
@@ -376,7 +376,7 @@ int journal_create(const char *fn, uint16_t max_nodes)
 		remove(fn);
 		return KNOT_ERROR;
 	}
-	
+
 	if (!sfwrite(&zval, sizeof(uint16_t), fd)) {
 		fcntl(fd, F_SETLK, &fl);
 		close(fd);
@@ -413,7 +413,7 @@ int journal_create(const char *fn, uint16_t max_nodes)
 			return KNOT_ERROR;
 		}
 	}
-	
+
 	/* Recalculate CRC. */
 	if (journal_update_crc(fd) != KNOT_EOK) {
 		fcntl(fd, F_SETLK, &fl);
@@ -423,7 +423,7 @@ int journal_create(const char *fn, uint16_t max_nodes)
 		}
 		return KNOT_ERROR;
 	}
-	
+
 	/* Unlock and close. */
 	fcntl(fd, F_SETLK, &fl);
 	close(fd);
@@ -439,7 +439,7 @@ journal_t* journal_open(const char *fn, size_t fslimit, int mode, uint16_t bflag
 	if (fn == NULL) {
 		return NULL;
 	}
-	
+
 	/* Check for lazy mode. */
 	if (mode & JOURNAL_LAZY) {
 		dbg_journal("journal: opening journal %s lazily\n", fn);
@@ -454,7 +454,7 @@ journal_t* journal_open(const char *fn, size_t fslimit, int mode, uint16_t bflag
 		}
 		return j;
 	}
-	
+
 	/* Open journal file for r/w (returns error if not exists). */
 	int fd = open(fn, O_RDWR);
 	if (fd < 0) {
@@ -463,10 +463,10 @@ journal_t* journal_open(const char *fn, size_t fslimit, int mode, uint16_t bflag
 				return journal_open(fn, fslimit, mode, bflags);
 			}
 		}
-			
+
 		return NULL;
 	}
-	
+
 	/* File lock. */
 	struct flock fl;
 	memset(&fl, 0, sizeof(struct flock));
@@ -475,11 +475,11 @@ journal_t* journal_open(const char *fn, size_t fslimit, int mode, uint16_t bflag
 	fl.l_start = 0;
 	fl.l_len = 0;
 	fl.l_pid = getpid();
-	
+
 	/* Attempt to lock. */
 	dbg_journal_verb("journal: locking journal %s\n", fn);
 	int ret = fcntl(fd, F_SETLK, &fl);
-	
+
 	/* Lock. */
 	if (ret < 0) {
 		struct flock efl;
@@ -493,7 +493,7 @@ journal_t* journal_open(const char *fn, size_t fslimit, int mode, uint16_t bflag
 	}
 	fl.l_type  = F_UNLCK;
 	dbg_journal("journal: locked journal %s (returned %d)\n", fn, ret);
-	
+
 	/* Read magic bytes. */
 	dbg_journal("journal: reading magic bytes\n");
 	const char magic_req[MAGIC_LENGTH] = JOURNAL_MAGIC;
@@ -521,7 +521,7 @@ journal_t* journal_open(const char *fn, size_t fslimit, int mode, uint16_t bflag
 		close(fd);
 		return NULL;
 	}
-	
+
 	/* Recalculate CRC. */
 	char buf[4096];
 	ssize_t rb = 0;
@@ -529,7 +529,7 @@ journal_t* journal_open(const char *fn, size_t fslimit, int mode, uint16_t bflag
 	while((rb = read(fd, buf, sizeof(buf))) > 0) {
 		crc_calc = crc_update(crc_calc, (const unsigned char *)buf, rb);
 	}
-	
+
 	/* Compare */
 	if (crc == crc_calc) {
 		/* Rewind. */
@@ -557,7 +557,7 @@ journal_t* journal_open(const char *fn, size_t fslimit, int mode, uint16_t bflag
 		close(fd);
 		return NULL;
 	}
-	
+
 	/* Check max_nodes, but this is riddiculous. */
 	if (max_nodes == 0) {
 		dbg_journal_detail("journal: max_nodes is invalid\n");
@@ -599,7 +599,7 @@ journal_t* journal_open(const char *fn, size_t fslimit, int mode, uint16_t bflag
 		free(j);
 		return NULL;
 	}
-	
+
 	/* Check head + tail */
 	if (j->qtail > max_nodes || j->qhead > max_nodes) {
 		dbg_journal_detail("journal: queue pointers corrupted\n");
@@ -626,7 +626,7 @@ journal_t* journal_open(const char *fn, size_t fslimit, int mode, uint16_t bflag
 		free(j);
 		return NULL;
 	}
-	
+
 	/* Get journal file size. */
 	struct stat st;
 	if (stat(fn, &st) < 0) {
@@ -644,14 +644,14 @@ journal_t* journal_open(const char *fn, size_t fslimit, int mode, uint16_t bflag
 	} else {
 		j->fslimit = (size_t)fslimit;
 	}
-	
+
 	dbg_journal("journal: opened journal size=%u, queue=<%u, %u>, fd=%d\n",
-	            max_nodes, j->qhead, j->qtail, j->fd);	
-	
+	            max_nodes, j->qhead, j->qtail, j->fd);
+
 	/* Check node queue. */
 	unsigned qtail_free = (jnode_flags(j, j->qtail) <= JOURNAL_FREE);
 	unsigned qhead_free = j->max_nodes - 1; /* Left of qhead must be free.*/
-	if (j->qhead > 0) { 
+	if (j->qhead > 0) {
 		qhead_free = (j->qhead - 1);
 	}
 	qhead_free = (jnode_flags(j, qhead_free) <= JOURNAL_FREE);
@@ -684,7 +684,7 @@ int journal_fetch(journal_t *journal, uint64_t id,
 	if (journal == NULL || dst == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Check compare function. */
 	if (!cf) {
 		cf = journal_cmp_eq;
@@ -710,7 +710,7 @@ int journal_read(journal_t *journal, uint64_t id, journal_cmp_t cf, char *dst)
 	if (journal == NULL || dst == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	journal_node_t *n = 0;
 	if(journal_fetch(journal, id, cf, &n) != 0) {
 		dbg_journal("journal: failed to fetch node with id=%llu\n",
@@ -732,7 +732,7 @@ int journal_read_node(journal_t *journal, journal_node_t *n, char *dst)
 		            "(flags=0x%hx)\n", (unsigned long long)n->id, n->flags);
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Seek journal node. */
 	int seek_ret = lseek(journal->fd, n->pos, SEEK_SET);
 
@@ -740,7 +740,7 @@ int journal_read_node(journal_t *journal, journal_node_t *n, char *dst)
 	if (seek_ret < 0 || !sfread(dst, n->len, journal->fd)) {
 		return KNOT_ERROR;
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -749,7 +749,7 @@ int journal_write(journal_t *journal, uint64_t id, const char *src, size_t size)
 	if (journal == NULL || src == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Prepare journal write. */
 	journal_node_t *n = NULL;
 	int ret = journal_write_in(journal, &n, id, size);
@@ -762,7 +762,7 @@ int journal_write(journal_t *journal, uint64_t id, const char *src, size_t size)
 	if (seek_ret < 0 || !sfwrite(src, size, journal->fd)) {
 		return KNOT_ERROR;
 	}
-	
+
 	/* Finalize journal write. */
 	return journal_write_out(journal, n);
 }
@@ -772,7 +772,7 @@ int journal_map(journal_t *journal, uint64_t id, char **dst, size_t size)
 	if (journal == NULL || dst == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Prepare journal write. */
 	journal_node_t *n = NULL;
 	int ret = journal_write_in(journal, &n, id, size);
@@ -796,12 +796,12 @@ int journal_map(journal_t *journal, uint64_t id, char **dst, size_t size)
 		}
 		size -= wb;
 	}
-	
+
 	/* Align offset to page size (required). */
 	const size_t ps = sysconf(_SC_PAGESIZE);
 	off_t ps_delta = (n->pos % ps);
 	off_t off = n->pos - ps_delta;
-	
+
 	/* Map file region. */
 	*dst = mmap(NULL, n->len + ps_delta, PROT_READ | PROT_WRITE, MAP_SHARED,
 	            journal->fd, off);
@@ -810,14 +810,14 @@ int journal_map(journal_t *journal, uint64_t id, char **dst, size_t size)
 		            journal->fd, n->pos, n->pos+n->len, errno);
 		return KNOT_ERROR;
 	}
-	
+
 	/* Advise usage of memory. */
 #ifdef HAVE_MADVISE
 	madvise(*dst, n->len + ps_delta, MADV_SEQUENTIAL);
 #endif
 	/* Correct dst pointer to alignment. */
 	*dst += ps_delta;
-	
+
 	return KNOT_EOK;
 }
 
@@ -826,7 +826,7 @@ int journal_unmap(journal_t *journal, uint64_t id, void *ptr, int finalize)
 	if (journal == NULL || ptr == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Mapped node is on tail. */
 	journal_node_t *n = journal->nodes + journal->qtail;
 	if(n->id != id) {
@@ -834,19 +834,19 @@ int journal_unmap(journal_t *journal, uint64_t id, void *ptr, int finalize)
 		            (unsigned long long)id);
 		return KNOT_ENOENT;
 	}
-	
+
 	/* Realign memory. */
 	const size_t ps = sysconf(_SC_PAGESIZE);
 	off_t ps_delta = (n->pos % ps);
 	ptr = ((char*)ptr - ps_delta);
-	
+
 	/* Unmap memory. */
 	if (munmap(ptr, n->len + ps_delta) != 0) {
 		dbg_journal("journal: couldn't munmap() fd=%d <%u,%u> %d\n",
 		            journal->fd, n->pos, n->pos+n->len, errno);
 		return KNOT_ERROR;
 	}
-	
+
 	/* Finalize. */
 	int ret = KNOT_EOK;
 	if (finalize) {
@@ -902,17 +902,17 @@ int journal_trans_begin(journal_t *journal)
 	if (journal == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Already pending transactions. */
 	if (journal->bflags & JOURNAL_TRANS) {
 		return KNOT_EBUSY;
 	}
-	
+
 	journal->bflags |= JOURNAL_TRANS;
 	journal->tmark = journal->qtail;
 	dbg_journal("journal: starting transaction at qtail=%hu\n",
 	            journal->tmark);
-	
+
 	return KNOT_EOK;
 }
 
@@ -924,7 +924,7 @@ int journal_trans_commit(journal_t *journal)
 	if ((journal->bflags & JOURNAL_TRANS) == 0) {
 		return KNOT_ENOENT;
 	}
-	
+
 	/* Mark affected nodes as commited. */
 	int ret = KNOT_EOK;
 	size_t i = journal->tmark;
@@ -937,7 +937,7 @@ int journal_trans_commit(journal_t *journal)
 			return ret;
 		}
 	}
-	
+
 	/* Clear in-transaction flags. */
 	journal->tmark = 0;
 	journal->bflags &= (~JOURNAL_TRANS);
@@ -952,7 +952,7 @@ int journal_trans_rollback(journal_t *journal)
 	if ((journal->bflags & JOURNAL_TRANS) == 0) {
 		return KNOT_ENOENT;
 	}
-	
+
 	/* Expand free space and rewind node queue tail. */
 	/*! \note This shouldn't be relied upon and probably shouldn't
 	 *        be written back to file, as crashing anywhere between
@@ -979,7 +979,7 @@ int journal_close(journal_t *journal)
 	if (journal == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Check if lazy. */
 	int ret = KNOT_EOK;
 	if (journal->fd < 0) {
@@ -987,7 +987,7 @@ int journal_close(journal_t *journal)
 	} else {
 		/* Recalculate CRC. */
 		ret = journal_update_crc(journal->fd);
-		
+
 		/* Unlock journal file. */
 		journal->fl.l_type = F_UNLCK;
 		fcntl(journal->fd, F_SETLK, &journal->fl);
@@ -996,7 +996,7 @@ int journal_close(journal_t *journal)
 		/* Close file. */
 		close(journal->fd);
 	}
-	
+
 	dbg_journal("journal: closed journal %p\n", journal);
 
 	/* Free allocated resources. */
@@ -1011,14 +1011,14 @@ journal_t *journal_retain(journal_t *journal)
 	if (journal != NULL) {
 		if (journal->fd < 0) {
 			dbg_journal("journal: retain(), opening for rw\n");
-			journal = journal_open(journal->path, journal->fslimit, 
+			journal = journal_open(journal->path, journal->fslimit,
 			                       0, journal->bflags);
 		} else {
 			++journal->refs;
 			dbg_journal("journal: retain(), ++refcount\n");
 		}
 	}
-	
+
 	return journal;
 }
 
diff --git a/src/knot/server/journal.h b/src/knot/server/journal.h
index cd7377b54fb5e75673a391ad07c9a1e23a2ecb3c..57535045329289fd12cfdee52596f7ddb5b3f973 100644
--- a/src/knot/server/journal.h
+++ b/src/knot/server/journal.h
@@ -130,7 +130,7 @@ typedef int (*journal_apply_t)(journal_t *j, journal_node_t *n);
  */
 #define JOURNAL_NCOUNT 1024 /*!< Default node count. */
 /* HEADER = magic, crc, max_entries, qhead, qtail */
-#define JOURNAL_HSIZE (MAGIC_LENGTH + sizeof(crc_t) + sizeof(uint16_t) * 3) 
+#define JOURNAL_HSIZE (MAGIC_LENGTH + sizeof(crc_t) + sizeof(uint16_t) * 3)
 #define JOURNAL_MAGIC {'k', 'n', 'o', 't', '1', '0', '5'}
 
 /*!
@@ -295,7 +295,7 @@ int journal_update(journal_t *journal, journal_node_t *n);
 
 /*!
  * \brief Begin transaction of multiple entries.
- * 
+ *
  * \note Only one transaction at a time is supported.
  *
  * \param journal Associated journal.
@@ -308,7 +308,7 @@ int journal_trans_begin(journal_t *journal);
 
 /*!
  * \brief Commit pending transaction.
- * 
+ *
  * \note Only one transaction at a time is supported.
  *
  * \param journal Associated journal.
@@ -321,7 +321,7 @@ int journal_trans_commit(journal_t *journal);
 
 /*!
  * \brief Rollback pending transaction.
- * 
+ *
  * \note Only one transaction at a time is supported.
  *
  * \param journal Associated journal.
@@ -346,7 +346,7 @@ int journal_close(journal_t *journal);
  * \brief Retain journal for use.
  *
  * Allows to track usage of lazily-opened journals.
- * 
+ *
  * \param journal Journal.
  *
  * \return Retained journal.
diff --git a/src/knot/server/notify.c b/src/knot/server/notify.c
index f0d2191df78f70085db067dd58481f6b3961c6b6..7d58fd164587975b864d0fc0d922757eda646569 100644
--- a/src/knot/server/notify.c
+++ b/src/knot/server/notify.c
@@ -131,7 +131,7 @@ int notify_create_response(knot_packet_t *request, uint8_t *buffer,
 	if (rc == KNOT_EOK) {
 		rc = knot_response_init_from_query(response, request, 1);
 	}
-	
+
 	/* Aggregated result check. */
 	if (rc != KNOT_EOK) {
 		dbg_notify("%s: failed to init response packet: %s",
@@ -188,7 +188,7 @@ static int notify_check_and_schedule(knot_nameserver_t *nameserver,
 	if (zone == NULL || from == NULL || knot_zone_data(zone) == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Check ACL for notify-in. */
 	zonedata_t *zd = (zonedata_t *)knot_zone_data(zone);
 	if (from) {
@@ -208,7 +208,7 @@ static int notify_check_and_schedule(knot_nameserver_t *nameserver,
 		/* Set REFRESH timer for now. */
 		evsched_schedule(sched, refresh_ev, 0);
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -283,7 +283,7 @@ int notify_process_request(knot_nameserver_t *ns,
 	case KNOT_EACCES:  rcode = KNOT_RCODE_REFUSED; break;
 	default: break;
 	}
-	
+
 	/* Format resulting log message. */
 	char *qstr = knot_dname_to_str(qname);
 	char *fromstr = xfr_remote_str(from, NULL);
@@ -297,7 +297,7 @@ int notify_process_request(knot_nameserver_t *ns,
 	}
 	free(qstr);
 	free(fromstr);
-	
+
 	rcu_read_unlock();
 	return ret;
 }
@@ -318,4 +318,3 @@ int notify_process_response(knot_packet_t *notify, int msgid)
 
 	return KNOT_EOK;
 }
-
diff --git a/src/knot/server/rrl.c b/src/knot/server/rrl.c
index 1911ea753260d3ec6908f723bd83d921982f3cf8..d37691eaf2632c304c7419c7b4dc4110ebc7808b 100644
--- a/src/knot/server/rrl.c
+++ b/src/knot/server/rrl.c
@@ -96,7 +96,7 @@ static uint8_t rrl_clsid(rrl_req_t *p)
 	if (ret == CLS_NORMAL && p->flags & KNOT_PF_WILDCARD) {
 		return CLS_WILDCARD;
 	}
-	
+
 	/* Check query type for spec. classes. */
 	if (p->qst) {
 		switch(p->qst->qtype) {
@@ -145,13 +145,13 @@ static int rrl_clsname(char *dst, size_t maxlen, uint8_t cls,
 		if (p->qst) dn = p->qst->qname;
 		break;
 	}
-	
+
 	if (dn) { /* Check used dname. */
 		assert(dn); /* Should be always set. */
 		n = knot_dname_name(dn);
 		nb = (int)knot_dname_size(dn);
 	}
-	
+
 	/* Write to wire */
 	if (nb > maxlen) return KNOT_ESPACE;
 	if (memcpy(dst, n, nb) == NULL) {
@@ -159,7 +159,7 @@ static int rrl_clsname(char *dst, size_t maxlen, uint8_t cls,
 		        __func__, n, nb);
 		return KNOT_ERROR;
 	}
-	
+
 	return nb;
 }
 
@@ -169,12 +169,12 @@ static int rrl_classify(char *dst, size_t maxlen, const sockaddr_t *a,
 	if (!dst || !p || !a || maxlen == 0) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Class */
 	uint8_t cls = rrl_clsid(p);
 	*dst = cls;
 	int blklen = sizeof(cls);
-	
+
 	/* Address (in network byteorder, adjust masks). */
 	uint64_t nb = 0;
 	if (sockaddr_family(a) == AF_INET6) { /* Take the /56 prefix. */
@@ -193,13 +193,13 @@ static int rrl_classify(char *dst, size_t maxlen, const sockaddr_t *a,
 	if (len < 0) return len;
 	*nlen = len;
 	blklen += len;
-	
+
 	/* Seed. */
 	if (blklen + sizeof(seed) > maxlen) return KNOT_ESPACE;
 	if (memcpy(dst + blklen, (void*)&seed, sizeof(seed)) == 0) {
 		blklen += sizeof(seed);
 	}
-	
+
 	return blklen;
 }
 
@@ -229,7 +229,7 @@ static int find_free(rrl_table_t *t, unsigned i, uint32_t now)
 			return (b - t->arr) + (t->size - i);
 		}
 	}
-	
+
 	/* this happens if table is full... force vacate current elm */
 	dbg_rrl("%s: out of free buckets, freeing bucket %u\n", __func__, i);
 	return i;
@@ -272,7 +272,7 @@ static inline unsigned reduce_dist(rrl_table_t *t, unsigned id, unsigned d, unsi
 		}
 		--rd;
 	}
-	
+
 	assert(rd == 0); /* this happens with p=1/fact(HOP_LEN) */
 	*f = id;
 	d = 0; /* force vacate initial element */
@@ -290,7 +290,7 @@ static void rrl_log_state(const sockaddr_t *a, uint16_t flags, uint8_t cls)
 	if (flags & RRL_BF_ELIMIT) {
 		what = "enters";
 	}
-	
+
 	log_server_notice("Address '%s' %s rate-limiting (class '%s').\n",
 	                  saddr, what, rrl_clsstr(cls));
 #endif
@@ -301,7 +301,7 @@ rrl_table_t *rrl_create(size_t size)
 	if (size == 0) {
 		return NULL;
 	}
-	
+
 	const size_t tbl_len = sizeof(rrl_table_t) + size * sizeof(rrl_item_t);
 	rrl_table_t *t = malloc(tbl_len);
 	if (!t) return NULL;
@@ -331,16 +331,16 @@ int rrl_setlocks(rrl_table_t *rrl, unsigned granularity)
 	if (!rrl) return KNOT_EINVAL;
 	assert(!rrl->lk); /* Cannot change while locks are used. */
 	assert(granularity <= rrl->size / 10); /* Due to int. division err. */
-	
+
 	if (pthread_mutex_init(&rrl->ll, NULL) < 0) {
 		return KNOT_ENOMEM;
 	}
-	
+
 	/* Alloc new locks. */
 	rrl->lk = malloc(granularity * sizeof(pthread_mutex_t));
 	if (!rrl->lk) return KNOT_ENOMEM;
 	memset(rrl->lk, 0, granularity * sizeof(pthread_mutex_t));
-	
+
 	/* Initialize. */
 	for (size_t i = 0; i < granularity; ++i) {
 		if (pthread_mutex_init(rrl->lk + i, NULL) < 0) break;
@@ -357,7 +357,7 @@ int rrl_setlocks(rrl_table_t *rrl, unsigned granularity)
 		dbg_rrl("%s: failed to init locks\n", __func__);
 		return KNOT_ERROR;
 	}
-	
+
 	dbg_rrl("%s: set granularity to '%u'\n", __func__, granularity);
 	return KNOT_EOK;
 }
@@ -370,9 +370,9 @@ rrl_item_t* rrl_hash(rrl_table_t *t, const sockaddr_t *a, rrl_req_t *p,
 	if (len < 0) {
 		return NULL;
 	}
-	
+
 	uint32_t id = hash(buf, len) % t->size;
-	
+
 	/* Lock for lookup. */
 	pthread_mutex_lock(&t->ll);
 
@@ -388,13 +388,13 @@ rrl_item_t* rrl_hash(rrl_table_t *t, const sockaddr_t *a, rrl_req_t *p,
 	if (d > HOP_LEN) { /* not an exact match, find free element [f] */
 		d = find_free(t, id, stamp);
 	}
-	
+
 	/* Reduce distance to fit <id, id + HOP_LEN) */
 	unsigned f = (id + d) % t->size;
 	while (d >= HOP_LEN) {
 		d = reduce_dist(t, id, d, &f);
 	}
-	
+
 	/* Assign granular lock and unlock lookup. */
 	*lock = f % t->lk_count;
 	rrl_lock(t, *lock);
@@ -423,7 +423,7 @@ rrl_item_t* rrl_hash(rrl_table_t *t, const sockaddr_t *a, rrl_req_t *p,
 			dbg_rrl("%s: bucket '%4x' slow-start\n", __func__, id);
 		}
 	}
-	
+
 	return b;
 }
 
@@ -431,7 +431,7 @@ int rrl_query(rrl_table_t *rrl, const sockaddr_t *a, rrl_req_t *req,
               const knot_zone_t *zone)
 {
 	if (!rrl || !req || !a) return KNOT_EINVAL;
-	
+
 	/* Calculate hash and fetch */
 	int ret = KNOT_EOK;
 	int lock = -1;
@@ -442,7 +442,7 @@ int rrl_query(rrl_table_t *rrl, const sockaddr_t *a, rrl_req_t *req,
 		if (lock > -1) rrl_unlock(rrl, lock);
 		return KNOT_ERROR;
 	}
-	
+
 	/* Calculate rate for dT */
 	uint32_t dt = now - b->time;
 	if (dt > RRL_CAPACITY) {
@@ -459,7 +459,7 @@ int rrl_query(rrl_table_t *rrl, const sockaddr_t *a, rrl_req_t *req,
 			b->flags &= ~RRL_BF_ELIMIT;
 			rrl_log_state(a, b->flags, b->cls);
 		}
-	
+
 		/* Add new tokens. */
 		uint32_t dn = rrl->rate * dt;
 		if (b->flags & RRL_BF_SSTART) { /* Bucket in slow-start. */
@@ -472,7 +472,7 @@ int rrl_query(rrl_table_t *rrl, const sockaddr_t *a, rrl_req_t *req,
 			b->ntok = RRL_CAPACITY * rrl->rate;
 		}
 	}
-	
+
 	/* Last item taken. */
 	if (b->ntok == 1 && !(b->flags & RRL_BF_ELIMIT)) {
 		b->flags |= RRL_BF_ELIMIT;
@@ -485,7 +485,7 @@ int rrl_query(rrl_table_t *rrl, const sockaddr_t *a, rrl_req_t *req,
 	} else if (b->ntok == 0) {
 		ret = KNOT_ELIMIT;
 	}
-	
+
 	if (lock > -1) rrl_unlock(rrl, lock);
 	return ret;
 }
@@ -500,7 +500,7 @@ int rrl_destroy(rrl_table_t *rrl)
 		}
 		free(rrl->lk);
 	}
-	
+
 	free(rrl);
 	return KNOT_EOK;
 }
@@ -514,18 +514,18 @@ int rrl_reseed(rrl_table_t *rrl)
 			rrl_lock(rrl, i);
 		}
 	}
-	
+
 	memset(rrl->arr, 0, rrl->size * sizeof(rrl_item_t));
 	rrl->seed = (uint32_t)(tls_rand() * (double)UINT32_MAX);
 	dbg_rrl("%s: reseed to '%u'\n", __func__, rrl->seed);
-	
+
 	if (rrl->lk_count > 0) {
 		for (unsigned i = 0; i < rrl->lk_count; ++i) {
 			rrl_unlock(rrl, i);
 		}
 		pthread_mutex_unlock(&rrl->ll);
 	}
-	
+
 	return KNOT_EOK;
 }
 
diff --git a/src/knot/server/rrl.h b/src/knot/server/rrl.h
index 6ced2f89c2d564c5d7e4f14d374826af8718b3b6..59ac9a6bfd622246763916f107a118e92750f24f 100644
--- a/src/knot/server/rrl.h
+++ b/src/knot/server/rrl.h
@@ -51,7 +51,7 @@ typedef struct rrl_item {
 
 /*!
  * \brief RRL hash bucket table.
- * 
+ *
  * Table is fixed size, so collisions may occur and are dealt with
  * in a way, that hashbucket rate is reset and enters slow-start for 1 dt.
  * When a bucket is in a slow-start mode, it cannot reset again for the time
@@ -60,7 +60,7 @@ typedef struct rrl_item {
  * To avoid lock contention, N locks are created and distributed amongst buckets.
  * As of now lock K for bucket N is calculated as K = N % (num_buckets).
  */
- 
+
 typedef struct rrl_table {
 	uint32_t rate;       /* Configured RRL limit */
 	uint32_t seed;       /* Pseudorandom seed for hashing. */
@@ -145,7 +145,7 @@ int rrl_query(rrl_table_t *rrl, const sockaddr_t *a, rrl_req_t *req,
 /*!
  * \brief Destroy RRL table.
  * \param rrl RRL table.
- * \return KNOT_EOK 
+ * \return KNOT_EOK
  */
 int rrl_destroy(rrl_table_t *rrl);
 
diff --git a/src/knot/server/server.c b/src/knot/server/server.c
index 6920356be4f5b6b91f042cf19d4d083c09a3b23a..5ecb0472ce1747684204435dcf9931acf4f71605 100644
--- a/src/knot/server/server.c
+++ b/src/knot/server/server.c
@@ -126,7 +126,7 @@ static int server_init_iface(iface_t *new_if, conf_iface_t *cfg_if)
 	} else {
 		sock = ret;
 	}
-	
+
 	/* Set socket options. */
 	int flag = 1;
 #ifndef DISABLE_IPV6
@@ -163,7 +163,7 @@ static int server_init_iface(iface_t *new_if, conf_iface_t *cfg_if)
 	} else {
 		sock = ret;
 	}
-	
+
 	/* Set socket options. */
 #ifndef DISABLE_IPV6
 	if (cfg_if->family == AF_INET6) {
@@ -202,7 +202,7 @@ static int server_init_iface(iface_t *new_if, conf_iface_t *cfg_if)
 static void remove_ifacelist(struct ref_t *p)
 {
 	ifacelist_t *ifaces = (ifacelist_t *)p;
-		
+
 	/* Remove deprecated interfaces. */
 	iface_t *n = NULL, *m = NULL;
 	WALK_LIST_DELSAFE(n, m, ifaces->u) {
@@ -213,7 +213,7 @@ static void remove_ifacelist(struct ref_t *p)
 	WALK_LIST_DELSAFE(n, m, ifaces->l) {
 		free(n);
 	}
-	
+
 	free(ifaces);
 }
 
@@ -240,7 +240,7 @@ static int server_bind_sockets(server_t *s)
 	ref_retain(&newlist->ref);
 	init_list(&newlist->u);
 	init_list(&newlist->l);
-	
+
 
 	/* Duplicate current list. */
 	/*! \note Pointers to addr, handlers etc. will be shared. */
@@ -289,13 +289,13 @@ static int server_bind_sockets(server_t *s)
 
 	/* Publish new list. */
 	ifacelist_t *oldlist = rcu_xchg_pointer(&s->ifaces, newlist);
-	
+
 	/* Unlock configuration. */
 	rcu_read_unlock();
 
 	/* Ensure no one is reading old interfaces. */
 	synchronize_rcu();
-	
+
 	/* Notify handlers about removed ifaces. */
 	dt_unit_t *tu = s->h[IO_UDP].unit;
 	for (unsigned j = 0; j < tu->size; ++j) {
@@ -305,7 +305,7 @@ static int server_bind_sockets(server_t *s)
 			dt_activate(tu->threads[j]);
 			dt_signalize(tu->threads[j], SIGALRM);
 		}
-		
+
 	}
 	s->h[IO_TCP].state[0].s |= ServerReload;
 	if (s->state & ServerRunning) {
@@ -408,10 +408,10 @@ int server_start(server_t *s)
 
 	/* Start XFR handler. */
 	xfr_start(s->xfr);
-	
+
 	/* Start evsched handler. */
 	dt_start(s->iosched);
-	
+
 	/* Start I/O handlers. */
 	int ret = KNOT_EOK;
 	s->state |= ServerRunning;
@@ -420,7 +420,7 @@ int server_start(server_t *s)
 			ret = dt_start(s->h[i].unit);
 		}
 	}
-	
+
 
 	dbg_server("server: server started\n");
 
@@ -430,7 +430,7 @@ int server_start(server_t *s)
 int server_wait(server_t *s)
 {
 	if (!s) return KNOT_EINVAL;
-	
+
 	xfr_join(s->xfr);
 	dt_join(s->iosched);
 	if (s->tu_size == 0) {
@@ -452,7 +452,7 @@ int server_refresh(server_t *server)
 	if (server == NULL || server->nameserver == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Lock RCU and fetch zones. */
 	rcu_read_lock();
 	knot_nameserver_t *ns =  server->nameserver;
@@ -462,7 +462,7 @@ int server_refresh(server_t *server)
 		rcu_read_unlock();
 		return KNOT_ENOMEM;
 	}
-	
+
 	/* REFRESH zones. */
 	for (unsigned i = 0; i < knot_zonedb_zone_count(ns->zone_db); ++i) {
 		zonedata_t *zd = (zonedata_t *)zones[i]->data;
@@ -477,7 +477,7 @@ int server_refresh(server_t *server)
 			/* Cumulative delay. */
 		}
 	}
-	
+
 	/* Unlock RCU. */
 	rcu_read_unlock();
 	free(zones);
@@ -489,7 +489,7 @@ int server_reload(server_t *server, const char *cf)
 	if (!server || !cf) {
 		return KNOT_EINVAL;
 	}
-	
+
 	log_server_info("Reloading configuration...\n");
 	int cf_ret = conf_open(cf);
 	switch (cf_ret) {
@@ -508,7 +508,7 @@ int server_reload(server_t *server, const char *cf)
 				 "reload failed.\n");
 		break;
 	}
-	
+
 	/*! \todo Close and bind to new remote control. */
 	return cf_ret;
 }
@@ -516,7 +516,7 @@ int server_reload(server_t *server, const char *cf)
 void server_stop(server_t *server)
 {
 	dbg_server("server: stopping server\n");
-	
+
 	/* Send termination event. */
 	evsched_schedule_term(server->sched, 0);
 
@@ -538,9 +538,9 @@ void server_destroy(server_t **server)
 	if (!server || !*server) {
 		return;
 	}
-	
+
 	dbg_server("server: destroying server instance\n");
-	
+
 	/* Free remaining interfaces. */
 	ifacelist_t *ifaces = (*server)->ifaces;
 	iface_t *n = NULL, *m = NULL;
@@ -551,7 +551,7 @@ void server_destroy(server_t **server)
 		free(ifaces);
 		(*server)->ifaces = NULL;
 	}
-	
+
 	xfr_free((*server)->xfr);
 	stat_static_gath_free();
 	knot_ns_destroy(&(*server)->nameserver);
@@ -570,7 +570,7 @@ int server_conf_hook(const struct conf_t *conf, void *data)
 	if (!server) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Estimate number of threads/manager. */
 	int ret = KNOT_EOK;
 	int tu_size = conf->workers;
@@ -584,7 +584,7 @@ int server_conf_hook(const struct conf_t *conf, void *data)
 				ret = server_free_handler(server->h + i);
 			}
 		}
-		
+
 		/* Initialize I/O handlers. */
 		size_t udp_size = tu_size;
 		if (udp_size < 2) udp_size = 2;
@@ -601,7 +601,7 @@ int server_conf_hook(const struct conf_t *conf, void *data)
 		}
 		server->tu_size = tu_size;
 	}
-	
+
 	/* Rate limiting. */
 	if (!server->rrl && conf->rrl > 0) {
 		server->rrl = rrl_create(conf->rrl_size);
@@ -618,7 +618,7 @@ int server_conf_hook(const struct conf_t *conf, void *data)
 			                conf->rrl);
 		} /* At this point, old buckets will converge to new rate. */
 	}
-	
+
 	/* Update bound sockets. */
 	if ((ret = server_bind_sockets(server)) < 0) {
 		log_server_error("Failed to bind configured "
@@ -632,7 +632,7 @@ ref_t *server_set_ifaces(server_t *s, fdset_t **fds, int *count, int type)
 {
 	iface_t *i = NULL;
 	*count = 0;
-	
+
 	rcu_read_lock();
 	fdset_destroy(*fds);
 	*fds = fdset_new();
@@ -641,9 +641,8 @@ ref_t *server_set_ifaces(server_t *s, fdset_t **fds, int *count, int type)
 			fdset_add(*fds, i->fd[type], OS_EV_READ);
 			*count += 1;
 		}
-		
+
 	}
 	rcu_read_unlock();
 	return (ref_t *)s->ifaces;
 }
-
diff --git a/src/knot/server/server.h b/src/knot/server/server.h
index 327bdc5bd78271750b5bf9cf346663ccc7d7e52e..cb5ab1a5777ae4ef4058b50086032f85e1985790 100644
--- a/src/knot/server/server.h
+++ b/src/knot/server/server.h
@@ -128,7 +128,7 @@ typedef struct server_t {
 
 	/*! \brief List of interfaces. */
 	ifacelist_t* ifaces;
-	
+
 	/*! \brief Rate limiting. */
 	rrl_table_t *rrl;
 
@@ -203,7 +203,7 @@ int server_refresh(server_t *server);
  *
  * \param server Server instance.
  * \param cf Config file path.
- * \return 
+ * \return
  */
 int server_reload(server_t *server, const char *cf);
 
diff --git a/src/knot/server/tcp-handler.c b/src/knot/server/tcp-handler.c
index a703b5e78764f5026e40dd26740cccd4dacbd4e1..f32a5a9a2b47977a06d27b3ca22218ce265ed9f5 100644
--- a/src/knot/server/tcp-handler.c
+++ b/src/knot/server/tcp-handler.c
@@ -45,7 +45,7 @@
 /*! \brief TCP worker data. */
 typedef struct tcp_worker_t {
 	iohandler_t *ioh; /*!< Shortcut to I/O handler. */
-	fdset_t *fdset;   /*!< File descriptor set. */ 
+	fdset_t *fdset;   /*!< File descriptor set. */
 	int pipe[2];      /*!< Master-worker signalization pipes. */
 } tcp_worker_t;
 
@@ -58,7 +58,7 @@ typedef struct tcp_worker_t {
 /*! \brief Calculate TCP throttle time (random). */
 static inline int tcp_throttle() {
 	//(TCP_THROTTLE_LO + (int)(tls_rand() * TCP_THROTTLE_HI));
-	return (rand() % TCP_THROTTLE_HI) + TCP_THROTTLE_LO; 
+	return (rand() % TCP_THROTTLE_HI) + TCP_THROTTLE_LO;
 }
 
 /*! \brief Send reply. */
@@ -78,7 +78,7 @@ static int tcp_reply(int fd, uint8_t *qbuf, size_t resp_len)
 			  "socket_send()",
 			  res, errno);
 	}
-	
+
 	return res;
 }
 
@@ -86,7 +86,7 @@ static int tcp_reply(int fd, uint8_t *qbuf, size_t resp_len)
 static void tcp_sweep(fdset_t *set, int fd, void* data)
 {
 	UNUSED(data);
-	
+
 	char r_addr[SOCKADDR_STRLEN] = { '\0' };
 	int r_port = 0;
 	struct sockaddr_storage addr;
@@ -108,7 +108,7 @@ static void tcp_sweep(fdset_t *set, int fd, void* data)
 	    inet_ntop(AF_INET6, &s->sin6_addr, r_addr, sizeof(r_addr));
 #endif
 	}
-	
+
 	log_server_notice("Connection with '%s@%d' was terminated due to "
 	                  "inactivity.\n", r_addr, r_port);
 	fdset_remove(set, fd);
@@ -136,7 +136,7 @@ static int tcp_handle(tcp_worker_t *w, int fd, uint8_t *qbuf, size_t qbuf_maxlen
 		dbg_net("tcp: tcp_handle(%p, %d) - invalid parameters\n", w, fd);
 		return KNOT_EINVAL;
 	}
-	
+
 	dbg_net("tcp: handling TCP event on fd=%d in thread %p.\n",
 	        fd, (void*)pthread_self());
 
@@ -215,7 +215,7 @@ static int tcp_handle(tcp_worker_t *w, int fd, uint8_t *qbuf, size_t qbuf_maxlen
 		} else {
 			xfrt = XFR_TYPE_AOUT;
 		}
-		
+
 		/* Answer from query. */
 		xfr = xfr_task_create(NULL, xfrt, XFR_FLAG_TCP);
 		if (xfr == NULL) {
@@ -233,7 +233,7 @@ static int tcp_handle(tcp_worker_t *w, int fd, uint8_t *qbuf, size_t qbuf_maxlen
 		res = xfr_answer(ns, xfr);
 		knot_packet_free(&packet);
 		return res;
-		
+
 	case KNOT_QUERY_UPDATE:
 //		knot_ns_error_response_from_query(ns, packet,
 //		                                  KNOT_RCODE_NOTIMPL,
@@ -242,12 +242,12 @@ static int tcp_handle(tcp_worker_t *w, int fd, uint8_t *qbuf, size_t qbuf_maxlen
 		                           fd, NS_TRANSPORT_TCP);
 //		res = KNOT_EOK;
 		break;
-		
+
 	case KNOT_QUERY_NOTIFY:
 		res = notify_process_request(ns, packet, &addr,
 					     qbuf, &resp_len);
 		break;
-		
+
 	/* Unhandled opcodes. */
 	case KNOT_RESPONSE_NOTIFY: /*!< Only in UDP. */
 	case KNOT_RESPONSE_NORMAL: /*!< TCP handler doesn't send queries. */
@@ -258,7 +258,7 @@ static int tcp_handle(tcp_worker_t *w, int fd, uint8_t *qbuf, size_t qbuf_maxlen
 		                                  qbuf, &resp_len);
 		res = KNOT_EOK;
 		break;
-		
+
 	/* Unknown opcodes. */
 	default:
 		knot_ns_error_response_from_query(ns, packet,
@@ -302,7 +302,7 @@ int tcp_accept(int fd)
 				                 throttle);
 				sleep(throttle);
 			}
-			
+
 		}
 	} else {
 		dbg_net("tcp: accepted connection fd=%d\n", incoming);
@@ -331,14 +331,14 @@ tcp_worker_t* tcp_worker_create()
 		dbg_net("tcp: out of memory when creating worker\n");
 		return NULL;
 	}
-	
+
 	/* Create signal pipes. */
 	memset(w, 0, sizeof(tcp_worker_t));
 	if (pipe(w->pipe) < 0) {
 		free(w);
 		return NULL;
 	}
-	
+
 	/* Create fdset. */
 	w->fdset = fdset_new();
 	if (!w->fdset) {
@@ -347,9 +347,9 @@ tcp_worker_t* tcp_worker_create()
 		free(w);
 		return NULL;
 	}
-	
+
 	fdset_add(w->fdset, w->pipe[0], OS_EV_READ);
-	
+
 	return w;
 }
 
@@ -358,10 +358,10 @@ void tcp_worker_free(tcp_worker_t* w)
 	if (!w) {
 		return;
 	}
-	
+
 	/* Destroy fdset. */
 	fdset_destroy(w->fdset);
-	
+
 	/* Close pipe write end and worker. */
 	close(w->pipe[0]);
 	close(w->pipe[1]);
@@ -435,7 +435,7 @@ int tcp_recv(int fd, uint8_t *buf, size_t len, sockaddr_t *addr)
 	if (len < pktsize) {
 		return KNOT_ENOMEM;
 	}
-	
+
 	/* Get peer name. */
 	if (addr) {
 		if (getpeername(fd, (struct sockaddr *)addr, &addr->len) < 0) {
@@ -463,12 +463,12 @@ int tcp_loop_master(dthread_t *thread)
 	if (!thread || !thread->data) {
 		return KNOT_EINVAL;
 	}
-	
+
 	iostate_t *st = (iostate_t *)thread->data;
 	iohandler_t *h = st->h;
 	dt_unit_t *unit = thread->unit;
 	tcp_worker_t **workers = h->data;
-	
+
 	/* Prepare structures for bound sockets. */
 	fdset_it_t it;
 	fdset_t *fds = NULL;
@@ -480,7 +480,7 @@ int tcp_loop_master(dthread_t *thread)
 	dbg_net("tcp: created 1 master with %d workers, backend is '%s' \n",
 	        unit->size - 1, fdset_method());
 	for(;;) {
-		
+
 		/* Check handler state. */
 		if (knot_unlikely(st->s & ServerReload)) {
 			st->s &= ~ServerReload;
@@ -488,19 +488,19 @@ int tcp_loop_master(dthread_t *thread)
 			ref = server_set_ifaces(h->server, &fds, &if_cnt, IO_TCP);
 			if (if_cnt == 0) break;
 		}
-		
+
 		/* Check for cancellation. */
 		if (dt_is_cancelled(thread)) {
 			break;
 		}
-		
+
 		/* Wait for events. */
 		int nfds = fdset_wait(fds, OS_EV_FOREVER);
 		if (nfds <= 0) {
 			if (errno == EINTR) continue;
 			break;
 		}
-		
+
 		fdset_begin(fds, &it);
 		while(nfds > 0) {
 			/* Accept client. */
@@ -515,7 +515,7 @@ int tcp_loop_master(dthread_t *thread)
 				}
 				id = get_next_rr(id, unit->size - 1);
 			}
-			
+
 			if (fdset_next(fds, &it) != 0) {
 				break;
 			}
@@ -526,7 +526,7 @@ int tcp_loop_master(dthread_t *thread)
 	free(workers);
 	fdset_destroy(fds);
 	ref_release(ref);
-	
+
 	return KNOT_EOK;
 }
 
@@ -536,14 +536,14 @@ int tcp_loop_worker(dthread_t *thread)
 	if (!w) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Allocate buffer for requests. */
 	uint8_t *qbuf = malloc(TCP_BUFFER_SIZE);
 	if (qbuf == NULL) {
 		dbg_net("tcp: failed to allocate buffers for TCP worker\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Drop all capabilities on workers. */
 #ifdef HAVE_CAP_NG_H
 	if (capng_have_capability(CAPNG_EFFECTIVE, CAP_SETPCAP)) {
@@ -551,7 +551,7 @@ int tcp_loop_worker(dthread_t *thread)
 		capng_apply(CAPNG_SELECT_BOTH);
 	}
 #endif /* HAVE_CAP_NG_H */
-	
+
 	/* Next sweep time. */
 	timev_t next_sweep;
 	time_now(&next_sweep);
@@ -571,7 +571,7 @@ int tcp_loop_worker(dthread_t *thread)
 		if (nfds < 0) {
 			continue;
 		}
-		
+
 		/* Establish timeouts. */
 		rcu_read_lock();
 		int max_idle = conf()->max_conn_idle;
@@ -584,7 +584,7 @@ int tcp_loop_worker(dthread_t *thread)
 		fdset_it_t it;
 		fdset_begin(w->fdset, &it);
 		while(nfds > 0) {
-			
+
 			/* Handle incoming clients. */
 			if (it.fd == w->pipe[0]) {
 				int client = 0;
@@ -616,15 +616,15 @@ int tcp_loop_worker(dthread_t *thread)
 					close(it.fd);
 					break;
 				}
-				
+
 			}
-			
+
 			/* Check if next exists. */
 			if (fdset_next(w->fdset, &it) != 0) {
 				break;
 			}
 		}
-		
+
 		/* Sweep inactive. */
 		timev_t now;
 		if (time_now(&now) == 0) {
@@ -648,7 +648,7 @@ int tcp_loop_unit(iohandler_t *ioh, dt_unit_t *unit)
 	if (unit->size < 1) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Create unit data. */
 	tcp_worker_t **workers = malloc((unit->size - 1) *
 	                                sizeof(tcp_worker_t *));
@@ -667,21 +667,21 @@ int tcp_loop_unit(iohandler_t *ioh, dt_unit_t *unit)
 		workers[i]->ioh = ioh;
 		++allocated;
 	}
-	
+
 	/* Check allocated workers. */
 	if (allocated != unit->size - 1) {
 		for (unsigned i = 0; i < allocated; ++i) {
 			tcp_worker_free(workers[i]);
 		}
-	
+
 		free(workers);
 		dbg_net("tcp: cannot create workers\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Store worker data. */
 	ioh->data = workers;
-	
+
 	/* Repurpose workers. */
 	for (unsigned i = 0; i < allocated; ++i) {
 		dt_repurpose(unit->threads[i + 1], tcp_loop_worker, workers[i]);
diff --git a/src/knot/server/udp-handler.c b/src/knot/server/udp-handler.c
index a3b8bae58da07a3609418a8fafd56ac6d6ce717b..19fe89b6ae71df7e6f55e55a949c30105290254d 100644
--- a/src/knot/server/udp-handler.c
+++ b/src/knot/server/udp-handler.c
@@ -81,11 +81,11 @@ static size_t udp_rrl_reject(const knot_nameserver_t *ns,
 			knot_wire_set_tc(resp); /* Set TC=1 */
 			break;
 		}
-		
+
 		*slip = 0; /* Restart SLIP interval. */
 		return rlen;
 	}
-	
+
 	return 0; /* Discard response. */
 }
 
@@ -99,7 +99,7 @@ int udp_handle(int fd, uint8_t *qbuf, size_t qbuflen, size_t *resp_len,
 	dbg_net("udp: received %zd bytes from '%s@%d'.\n", qbuflen,
 	        strfrom, sockaddr_portnum(addr));
 #endif
-	
+
 	int res = KNOT_EOK;
 	int rcode = KNOT_RCODE_NOERROR;
 	knot_packet_type_t qtype = KNOT_QUERY_INVALID;
@@ -119,14 +119,14 @@ int udp_handle(int fd, uint8_t *qbuf, size_t qbuflen, size_t *resp_len,
 		                                            qbuf, resp_len);
 		return ret;
 	}
-	
+
 	/* Parse query. */
 	rcode = knot_ns_parse_packet(qbuf, qbuflen, packet, &qtype);
 	if (rcode < KNOT_RCODE_NOERROR) {
 		dbg_net("udp: failed to parse packet\n");
 		rcode = KNOT_RCODE_SERVFAIL;
 	}
-	
+
 	/* Handle query. */
 	switch(qtype) {
 	case KNOT_QUERY_NORMAL:
@@ -136,7 +136,7 @@ int udp_handle(int fd, uint8_t *qbuf, size_t qbuflen, size_t *resp_len,
 	case KNOT_QUERY_AXFR:
 		/* RFC1034, p.28 requires reliable transfer protocol.
 		 * Bind responds with FORMERR.
- 		 */
+		 */
 		res = knot_ns_error_response_from_query(ns, packet,
 		                                        KNOT_RCODE_FORMERR, qbuf,
 		                                        resp_len);
@@ -144,19 +144,19 @@ int udp_handle(int fd, uint8_t *qbuf, size_t qbuflen, size_t *resp_len,
 	case KNOT_QUERY_IXFR:
 		/* According to RFC1035, respond with SOA. */
 		res = zones_normal_query_answer(ns, packet, addr,
-		                                qbuf, resp_len, 
+		                                qbuf, resp_len,
 		                                NS_TRANSPORT_UDP);
 		break;
 	case KNOT_QUERY_NOTIFY:
 		res = notify_process_request(ns, packet, addr,
 		                             qbuf, resp_len);
 		break;
-		
+
 	case KNOT_QUERY_UPDATE:
 		res = zones_process_update(ns, packet, addr, qbuf, resp_len,
 		                           fd, NS_TRANSPORT_UDP);
 		break;
-		
+
 	/* Unhandled opcodes. */
 	case KNOT_RESPONSE_AXFR: /*!< Processed in XFR handler. */
 	case KNOT_RESPONSE_IXFR: /*!< Processed in XFR handler. */
@@ -164,7 +164,7 @@ int udp_handle(int fd, uint8_t *qbuf, size_t qbuflen, size_t *resp_len,
 		                                        KNOT_RCODE_REFUSED, qbuf,
 		                                        resp_len);
 		break;
-			
+
 	/* Unknown opcodes */
 	default:
 		res = knot_ns_error_response_from_query(ns, packet,
@@ -172,7 +172,7 @@ int udp_handle(int fd, uint8_t *qbuf, size_t qbuflen, size_t *resp_len,
 		                                        resp_len);
 		break;
 	}
-	
+
 	/* Process RRL. */
 	if (knot_unlikely(rrl != NULL)) {
 		rrl_req_t rrl_rq;
@@ -190,7 +190,7 @@ int udp_handle(int fd, uint8_t *qbuf, size_t qbuflen, size_t *resp_len,
 		}
 		rcu_read_unlock();
 	}
-	
+
 
 	knot_packet_free(&packet);
 
@@ -286,7 +286,7 @@ static int (*_send_mmsg)(int, sockaddr_t *, struct mmsghdr *, size_t) = 0;
 
 /*!
  * \brief Send multiple packets.
- * 
+ *
  * Basic, sendmsg() based implementation.
  */
 int udp_sendmsg(int sock, sockaddr_t * addrs, struct mmsghdr *msgs, size_t count)
@@ -297,7 +297,7 @@ int udp_sendmsg(int sock, sockaddr_t * addrs, struct mmsghdr *msgs, size_t count
 			++sent;
 		}
 	}
-	
+
 	return sent;
 }
 
@@ -313,7 +313,7 @@ static inline int sendmmsg(int fd, struct mmsghdr *mmsg, unsigned vlen,
 
 /*!
  * \brief Send multiple packets.
- * 
+ *
  * sendmmsg() implementation.
  */
 int udp_sendmmsg(int sock, sockaddr_t *_, struct mmsghdr *msgs, size_t count)
@@ -439,7 +439,7 @@ void __attribute__ ((constructor)) udp_master_init()
 			_udp_handle = udp_recvmmsg_handle;
 		}
 	}
-	
+
 	/* Check for sendmmsg() support. */
 	_send_mmsg = udp_sendmsg;
 #ifdef ENABLE_SENDMMSG
@@ -535,7 +535,7 @@ int udp_reader(iohandler_t *h, dthread_t *thread)
 
 	/* Loop until all data is read. */
 	for (;;) {
-		
+
 		/* Check handler state. */
 		if (knot_unlikely(st->s & ServerReload)) {
 			st->s &= ~ServerReload;
@@ -557,12 +557,12 @@ int udp_reader(iohandler_t *h, dthread_t *thread)
 			}
 			rcu_read_unlock();
 		}
-		
+
 		/* Cancellation point. */
 		if (dt_is_cancelled(thread)) {
 			break;
 		}
-		
+
 		/* Wait for events. */
 		fd_set rfds;
 		FD_COPY(&rfds, &fds);
@@ -608,4 +608,3 @@ int udp_master(dthread_t *thread)
 	default: return udp_writer(h, thread);
 	}
 }
-
diff --git a/src/knot/server/xfr-handler.c b/src/knot/server/xfr-handler.c
index 05b76a5cffecc9ab7c22ef5721d615191398fd82..499e229466c59ff9cec6dd017c30213cff91ec4e 100644
--- a/src/knot/server/xfr-handler.c
+++ b/src/knot/server/xfr-handler.c
@@ -129,7 +129,7 @@ static int xfr_answer_ixfr(knot_nameserver_t *ns, knot_ns_xfr_t *xfr)
 	if (ret != KNOT_EOK) {
 		return ret;
 	}
-	
+
 	/* Load changesets from journal. */
 	int chsload = zones_xfr_load_changesets(xfr, serial_from, serial_to);
 	if (chsload != KNOT_EOK) {
@@ -146,17 +146,17 @@ static int xfr_answer_ixfr(knot_nameserver_t *ns, knot_ns_xfr_t *xfr)
 		} else {
 			xfr->rcode = KNOT_RCODE_SERVFAIL;
 		}
-		
+
 		/* Mark all as generic error. */
 		ret = KNOT_ERROR;
 	}
-	
+
 	/* Finally, answer. */
 	if (chsload == KNOT_EOK) {
 		ret = knot_ns_answer_ixfr(ns, xfr);
 		dbg_xfr("xfr: ns_answer_ixfr() = %s.\n", knot_strerror(ret));
 	}
-	
+
 	return ret;
 }
 
@@ -167,12 +167,12 @@ static int xfr_task_setmsg(knot_ns_xfr_t *rq, const char *keytag)
 	if (rq == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	knot_lookup_table_t *xd = knot_lookup_by_id(xfr_type_table, rq->type);
 	if (!xd) {
 		return KNOT_EINVAL;
 	}
-	
+
 	rcu_read_lock();
 	char *kstr = NULL;
 	if (keytag) {
@@ -209,7 +209,7 @@ static int xfr_task_setsig(knot_ns_xfr_t *rq, knot_tsig_key_t *key)
 	if (rq == NULL || key == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	int ret = KNOT_EOK;
 	rq->tsig_key = key;
 	rq->tsig_size = tsig_wire_maxsize(key);
@@ -236,7 +236,7 @@ static int xfr_task_setsig(knot_ns_xfr_t *rq, knot_tsig_key_t *key)
 	}
 	dbg_xfr("xfr: found TSIG key (MAC len=%zu), adding to transfer\n",
 		rq->digest_max_size);
-	
+
 	return ret;
 }
 
@@ -251,7 +251,7 @@ static int xfr_task_connect(knot_ns_xfr_t *rq)
 	if (fd < 0) {
 		return KNOT_ERROR;
 	}
-	
+
 	/* Bind to specific address - if set. */
 	if (rq->saddr.len > 0) {
 		if (bind(fd, (struct sockaddr *)&rq->saddr, rq->saddr.len) < 0) {
@@ -305,7 +305,7 @@ static int xfr_task_close(xfrworker_t *w, int fd)
 {
 	knot_ns_xfr_t *rq = xfr_task_get(w, fd);
 	if (!rq) return KNOT_ENOENT;
-	
+
 	/* Update xfer state. */
 	if (rq->type == XFR_TYPE_AIN || rq->type == XFR_TYPE_IIN) {
 		zonedata_t *zd = (zonedata_t *)knot_zone_data(rq->zone);
@@ -315,7 +315,7 @@ static int xfr_task_close(xfrworker_t *w, int fd)
 		}
 		pthread_mutex_unlock(&zd->lock);
 	}
-	
+
 	/* Close socket and free task. */
 	xfr_task_clear(w, fd);
 	xfr_task_free(rq);
@@ -327,11 +327,11 @@ static int xfr_task_close(xfrworker_t *w, int fd)
 static int xfr_task_expire(fdset_t *fds, knot_ns_xfr_t *rq)
 {
 	rcu_read_lock();
-	
+
 	/* Fetch related zone. */
 	knot_zone_t *zone = (knot_zone_t *)rq->zone;
 	const knot_zone_contents_t *contents = knot_zone_contents(zone);
-	
+
 	/* Process timeout. */
 	rq->wire_size = rq->wire_maxlen;
 	switch(rq->type) {
@@ -351,7 +351,7 @@ static int xfr_task_expire(fdset_t *fds, knot_ns_xfr_t *rq)
 		break;
 	}
 
-	
+
 	rcu_read_unlock();
 	log_zone_info("%s Failed, timeout exceeded.\n", rq->msg);
 	return KNOT_ECONNREFUSED;
@@ -367,7 +367,7 @@ static int xfr_task_start(knot_ns_xfr_t *rq)
 	rcu_read_lock();
 	int ret = KNOT_EOK;
 	knot_zone_t *zone = (knot_zone_t *)rq->zone;
-	
+
 	/* Fetch zone contents. */
 	const knot_zone_contents_t *contents = knot_zone_contents(zone);
 	if (!contents && rq->type == XFR_TYPE_IIN) {
@@ -392,7 +392,7 @@ static int xfr_task_start(knot_ns_xfr_t *rq)
 		ret = xfr_task_setsig(rq, rq->tsig_key);
 		add_tsig = (ret == KNOT_EOK);
 	}
-	
+
 	/* Create XFR query. */
 	switch(rq->type) {
 	case XFR_TYPE_AIN:
@@ -415,18 +415,18 @@ static int xfr_task_start(knot_ns_xfr_t *rq)
 		ret = KNOT_EINVAL;
 		break;
 	}
-	
-	
+
+
 	/* Unlock zone contents. */
 	rcu_read_unlock();
-	
+
 	/* Handle errors. */
 	if (ret != KNOT_EOK) {
 		dbg_xfr("xfr: failed to create XFR query type %d: %s\n",
 		        rq->type, knot_strerror(ret));
 		return ret;
 	}
-	
+
 	/* Start transfer. */
 	gettimeofday(&rq->t_start, NULL);
 	if (rq->wire_size > 0) {
@@ -439,29 +439,29 @@ static int xfr_task_start(knot_ns_xfr_t *rq)
 			return KNOT_ECONNREFUSED;
 		}
 	}
-	
+
 	/* If successful. */
 	if (rq->type == XFR_TYPE_SOA) {
 		rq->packet_nr = knot_wire_get_id(rq->wire);
 	}
-	
+
 	return KNOT_EOK;
 }
 
 static int xfr_task_process(xfrworker_t *w, knot_ns_xfr_t* rq, uint8_t *buf, size_t buflen)
 {
 	rcu_read_lock();
-	
+
 	/* Check if not already processing. */
 	zonedata_t *zd = (zonedata_t *)knot_zone_data(rq->zone);
-	
+
 	/* Check if the zone is not discarded. */
 	if (!zd || knot_zone_flags(rq->zone) & KNOT_ZONE_DISCARDED) {
 		dbg_xfr_verb("xfr: request on a discarded zone, ignoring\n");
 		rcu_read_unlock();
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Update XFR message prefix. */
 	xfr_task_setmsg(rq, NULL);
 
@@ -475,7 +475,7 @@ static int xfr_task_process(xfrworker_t *w, knot_ns_xfr_t* rq, uint8_t *buf, siz
 		rq->send = &xfr_send_tcp;
 		rq->recv = &xfr_recv_tcp;
 	}
-	
+
 	/* Handle request. */
 	dbg_xfr("%s processing request type '%d'\n", rq->msg, rq->type);
 	int ret = xfr_task_start(rq);
@@ -484,7 +484,7 @@ static int xfr_task_process(xfrworker_t *w, knot_ns_xfr_t* rq, uint8_t *buf, siz
 	if (xd && ret == KNOT_EOK) {
 		msg = xd->name;
 	}
-	
+
 	int bootstrap_fail = 0;
 	switch(rq->type) {
 	case XFR_TYPE_AIN:
@@ -536,7 +536,7 @@ static int xfr_task_finalize(xfrworker_t *w, knot_ns_xfr_t *rq)
 {
 	int ret = KNOT_EINVAL;
 	knot_nameserver_t *ns = w->master->ns;
-	
+
 	if (rq->type == XFR_TYPE_AIN) {
 		ret = zones_save_zone(rq);
 		if (ret == KNOT_EOK) {
@@ -554,11 +554,11 @@ static int xfr_task_finalize(xfrworker_t *w, knot_ns_xfr_t *rq)
 		knot_changesets_t *chs = (knot_changesets_t *)rq->data;
 		ret = zones_store_and_apply_chgsets(chs, rq->zone,
 		                                    &rq->new_contents,
-		                                    rq->msg, 
+		                                    rq->msg,
 		                                    XFR_TYPE_IIN);
 		rq->data = NULL; /* Freed or applied in prev function. */
 	}
-	
+
 	if (ret == KNOT_EOK) {
 		struct timeval t_end;
 		gettimeofday(&t_end, NULL);
@@ -581,7 +581,7 @@ static int xfr_task_resp(xfrworker_t *w, knot_ns_xfr_t *rq)
 	if (re == NULL) {
 		return KNOT_ENOMEM;
 	}
-	
+
 	knot_packet_type_t rt = KNOT_RESPONSE_NORMAL;
 	int ret = knot_ns_parse_packet(rq->wire, rq->wire_size, re, &rt);
 	if (ret != KNOT_EOK) {
@@ -605,7 +605,7 @@ static int xfr_task_resp(xfrworker_t *w, knot_ns_xfr_t *rq)
 		knot_packet_free(&re);
 		return KNOT_EOK; /* Ignore */
 	}
-	
+
 	/* Check TSIG. */
 	const knot_rrset_t * tsig_rr = knot_packet_tsig(re);
 	if (rq->tsig_key != NULL) {
@@ -621,9 +621,9 @@ static int xfr_task_resp(xfrworker_t *w, knot_ns_xfr_t *rq)
 			knot_packet_free(&re);
 			return KNOT_ECONNREFUSED;
 		}
-		
+
 	}
-	
+
 	/* Process response. */
 	size_t rlen = rq->wire_size;
 	switch(rt) {
@@ -644,7 +644,7 @@ static int xfr_task_resp(xfrworker_t *w, knot_ns_xfr_t *rq)
 		ret = KNOT_EINVAL;
 		break;
 	}
-	
+
 	knot_packet_free(&re);
 	if (ret == KNOT_EUPTODATE) {  /* Check up-to-date zone. */
 		log_server_info("%s %s (serial %u)\n", rq->msg,
@@ -652,9 +652,9 @@ static int xfr_task_resp(xfrworker_t *w, knot_ns_xfr_t *rq)
 		                knot_zone_serial(knot_zone_contents(rq->zone)));
 		ret = KNOT_ECONNREFUSED;
 	} else if (ret == KNOT_EOK) { /* Disconnect if everything went well. */
-		ret = KNOT_ECONNREFUSED; 
+		ret = KNOT_ECONNREFUSED;
 	}
-	
+
 	return ret;
 }
 
@@ -675,7 +675,7 @@ static int xfr_task_xfer(xfrworker_t *w, knot_ns_xfr_t *rq)
 		ret = KNOT_EINVAL;
 		break;
 	}
-	
+
 
 	/* AXFR-style IXFR. */
 	if (ret == KNOT_ENOIXFR) {
@@ -689,7 +689,7 @@ static int xfr_task_xfer(xfrworker_t *w, knot_ns_xfr_t *rq)
 
 	/* Check return code for errors. */
 	dbg_xfr_verb("xfr: processed XFR pkt (%s)\n", knot_strerror(ret));
-	
+
 	/* IXFR refused, try again with AXFR. */
 	if (rq->type == XFR_TYPE_IIN && ret == KNOT_EXFRREFUSED) {
 		log_server_notice("%s Transfer failed, fallback to AXFR.\n", rq->msg);
@@ -712,16 +712,16 @@ static int xfr_task_xfer(xfrworker_t *w, knot_ns_xfr_t *rq)
 		}
 		return ret; /* Something failed in fallback. */
 	}
-	
+
 	/* Handle errors. */
 	if (ret == KNOT_ENOXFR) {
 		log_server_warning("%s Finished, %s\n", rq->msg, knot_strerror(ret));
 	} else if (ret < 0) {
 		log_server_error("%s %s\n", rq->msg, knot_strerror(ret));
 	}
-	
+
 	rcu_read_unlock();
-	
+
 	/* Only for successful xfers. */
 	if (ret > 0) {
 		ret = xfr_task_finalize(w, rq);
@@ -755,7 +755,7 @@ static int xfr_process_event(xfrworker_t *w, knot_ns_xfr_t *rq)
 	if (knot_zone_flags(rq->zone) & KNOT_ZONE_DISCARDED) {
 		return KNOT_ECONNREFUSED;
 	}
-	
+
 	/* Receive msg. */
 	int n = rq->recv(rq->session, &rq->addr, rq->wire, rq->wire_maxlen);
 	if (n < 0) { /* Disconnect */
@@ -793,7 +793,7 @@ static void xfr_sweep(fdset_t *set, int fd, void *data)
 		dbg_xfr("xfr: NULL data to sweep\n");
 		return;
 	}
-	
+
 	/* Skip non-sweepable types. */
 	int ret = KNOT_ECONNREFUSED;
 	switch(rq->type) {
@@ -805,7 +805,7 @@ static void xfr_sweep(fdset_t *set, int fd, void *data)
 	default:
 		break;
 	}
-	
+
 	if (ret != KNOT_EOK) {
 		xfr_task_close(w, fd);
 		--w->pending;
@@ -831,7 +831,7 @@ static int xfr_check_tsig(knot_ns_xfr_t *xfr, knot_rcode_t *rcode, char **tag)
 			kname = knot_rrset_owner(tsig_rr);
 			if (tag) {
 				*tag = knot_dname_to_str(kname);
-				
+
 			}
 		} else {
 			tsig_rr = 0;
@@ -842,7 +842,7 @@ static int xfr_check_tsig(knot_ns_xfr_t *xfr, knot_rcode_t *rcode, char **tag)
 		char *name = knot_dname_to_str(
 		                        knot_zone_name(xfr->zone));
 		free(name);
-		
+
 		// return REFUSED
 		xfr->tsig_key = 0;
 		*rcode = KNOT_RCODE_REFUSED;
@@ -859,14 +859,14 @@ static int xfr_check_tsig(knot_ns_xfr_t *xfr, knot_rcode_t *rcode, char **tag)
 			return KNOT_TSIG_EBADKEY;
 		}
 	}
-	
+
 	/* Evaluate configured key for claimed key name.*/
 	key = xfr->tsig_key; /* Expects already set key (check_zone) */
 	xfr->tsig_key = 0;
 	if (key && kname && knot_dname_compare(key->name, kname) == 0) {
 		dbg_xfr("xfr: found claimed TSIG key for comparison\n");
 	} else {
-		
+
 		/* TSIG is mandatory if configured for interface. */
 		/* Configured, but doesn't match. */
 		dbg_xfr("xfr: no claimed key configured or not received"
@@ -876,12 +876,12 @@ static int xfr_check_tsig(knot_ns_xfr_t *xfr, knot_rcode_t *rcode, char **tag)
 		xfr->tsig_rcode = KNOT_RCODE_BADKEY;
 		key = NULL; /* Invalidate, ret already set to BADKEY */
 	}
-	
+
 	/* Validate with TSIG. */
 	if (key) {
 		/* Prepare variables for TSIG */
 		xfr_task_setsig(xfr, key);
-		
+
 		/* Copy MAC from query. */
 		dbg_xfr("xfr: validating TSIG from query\n");
 		const uint8_t* mac = tsig_rdata_mac(tsig_rr);
@@ -894,7 +894,7 @@ static int xfr_check_tsig(knot_ns_xfr_t *xfr, knot_rcode_t *rcode, char **tag)
 		} else {
 			memcpy(xfr->digest, mac, mac_len);
 			xfr->digest_size = mac_len;
-			
+
 			/* Check query TSIG. */
 			ret = knot_tsig_server_check(
 			                        tsig_rr,
@@ -904,7 +904,7 @@ static int xfr_check_tsig(knot_ns_xfr_t *xfr, knot_rcode_t *rcode, char **tag)
 			dbg_xfr("knot_tsig_server_check() returned %s\n",
 			        knot_strerror(ret));
 		}
-		
+
 		/* Evaluate TSIG check results. */
 		switch(ret) {
 		case KNOT_EOK:
@@ -936,7 +936,7 @@ static int xfr_check_tsig(knot_ns_xfr_t *xfr, knot_rcode_t *rcode, char **tag)
 		}
 	}
 
-	
+
 	return ret;
 }
 
@@ -953,7 +953,7 @@ int xfr_worker(dthread_t *thread)
 		dbg_xfr("xfr: failed to allocate buffer for XFR worker\n");
 		return KNOT_ENOMEM;
 	}
-	
+
 	/* Next sweep time. */
 	timev_t next_sweep;
 	time_now(&next_sweep);
@@ -973,7 +973,7 @@ int xfr_worker(dthread_t *thread)
 	int ret = 0;
 	dbg_xfr_verb("xfr: worker=%p starting\n", w);
 	for (;;) {
-		
+
 		/* Populate pool with new requests. */
 		if (w->pending <= thread_capacity) {
 			pthread_mutex_lock(&xfr->mx);
@@ -999,14 +999,14 @@ int xfr_worker(dthread_t *thread)
 		if (dt_is_cancelled(thread) || w->pending == 0) {
 			break;
 		}
-		
+
 		/* Poll fdset. */
 		int nfds = fdset_wait(w->pool.fds, (XFR_SWEEP_INTERVAL/2) * 1000);
 		if (nfds < 0) {
 			if (errno == EINTR) continue;
 			break;
 		}
-		
+
 		/* Iterate fdset. */
 		fdset_it_t it;
 		fdset_begin(w->pool.fds, &it);
@@ -1025,13 +1025,13 @@ int xfr_worker(dthread_t *thread)
 					--it.pos; /* Reset iterator */
 				}
 			}
-			
+
 			/* Next fd. */
 			if (fdset_next(w->pool.fds, &it) < 0) {
 				break;
 			}
 		}
-		
+
 		/* Sweep inactive. */
 		timev_t now;
 		if (time_now(&now) == 0) {
@@ -1042,7 +1042,7 @@ int xfr_worker(dthread_t *thread)
 			}
 		}
 	}
-	
+
 	/* Cancel existing connections. */
 	size_t keylen = 0;
 	ahtable_iter_t i;
@@ -1053,7 +1053,7 @@ int xfr_worker(dthread_t *thread)
 		ahtable_iter_next(&i);
 	}
 	ahtable_iter_free(&i);
-	
+
 	/* Destroy data structures. */
 	fdset_destroy(w->pool.fds);
 	ahtable_free(w->pool.t);
@@ -1084,17 +1084,17 @@ xfrhandler_t *xfr_create(size_t thrcount, knot_nameserver_t *ns)
 		free(xfr);
 		return NULL;
 	}
-	
+
 	/* Create worker threads. */
 	for (unsigned i = 0; i < thrcount; ++i) {
 		xfrworker_t *w = xfr->workers + i;
 		w->master = xfr;
 	}
-	
+
 	/* Create tasks structure and mutex. */
 	pthread_mutex_init(&xfr->mx, 0);
 	init_list(&xfr->queue);
-	
+
 	/* Assign worker threads. */
 	dthread_t **threads = xfr->unit->threads;
 	for (unsigned i = 0; i < thrcount; ++i) {
@@ -1109,7 +1109,7 @@ int xfr_free(xfrhandler_t *xfr)
 	if (!xfr) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Free RR mutex. */
 	pthread_mutex_destroy(&xfr->mx);
 
@@ -1131,7 +1131,7 @@ int xfr_stop(xfrhandler_t *xfr)
 	if (!xfr) {
 		return KNOT_EINVAL;
 	}
-	
+
 	xfr_enqueue(xfr, NULL);
 	return dt_stop(xfr->unit);
 }
@@ -1145,13 +1145,13 @@ int xfr_enqueue(xfrhandler_t *xfr, knot_ns_xfr_t *rq)
 	if (!xfr) {
 		return KNOT_EINVAL;
 	}
-	
+
 	if (rq) {
 		pthread_mutex_lock(&xfr->mx);
 		add_tail(&xfr->queue, &rq->n);
 		pthread_mutex_unlock(&xfr->mx);
 	}
-	
+
 	/* Notify threads. */
 	for (unsigned i = 0; i < xfr->unit->size; ++i) {
 		dt_activate(xfr->unit->threads[i]);
@@ -1165,11 +1165,11 @@ int xfr_answer(knot_nameserver_t *ns, knot_ns_xfr_t *rq)
 	if (!ns || !rq) {
 		return KNOT_EINVAL;
 	}
-	
+
 	rcu_read_lock();
 	gettimeofday(&rq->t_start, NULL);
 	int ret = knot_ns_init_xfr(ns, rq);
-	
+
 	/* Use the QNAME as the zone name. */
 	const knot_dname_t *qname = knot_packet_qname(rq->query);
 	if (qname != NULL) {
@@ -1192,12 +1192,12 @@ int xfr_answer(knot_nameserver_t *ns, knot_ns_xfr_t *rq)
 		rq->msg = strdup("XFR:");
 	}
 	free(keytag);
-	
+
 	/* Initialize response. */
 	if (ret == KNOT_EOK) {
 		ret = knot_ns_init_xfr_resp(ns, rq);
 	}
-	
+
 	/* Update request. */
 	rq->send = &xfr_send_udp;
 	rq->recv = &xfr_recv_udp;
@@ -1205,7 +1205,7 @@ int xfr_answer(knot_nameserver_t *ns, knot_ns_xfr_t *rq)
 		rq->send = &xfr_send_tcp;
 		rq->recv = &xfr_recv_tcp;
 	}
-	
+
 	/* Announce. */
 	switch (ret) {
 	case KNOT_EDENIED:
@@ -1215,7 +1215,7 @@ int xfr_answer(knot_nameserver_t *ns, knot_ns_xfr_t *rq)
 	default:
 		break;
 	}
-	
+
 	/* Finally, answer AXFR/IXFR. */
 	const knot_zone_contents_t *cont = knot_zone_contents(rq->zone);
 	if (ret == KNOT_EOK) {
@@ -1238,7 +1238,7 @@ int xfr_answer(knot_nameserver_t *ns, knot_ns_xfr_t *rq)
 		                                  rq->wire, &rq->wire_size);
 		rq->send(rq->session, &rq->addr, rq->wire, rq->wire_size);
 	}
-	
+
 	/* Check results. */
 	gettimeofday(&rq->t_end, NULL);
 	if (ret != KNOT_EOK) {
@@ -1248,12 +1248,12 @@ int xfr_answer(knot_nameserver_t *ns, knot_ns_xfr_t *rq)
 		                rq->msg,
 		                time_diff(&rq->t_start, &rq->t_end) / 1000.0);
 	}
-	
+
 	/* Cleanup. */
 	knot_packet_free(&rq->response);  /* Free response. */
 	knot_free_changesets((knot_changesets_t **)(&rq->data));
 	free(rq->zname);
-	
+
 	/* Free request. */
 	rcu_read_unlock();
 	xfr_task_free(rq);
@@ -1265,7 +1265,7 @@ knot_ns_xfr_t *xfr_task_create(knot_zone_t *z, int type, int flags)
 	knot_ns_xfr_t *rq = malloc(sizeof(knot_ns_xfr_t));
 	if (rq == NULL) return NULL;
 	memset(rq, 0, sizeof(knot_ns_xfr_t));
-	
+
 	/* Initialize. */
 	rq->type = type;
 	rq->flags = flags;
@@ -1281,10 +1281,10 @@ int xfr_task_free(knot_ns_xfr_t *rq)
 	if (!rq) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Free DNAME trie. */
 	hattrie_free(rq->lookup_tree);
-	
+
 	/* Free TSIG buffers. */
 	free(rq->digest);
 	rq->digest = NULL;
@@ -1292,10 +1292,10 @@ int xfr_task_free(knot_ns_xfr_t *rq)
 	free(rq->tsig_data);
 	rq->tsig_data = NULL;
 	rq->tsig_data_size = 0;
-	
+
 	/* Cleanup transfer-specifics. */
 	xfr_task_cleanup(rq);
-	
+
 	/* No further access to zone. */
 	knot_zone_release(rq->zone);
 	free(rq->msg);
@@ -1309,7 +1309,7 @@ int xfr_task_setaddr(knot_ns_xfr_t *rq, sockaddr_t *to, sockaddr_t *from)
 	if (!rq) {
 		return KNOT_EINVAL;
 	}
-	
+
 	memcpy(&rq->addr, to, sizeof(sockaddr_t));
 	if (from) memcpy(&rq->saddr, from, sizeof(sockaddr_t));
 	return KNOT_EOK;
@@ -1320,14 +1320,14 @@ char *xfr_remote_str(const sockaddr_t *addr, const char *key)
 	if (!addr) {
 		return NULL;
 	}
-	
+
 	/* Prepare address strings. */
 	char r_addr[SOCKADDR_STRLEN];
 	int r_port = sockaddr_portnum(addr);
 	sockaddr_tostr(addr, r_addr, sizeof(r_addr));
-	
+
 	/* Prepare key strings. */
-	char *tag = ""; 
+	char *tag = "";
 	char *q = "'";
 	if (key) {
 		tag = " key "; /* Prefix */
@@ -1335,6 +1335,6 @@ char *xfr_remote_str(const sockaddr_t *addr, const char *key)
 		key = tag; /* Both empty. */
 		q = tag;
 	}
-	
+
 	return sprintf_alloc("'%s@%d'%s%s%s%s", r_addr, r_port, tag, q, key, q);
 }
diff --git a/src/knot/server/xfr-handler.h b/src/knot/server/xfr-handler.h
index e221834d50ab04840ad2d1a7744e7295caace6bf..144061f47222af30c3a84af4c52b8e848d7f5859 100644
--- a/src/knot/server/xfr-handler.h
+++ b/src/knot/server/xfr-handler.h
@@ -175,7 +175,7 @@ int xfr_task_free(knot_ns_xfr_t *rq);
  * \param rq XFR request,
  * \param to Destination address.
  * \param from Source address.
- * \return 
+ * \return
  */
 int xfr_task_setaddr(knot_ns_xfr_t *rq, sockaddr_t *to, sockaddr_t *from);
 
diff --git a/src/knot/server/zones.c b/src/knot/server/zones.c
index 97570bdf57d2263db0c38fe20210e8731a0db957..18e6bf573a388a8bbef94452aea92adeeff5c93b 100644
--- a/src/knot/server/zones.c
+++ b/src/knot/server/zones.c
@@ -54,9 +54,9 @@ static int zonedata_destroy(knot_zone_t *zone)
 	if (zone == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	dbg_zones_verb("zones: zonedata_destroy(%p) called\n", zone);
-	
+
 	zonedata_t *zd = (zonedata_t *)knot_zone_data(zone);
 	if (!zd) {
 		return KNOT_EINVAL;
@@ -95,10 +95,10 @@ static int zonedata_destroy(knot_zone_t *zone)
 
 	/* Close IXFR db. */
 	journal_release(zd->ixfr_db);
-	
+
 	/* Free assigned config. */
 	conf_free_zone(zd->conf);
-	
+
 	free(zd);
 	zone->data = 0;
 	return KNOT_EOK;
@@ -139,7 +139,7 @@ static int zonedata_init(conf_zone_t *cfg, knot_zone_t *zone)
 	/* Initialize IXFR database. */
 	zd->ixfr_db = journal_open(cfg->ixfr_db, cfg->ixfr_fslimit,
 	                           JOURNAL_LAZY, JOURNAL_DIRTY);
-	
+
 	if (zd->ixfr_db == NULL) {
 		char ebuf[256] = {0};
 		strerror_r(errno, ebuf, sizeof(ebuf));
@@ -184,7 +184,7 @@ static int zonedata_init(conf_zone_t *cfg, knot_zone_t *zone)
  */
 static uint32_t zones_jitter(uint32_t interval)
 {
-	return (interval * (100 - (tls_rand() * ZONES_JITTER_PCT))) / 100; 
+	return (interval * (100 - (tls_rand() * ZONES_JITTER_PCT))) / 100;
 }
 
 /*!
@@ -269,16 +269,16 @@ static int zones_expire_ev(event_t *e)
 	if (zone == NULL || zone->data == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	zonedata_t *zd = (zonedata_t *)zone->data;
 	rcu_read_lock();
-	
+
 	/* Check if zone is not discarded. */
 	if (knot_zone_flags(zone) & KNOT_ZONE_DISCARDED) {
 		rcu_read_unlock();
 		return KNOT_EOK;
 	}
-	
+
 	/* Mark the zone as expired. This will remove the zone contents. */
 	knot_zone_contents_t *contents = knot_zonedb_expire_zone(
 			zd->server->nameserver->zone_db, zone->name);
@@ -288,21 +288,21 @@ static int zones_expire_ev(event_t *e)
 		rcu_read_unlock();
 		return KNOT_EOK;
 	}
-	
+
 	/* Publish expired zone. */
 	/* Need to keep a reference in case zone get's deleted in meantime. */
 	knot_zone_retain(zone);
 	rcu_read_unlock();
 	synchronize_rcu();
 	rcu_read_lock();
-	
+
 	/* Log event. */
 	log_server_info("Zone '%s' expired.\n", zd->conf->name);
-	
+
 	/* Early finish this event to prevent lockup during cancellation. */
 	dbg_zones("zones: zone expired, removing from database\n");
 	evsched_event_finished(e->parent);
-	
+
 	/* Cancel REFRESH timer. */
 	if (zd->xfr_in.timer) {
 		evsched_cancel(e->parent, zd->xfr_in.timer);
@@ -315,13 +315,13 @@ static int zones_expire_ev(event_t *e)
 		evsched_event_free(e->parent, zd->xfr_in.expire);
 		zd->xfr_in.expire = 0;
 	}
-	
+
 	knot_zone_contents_deep_free(&contents);
 	rcu_read_unlock();
-	
+
 	/* Release holding reference. */
 	knot_zone_release(zone);
-	
+
 	return KNOT_EOK;
 }
 
@@ -365,7 +365,7 @@ static int zones_refresh_ev(event_t *e)
 		rq->flags = XFR_FLAG_TCP;
 		rcu_read_unlock();
 		evsched_event_finished(e->parent);
-		
+
 		/* Check transfer state. */
 		pthread_mutex_lock(&zd->lock);
 		if (zd->xfr_in.state == XFR_PENDING) {
@@ -375,7 +375,7 @@ static int zones_refresh_ev(event_t *e)
 		} else {
 			zd->xfr_in.state = XFR_PENDING;
 		}
-		
+
 		/* Issue request. */
 		ret = xfr_enqueue(zd->server->xfr, rq);
 		if (ret != KNOT_EOK) {
@@ -384,9 +384,9 @@ static int zones_refresh_ev(event_t *e)
 		}
 		pthread_mutex_unlock(&zd->lock);
 		return ret;
-		
+
 	}
-	
+
 	/* Schedule EXPIRE timer on first attempt. */
 	if (!zd->xfr_in.expire) {
 		uint32_t expire_tmr = zones_jitter(zones_soa_expire(zone));
@@ -397,13 +397,13 @@ static int zones_refresh_ev(event_t *e)
 		dbg_zones("zones: EXPIRE of '%s' after %u seconds\n",
 		          zd->conf->name, expire_tmr / 1000);
 	}
-	
+
 	/* Reschedule as RETRY timer. */
 	uint32_t retry_tmr = zones_jitter(zones_soa_retry(zone));
 	evsched_schedule(e->parent, e, retry_tmr);
 	dbg_zones("zones: RETRY of '%s' after %u seconds\n",
 	          zd->conf->name, retry_tmr / 1000);
-	
+
 
 	/* Issue request. */
 	rcu_read_unlock();
@@ -412,9 +412,9 @@ static int zones_refresh_ev(event_t *e)
 	if (ret != KNOT_EOK) {
 		xfr_task_free(rq);
 	}
-	
 
-	
+
+
 
 	return ret;
 }
@@ -550,8 +550,8 @@ static int zones_load_zone(knot_zone_t **dst, const char *zone_name,
 	if (dst == NULL || zone_name == NULL || source == NULL) {
 		return KNOT_EINVAL;
 	}
-	
-	
+
+
 	int ret = KNOT_EOK;
 	zloader_t *zl = NULL;
 	*dst = NULL;
@@ -573,7 +573,7 @@ static int zones_load_zone(knot_zone_t **dst, const char *zone_name,
 		knot_zload_close(zl);
 		return KNOT_EZONEINVAL;
 	}
-	
+
 	/* Check the source file */
 	assert(zl != NULL);
 	*dst = knot_zload_load(zl);
@@ -582,7 +582,7 @@ static int zones_load_zone(knot_zone_t **dst, const char *zone_name,
 		knot_zload_close(zl);
 		return KNOT_ERROR;
 	}
-	
+
 	/* Check if loaded origin matches. */
 	const knot_dname_t *dname = knot_zone_name(*dst);
 	knot_dname_t *dname_req = NULL;
@@ -674,7 +674,7 @@ static inline uint64_t ixfrdb_key_make(uint32_t from, uint32_t to)
 int zones_changesets_from_binary(knot_changesets_t *chgsets)
 {
 	/*! \todo #1291 Why doesn't this just increment stream ptr? */
-	
+
 	assert(chgsets != NULL);
 	assert(chgsets->allocated >= chgsets->count);
 	/*
@@ -685,13 +685,13 @@ int zones_changesets_from_binary(knot_changesets_t *chgsets)
 	int ret = 0;
 
 	for (int i = 0; i < chgsets->count; ++i) {
-		
+
 		/* Read changeset flags. */
 		knot_changeset_t* chs = chgsets->sets + i;
 		size_t remaining = chs->size;
 		memcpy(&chs->flags, chs->data, sizeof(uint32_t));
 		remaining -= sizeof(uint32_t);
-		
+
 		/* Read initial changeset RRSet - SOA. */
 		uint8_t *stream = chs->data + (chs->size - remaining);
 		ret = rrset_deserialize(stream, &remaining, &rrset);
@@ -773,7 +773,7 @@ int zones_changesets_from_binary(knot_changesets_t *chgsets)
 				}
 			}
 		}
-		
+
 		dbg_xfr_verb("xfr: read all RRSets in changeset\n");
 	}
 
@@ -782,7 +782,7 @@ int zones_changesets_from_binary(knot_changesets_t *chgsets)
 
 /*----------------------------------------------------------------------------*/
 
-static int zones_load_changesets(const knot_zone_t *zone, 
+static int zones_load_changesets(const knot_zone_t *zone,
                                  knot_changesets_t *dst,
                                  uint32_t from, uint32_t to)
 {
@@ -794,7 +794,7 @@ static int zones_load_changesets(const knot_zone_t *zone,
 		dbg_zones_detail("Bad arguments: zone->data=%p\n", zone->data);
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Fetch zone-specific data. */
 	zonedata_t *zd = (zonedata_t *)knot_zone_data(zone);
 	if (!zd->ixfr_db) {
@@ -850,7 +850,7 @@ static int zones_load_changesets(const knot_zone_t *zone,
 			journal_release(j);
 			return KNOT_ERROR;
 		}
-		
+
 		/* Skip wrong changesets. */
 		if (!(n->flags & JOURNAL_VALID) || n->flags & JOURNAL_TRANS) {
 			++n;
@@ -888,7 +888,7 @@ static int zones_load_changesets(const knot_zone_t *zone,
 
 		/*! \todo Check consistency. */
 	}
-	
+
 	dbg_xfr_detail("xfr: finished reading journal entries\n");
 	journal_release(j);
 
@@ -1039,7 +1039,7 @@ static int zones_insert_zone(conf_zone_t *z, knot_zone_t **dst,
 	if (z == NULL || dst == NULL || ns == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Convert the zone name into a domain name. */
 	/* Local allocation, will be discarded. */
 	knot_dname_t *dname = knot_dname_new_from_str(z->name, strlen(z->name),
@@ -1138,7 +1138,7 @@ static int zones_insert_zone(conf_zone_t *z, knot_zone_t **dst,
 	if (zone != NULL) {
 		zonedata_t *zd = (zonedata_t *)knot_zone_data(zone);
 		assert(zd != NULL);
-		
+
 		/* Update refs. */
 		if (zd->conf != z) {
 			conf_free_zone(zd->conf);
@@ -1194,20 +1194,20 @@ static int zones_insert_zone(conf_zone_t *z, knot_zone_t **dst,
 			                   "for zone '%s': %s\n",
 			                   z->name, knot_strerror(ar));
 		}
-		
+
 
 		/* Update events scheduled for zone. */
 		evsched_t *sch = ((server_t *)knot_ns_get_data(ns))->sched;
 		zones_schedule_refresh(zone);
 		zones_schedule_notify(zone);
-		
+
 		/* Refresh new slave zones (almost) immediately. */
 		if(is_new && zd->xfr_in.timer) {
 			evsched_cancel(sch, zd->xfr_in.timer);
 			evsched_schedule(sch, zd->xfr_in.timer,
 			                 zd->xfr_in.bootstrap_retry / 2);
 		}
-		
+
 		/* Schedule IXFR database syncing. */
 		/*! \note This has to remain separate as it must not be
 		 *        triggered by a zone update or SOA response.
@@ -1242,7 +1242,7 @@ static int zones_insert_zone(conf_zone_t *z, knot_zone_t **dst,
 
 			rcu_read_unlock();
 		}
-		
+
 		/* Calculate differences. */
 		rcu_read_lock();
 		knot_zone_t *z_old = knot_zonedb_find_zone(ns->zone_db,
@@ -1283,7 +1283,7 @@ struct zonewalk_t {
 	unsigned qhead;
 	unsigned qtail;
 	conf_zone_t *q[];
-	
+
 };
 
 /*! Thread entrypoint for loading zones. */
@@ -1292,7 +1292,7 @@ static int zonewalker(dthread_t *thread)
 	if (thread == NULL) {
 		return KNOT_ERROR;
 	}
-	
+
 	struct zonewalk_t *zw = (struct zonewalk_t *)thread->data;
 	if (zw == NULL) {
 		return KNOT_ERROR;
@@ -1310,20 +1310,20 @@ static int zonewalker(dthread_t *thread)
 		if (i >= zw->qtail) {
 			break;
 		}
-		
+
 		if (mreserve((char **)&zones, sizeof(knot_zone_t*),
 		             inserted + 1, 32, &allocd) < 0) {
 			dbg_zones("zones: failed to reserve space for "
 			          "loading zones\n");
 			continue;
 		}
-		
+
 		int ret = zones_insert_zone(zw->q[i], zones + inserted, zw->ns);
 		if (ret == KNOT_EOK) {
 			++inserted;
 		}
 	}
-	
+
 	/* Collect results. */
 	pthread_mutex_lock(&zw->lock);
 	zw->inserted += inserted;
@@ -1341,7 +1341,7 @@ static int zonewalker(dthread_t *thread)
 	}
 	pthread_mutex_unlock(&zw->lock);
 	free(zones);
-	
+
 	return KNOT_EOK;
 }
 
@@ -1367,7 +1367,7 @@ static int zones_insert_zones(knot_nameserver_t *ns,
 	WALK_LIST(z, *zone_conf) {
 		++zcount;
 	}
-	
+
 	/* Initialize zonewalker. */
 	size_t zwlen = sizeof(struct zonewalk_t) + zcount * sizeof(conf_zone_t*);
 	struct zonewalk_t *zw = malloc(zwlen);
@@ -1388,7 +1388,7 @@ static int zones_insert_zones(knot_nameserver_t *ns,
 	}
 	zw->qhead = 0;
 	zw->qtail = zcount;
-	
+
 	/* Initialize threads. */
 	size_t thrs = dt_optimal_size();
 	if (thrs > zcount) thrs = zcount;
@@ -1398,13 +1398,13 @@ static int zones_insert_zones(knot_nameserver_t *ns,
 		dt_start(unit);
 		dt_join(unit);
 		dt_delete(&unit);
-		
+
 		/* Collect counts. */
 		ret = zw->inserted;
 	} else {
 		ret = KNOT_ENOMEM;
 	}
-	
+
 	pthread_mutex_destroy(&zw->lock);
 	free(zw);
 	return ret;
@@ -1428,7 +1428,7 @@ static int zones_remove_zones(const knot_zonedb_t *db_new,
 {
 	hattrie_iter_t *i = hattrie_iter_begin(db_new->zone_tree, 0);
 	while(!hattrie_iter_finished(i)) {
-		
+
 		/* try to find the new zone in the old DB
 		 * if the pointers match, remove the zone from old DB
 		 */
@@ -1454,7 +1454,7 @@ dbg_zones_exec(
 			WALK_LIST_FREE(zconf->acl.notify_in);
 			WALK_LIST_FREE(zconf->acl.notify_out);
 			WALK_LIST_FREE(zconf->acl.update_in);
-			
+
 			/* Remove from zone db. */
 			knot_zone_t * rm = knot_zonedb_remove_zone(db_old,
 			                              knot_zone_name(old_zone));
@@ -1462,7 +1462,7 @@ dbg_zones_exec(
 		}
 		hattrie_iter_next(i);
 	}
-	
+
 	hattrie_iter_free(i);
 
 	return KNOT_EOK;
@@ -1489,7 +1489,7 @@ static int zones_check_tsig_query(const knot_zone_t *zone,
 	int ret = zones_query_check_zone(zone, knot_packet_opcode(query),
 	                                 addr, tsig_key_zone, rcode);
 
-	
+
 	/* Accept found OR unknown key results. */
 	if (ret == KNOT_EOK || ret == KNOT_EACCES) {
 		if (*tsig_key_zone != NULL) {
@@ -1522,14 +1522,14 @@ static int zones_update_forward(int fd, knot_ns_transport_t ttype,
                                 knot_packet_t *query, size_t qsize)
 {
 	rcu_read_lock();
-	
+
 	/* Check transport type. */
 	zonedata_t *zd = (zonedata_t *)knot_zone_data(zone);
 	unsigned flags = XFR_FLAG_UDP;
 	if (ttype == NS_TRANSPORT_TCP) {
 		flags = XFR_FLAG_TCP;
 	}
-	
+
 	/* Prepare task. */
 	knot_ns_xfr_t *rq = xfr_task_create(zone, XFR_TYPE_FORWARD, flags);
 	if (!rq) {
@@ -1537,12 +1537,12 @@ static int zones_update_forward(int fd, knot_ns_transport_t ttype,
 		return KNOT_ENOMEM;
 	}
 	xfr_task_setaddr(rq, &zd->xfr_in.master, &zd->xfr_in.via);
-	
+
 	/* Copy query originator data. */
 	rq->fwd_src_fd = fd;
 	memcpy(&rq->fwd_addr, from, sizeof(sockaddr_t));
 	rq->packet_nr = (int)knot_packet_id(query);
-	
+
 	/* Duplicate query to keep it in memory during forwarding. */
 	rq->query = knot_packet_new(KNOT_PACKET_PREALLOC_QUERY);
 	if (!rq->query) {
@@ -1567,7 +1567,7 @@ static int zones_update_forward(int fd, knot_ns_transport_t ttype,
 	if (ret != KNOT_EOK) {
 		xfr_task_free(rq);
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -1584,26 +1584,26 @@ static int zones_store_changesets_to_disk(knot_zone_t *zone,
 		          "Could not start journal operation.\n");
 		return KNOT_ERROR;
 	}
-	
+
 	int ret = zones_store_changesets(zone, chgsets);
 	if (ret != KNOT_EOK) {
 		zones_store_changesets_rollback(journal);
 		dbg_zones("zones: create_changesets: "
 		          "Could not store in the journal. Reason: %s.\n",
 		          knot_strerror(ret));
-		
+
 		return ret;
 	}
-	
+
 	ret = zones_store_changesets_commit(journal);
 	if (ret != KNOT_EOK) {
 		dbg_zones("zones: create_changesets: "
 		          "Could not commit to journal. Reason: %s.\n",
 		          knot_strerror(ret));
-		
+
 		return ret;
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -1627,7 +1627,7 @@ static int zones_process_update_auth(knot_zone_t *zone,
 {
 	int ret = KNOT_EOK;
 	dbg_zones_verb("TSIG check successful. Answering query.\n");
-	
+
 	/* Create log message prefix. */
 	char *keytag = NULL;
 	if (tsig_key) {
@@ -1640,14 +1640,14 @@ static int zones_process_update_auth(knot_zone_t *zone,
 	free(r_str);
 	free(keytag);
 	log_zone_info("%s Started.\n", msg);
-	
-	
+
+
 	/* Reserve place for the TSIG */
 	if (tsig_key != NULL) {
 		size_t tsig_max_size = tsig_wire_maxsize(tsig_key);
 		knot_packet_set_tsig_size(resp, tsig_max_size);
 	}
-	
+
 	/* We must prepare a changesets_t structure even if
 	 * there is only one changeset - because of the API. */
 	knot_changesets_t *chgsets = NULL;
@@ -1658,17 +1658,17 @@ static int zones_process_update_auth(knot_zone_t *zone,
 		free(msg);
 		return ret;
 	}
-	
+
 	assert(chgsets->allocated >= 1);
-	
+
 	/*
 	 * NEW DDNS PROCESSING -------------------------------------------------
 	 */
 	/* 1) Process the UPDATE packet, apply to zone, create changesets. */
-	
+
 	dbg_zones_verb("Processing UPDATE packet.\n");
 	chgsets->count = 1; /* DU is represented by a single chset. */
-	
+
 	knot_zone_contents_t *new_contents = NULL;
 	ret = knot_ns_process_update2(knot_packet_query(resp),
 	                              knot_zone_get_contents(zone),
@@ -1695,7 +1695,7 @@ static int zones_process_update_auth(knot_zone_t *zone,
 		free(msg);
 		return (ret < 0) ? ret : KNOT_EOK;
 	}
-	
+
 	/* 2) Store changesets, (TODO: but do not commit???). */
 	ret = zones_store_changesets_to_disk(zone, chgsets);
 	if (ret != KNOT_EOK) {
@@ -1706,7 +1706,7 @@ static int zones_process_update_auth(knot_zone_t *zone,
 		free(msg);
 		return ret;
 	}
-	
+
 	/* 3) Switch zone contents. */
 	knot_zone_retain(zone); /* Retain pointer for safe RCU unlock. */
 	rcu_read_unlock();      /* Unlock for switch. */
@@ -1727,23 +1727,23 @@ static int zones_process_update_auth(knot_zone_t *zone,
 	}
 
 	/* 4) Cleanup. */
-	
+
 	xfrin_cleanup_successful_update(&chgsets->changes);
-	
+
 	/* Free changesets, but not the data. */
 	knot_free_changesets(&chgsets);
 	assert(ret == KNOT_EOK);
 	log_zone_info("%s: Finished.\n", msg);
-	
+
 	free(msg);
 	msg = NULL;
-	
+
 	/*
 	 * \NEW DDNS PROCESSING ------------------------------------------------
 	 */
-	
-	
-//	/* 1) Process the incoming packet, prepare 
+
+
+//	/* 1) Process the incoming packet, prepare
 //	 *    prerequisities and changeset.
 //	 */
 //	dbg_zones_verb("Processing UPDATE packet.\n");
@@ -1751,14 +1751,14 @@ static int zones_process_update_auth(knot_zone_t *zone,
 //	ret = knot_ns_process_update(knot_packet_query(resp),
 //				     knot_zone_contents(zone),
 //				     &chgsets->sets[0], rcode);
-	
+
 //	if (ret != KNOT_EOK) {
 //		log_zone_error("%s %s\n", msg, knot_strerror(ret));
 //		knot_free_changesets(&chgsets);
 //		free(msg);
 //		return ret;
 //	}
-	
+
 //	/* 2) Save changeset to journal.
 //	 *    Apply changeset to zone.
 //	 *    Commit changeset to journal.
@@ -1768,13 +1768,13 @@ static int zones_process_update_auth(knot_zone_t *zone,
 //	knot_zone_retain(zone); /* Retain pointer for safe RCU unlock. */
 //	rcu_read_unlock();      /* Unlock for switch. */
 //	dbg_zones_verb("Storing and applying changesets.\n");
-//	ret = zones_store_and_apply_chgsets(chgsets, zone, &contents_new, msg, 
+//	ret = zones_store_and_apply_chgsets(chgsets, zone, &contents_new, msg,
 //					    XFR_TYPE_UPDATE);
 //	rcu_read_lock();        /* Relock */
 //	knot_zone_release(zone);/* Release held pointer. */
 //	free(msg);
 //	msg = NULL;
-	
+
 //	/* Changesets should be freed by now. */
 //	if (ret != KNOT_EOK) {
 //		dbg_zones_verb("Storing and applying changesets failed: %s.\n",
@@ -1801,10 +1801,10 @@ static int zones_process_update_auth(knot_zone_t *zone,
 		 * to already existing buffer. */
 		memcpy(resp_wire, tmp_wire, *rsize);
 	}
-	
+
 	dbg_zones("DDNS reply rsize = %zu\n", *rsize);
-	
-	
+
+
 	return ret;
 }
 
@@ -1822,7 +1822,7 @@ int zones_update_db_from_config(const conf_t *conf, knot_nameserver_t *ns,
 
 	/* Lock RCU to ensure none will deallocate any data under our hands. */
 	rcu_read_lock();
-	
+
 	/* Grab a pointer to the old database */
 	if (ns->zone_db == NULL) {
 		rcu_read_unlock();
@@ -1841,17 +1841,17 @@ int zones_update_db_from_config(const conf_t *conf, knot_nameserver_t *ns,
 	log_server_info("Loading %d zones...\n", conf->zones_count);
 
 	/* Insert all required zones to the new zone DB. */
-	/*! \warning RCU must not be locked as some contents switching will 
+	/*! \warning RCU must not be locked as some contents switching will
 	             be required. */
 	int inserted = zones_insert_zones(ns, &conf->zones, db_new);
-	
+
 	log_server_info("Loaded %d out of %d zones.\n", inserted,
 	                conf->zones_count);
 
 	if (inserted != conf->zones_count) {
 		log_server_warning("Not all the zones were loaded.\n");
 	}
-	
+
 	/* Lock RCU to ensure none will deallocate any data under our hands. */
 	rcu_read_lock();
 	*db_old = ns->zone_db;
@@ -1874,13 +1874,13 @@ int zones_update_db_from_config(const conf_t *conf, knot_nameserver_t *ns,
 	 * All other have been loaded again so that the old must be destroyed.
 	 */
 	int ret = zones_remove_zones(db_new, *db_old);
-	
+
 	/* Heal zonedb index. */
 	hattrie_build_index(db_new->zone_tree);
-	
+
 	/* Unlock RCU, messing with any data will not affect us now */
 	rcu_read_unlock();
-	
+
 	if (ret != KNOT_EOK) {
 		return ret;
 	}
@@ -1947,7 +1947,7 @@ int zones_zonefile_sync(knot_zone_t *zone, journal_t *journal)
 			rcu_read_unlock();
 			return ret;
 		}
-		
+
 		/* Update journal entries. */
 		dbg_zones_verb("zones: unmarking all dirty nodes "
 		               "in '%s' journal\n",
@@ -2214,7 +2214,7 @@ int zones_normal_query_answer(knot_nameserver_t *nameserver,
 				               digest, &digest_size,
 				               tsig_key_zone, tsig_rcode,
 				               tsig_prev_time_signed);
-				
+
 				free(digest);
 
 				dbg_zones_detail("answer_size = %zu\n",
@@ -2285,7 +2285,7 @@ int zones_normal_query_answer(knot_nameserver_t *nameserver,
 					    tsig_rdata_mac_length(tsig),
 					    digest, &digest_size, tsig_key_zone,
 					    tsig_rcode, tsig_prev_time_signed);
-					
+
 					// no need to keep the digest
 					free(digest);
 
@@ -2328,7 +2328,7 @@ int zones_process_update(knot_nameserver_t *nameserver,
 	knot_tsig_key_t *tsig_key_zone = NULL;
 	uint16_t tsig_rcode = 0;
 	uint64_t tsig_prev_time_signed = 0;
-	const knot_rrset_t *tsig_rr = NULL; 
+	const knot_rrset_t *tsig_rr = NULL;
 
 	// Parse rest of the query, prepare response, find zone
 	int ret = knot_ns_prep_update_response(nameserver, query, &resp, &zone,
@@ -2384,7 +2384,7 @@ int zones_process_update(knot_nameserver_t *nameserver,
 			return ret;
 		}
 	}
-	
+
 	/*
 	 * 1) DDNS Zone Section check (RFC2136, Section 3.1).
 	 */
@@ -2427,14 +2427,14 @@ int zones_process_update(knot_nameserver_t *nameserver,
 		                                        query, rcode,
 		                                        resp_wire, rsize);
 	}
-	
+
 	/* No response, no signing required or FORMERR. */
 	if (*rsize == 0 || !tsig_rr || rcode == KNOT_RCODE_FORMERR) {
 		knot_packet_free(&resp);
 		rcu_read_unlock();
 		return ret;
 	}
-	
+
 	/* Just add TSIG RR on most errors. */
 	if (tsig_rcode != 0 && tsig_rcode != KNOT_RCODE_BADTIME) {
 		ret = knot_tsig_add(resp_wire, rsize, rsize_max,
@@ -2466,7 +2466,7 @@ int zones_process_update(knot_nameserver_t *nameserver,
 
 /*----------------------------------------------------------------------------*/
 
-int zones_process_response(knot_nameserver_t *nameserver, 
+int zones_process_response(knot_nameserver_t *nameserver,
                            int exp_msgid,
                            sockaddr_t *from,
                            knot_packet_t *packet, uint8_t *response_wire,
@@ -2476,7 +2476,7 @@ int zones_process_response(knot_nameserver_t *nameserver,
 	    response_wire == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Declare no response. */
 	*rsize = 0;
 
@@ -2485,7 +2485,7 @@ int zones_process_response(knot_nameserver_t *nameserver,
 	 * Reset REFRESH timer on finish.
 	 */
 	if (knot_packet_qtype(packet) == KNOT_RRTYPE_SOA) {
-		
+
 		if (knot_packet_rcode(packet) != KNOT_RCODE_NOERROR) {
 			/*! \todo Handle error response. */
 			return KNOT_ERROR;
@@ -2525,16 +2525,16 @@ int zones_process_response(knot_nameserver_t *nameserver,
 			rcu_read_unlock();
 			return KNOT_ERROR;
 		}
-		
+
 		/* No updates available. */
 		if (ret == 0) {
 			zones_schedule_refresh(zone);
 			rcu_read_unlock();
 			return KNOT_EUPTODATE;
 		}
-		
+
 		assert(ret > 0);
-		
+
 		/* Check zone transfer state. */
 		pthread_mutex_lock(&zd->lock);
 		if (zd->xfr_in.state == XFR_PENDING) {
@@ -2544,7 +2544,7 @@ int zones_process_response(knot_nameserver_t *nameserver,
 		} else {
 			zd->xfr_in.state = XFR_PENDING;
 		}
-		
+
 		/* Prepare XFR client transfer. */
 		server_t *srv = (server_t *)knot_ns_get_data(nameserver);
 		int rqtype = zones_transfer_to_use(zd);
@@ -2578,7 +2578,7 @@ knot_ns_xfr_type_t zones_transfer_to_use(zonedata_t *data)
 	if (data == NULL || data->ixfr_db == NULL) {
 		return XFR_TYPE_AIN;
 	}
-	
+
 	return XFR_TYPE_IIN;
 }
 
@@ -2603,7 +2603,7 @@ static int zones_open_free_filename(const char *old_name, char **new_name)
 		free(*new_name);
 		*new_name = NULL;
 	}
-	
+
 	return fd;
 }
 
@@ -2620,7 +2620,7 @@ static int zones_dump_zone_text(knot_zone_contents_t *zone, const char *fname)
 		                 "storage of the transferred zone.\n");
 		return KNOT_ERROR;
 	}
-	
+
 	FILE *f = fdopen(fd, "w");
 	if (f == NULL) {
 		log_zone_warning("Failed to open file descriptor for text zone.\n");
@@ -2628,7 +2628,7 @@ static int zones_dump_zone_text(knot_zone_contents_t *zone, const char *fname)
 		free(new_fname);
 		return KNOT_ERROR;
 	}
-	
+
 	if (zone_dump_text(zone, f) != KNOT_EOK) {
 		log_zone_warning("Failed to save the transferred zone to '%s'.\n",
 		                 new_fname);
@@ -2637,7 +2637,7 @@ static int zones_dump_zone_text(knot_zone_contents_t *zone, const char *fname)
 		free(new_fname);
 		return KNOT_ERROR;
 	}
-	
+
 	/* Set zone file rights to 0640. */
 	fchmod(fd, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
 
@@ -2662,19 +2662,19 @@ static int zones_dump_zone_text(knot_zone_contents_t *zone, const char *fname)
 int zones_save_zone(const knot_ns_xfr_t *xfr)
 {
 	dbg_xfr("xfr: %s Saving new zone file.\n", xfr->msg);
-	
+
 	if (xfr == NULL || xfr->new_contents == NULL || xfr->zone == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	rcu_read_lock();
-	
+
 	zonedata_t *zd = (zonedata_t *)knot_zone_data(xfr->zone);
 	knot_zone_contents_t *new_zone = xfr->new_contents;
-	
+
 	const char *zonefile = zd->conf->file;
 	const char *zonedb = zd->conf->db;
-	
+
 	/* Check if the new zone apex dname matches zone name. */
 	knot_dname_t *cur_name = knot_dname_new_from_str(zd->conf->name,
 	                                                 strlen(zd->conf->name),
@@ -2687,9 +2687,9 @@ int zones_save_zone(const knot_ns_xfr_t *xfr)
 		rcu_read_unlock();
 		return KNOT_EINVAL;
 	}
-	
+
 	assert(zonefile != NULL && zonedb != NULL);
-	
+
 	/* dump the zone into text zone file */
 	int ret = zones_dump_zone_text(new_zone, zonefile);
 	rcu_read_unlock();
@@ -2702,7 +2702,7 @@ int zones_ns_conf_hook(const struct conf_t *conf, void *data)
 {
 	knot_nameserver_t *ns = (knot_nameserver_t *)data;
 	dbg_zones_verb("zones: reconfiguring name server.\n");
-	
+
 	/* Set NSID. */
 	knot_ns_set_nsid(ns, conf->nsid, conf->nsid_len);
 
@@ -2771,7 +2771,7 @@ static int zones_rrset_write_to_mem(const knot_rrset_t *rr, char **entry,
 		*remaining -= written;
 		*entry += written;
 	}
-	
+
 	return ret;
 }
 
@@ -2782,7 +2782,7 @@ static int zones_serialize_and_store_chgset(const knot_changeset_t *chs,
 	memcpy(entry, (char*)&chs->flags, sizeof(uint32_t));
 	entry += sizeof(uint32_t);
 	max_size -= sizeof(uint32_t);
-	
+
 	/* Serialize SOA 'from'. */
 	int ret = zones_rrset_write_to_mem(chs->soa_from, &entry, &max_size);
 	if (ret != KNOT_EOK) {
@@ -2934,7 +2934,7 @@ journal_t *zones_store_changesets_begin(knot_zone_t *zone)
 		journal_release(j);
 		j = NULL;
 	}
-	
+
 	return j;
 }
 
@@ -2945,7 +2945,7 @@ int zones_store_changesets_commit(journal_t *j)
 	if (j == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	int ret = journal_trans_commit(j);
 	journal_release(j);
 	return ret;
@@ -2958,7 +2958,7 @@ int zones_store_changesets_rollback(journal_t *j)
 	if (j == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	int ret = journal_trans_rollback(j);
 	journal_release(j);
 	return ret;
@@ -3010,27 +3010,27 @@ int zones_store_changesets(knot_zone_t *zone, knot_changesets_t *src)
 /*----------------------------------------------------------------------------*/
 
 int zones_xfr_load_changesets(knot_ns_xfr_t *xfr, uint32_t serial_from,
-                              uint32_t serial_to) 
+                              uint32_t serial_to)
 {
 	if (!xfr || !xfr->zone || !knot_zone_contents(xfr->zone)) {
 		dbg_zones_detail("Wrong parameters: xfr=%p,"
 		                " xfr->zone = %p\n", xfr, xfr->zone);
 		return KNOT_EINVAL;
 	}
-	
+
 	knot_changesets_t *chgsets = (knot_changesets_t *)
 	                               calloc(1, sizeof(knot_changesets_t));
 	CHECK_ALLOC_LOG(chgsets, KNOT_ENOMEM);
-	
+
 	int ret = ns_serial_compare(serial_to, serial_from);
 	dbg_zones_verb("Compared serials, result: %d\n", ret);
-	
+
 	/* if serial_to is not larger than serial_from, do not load anything */
 	if (ret <= 0) {
 		xfr->data = chgsets;
 		return KNOT_EOK;
 	}
-	
+
 	dbg_xfr_verb("xfr: loading changesets\n");
 	ret = zones_load_changesets(xfr->zone, chgsets,
 	                                serial_from, serial_to);
@@ -3040,7 +3040,7 @@ int zones_xfr_load_changesets(knot_ns_xfr_t *xfr, uint32_t serial_from,
 		knot_free_changesets(&chgsets);
 		return ret;
 	}
-	
+
 	xfr->data = chgsets;
 	return KNOT_EOK;
 }
@@ -3056,7 +3056,7 @@ int zones_create_and_save_changesets(const knot_zone_t *old_zone,
 		          "NULL arguments.\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	knot_ns_xfr_t xfr;
 	memset(&xfr, 0, sizeof(xfr));
 	xfr.zone = (knot_zone_t *)old_zone;
@@ -3085,7 +3085,7 @@ int zones_create_and_save_changesets(const knot_zone_t *old_zone,
 			return KNOT_ERROR;
 		}
 	}
-	
+
 	xfr.data = changesets;
 	journal_t *journal = zones_store_changesets_begin(xfr.zone);
 	if (journal == NULL) {
@@ -3093,28 +3093,28 @@ int zones_create_and_save_changesets(const knot_zone_t *old_zone,
 		          "Could not start journal operation.\n");
 		return KNOT_ERROR;
 	}
-	
+
 	ret = zones_store_changesets(xfr.zone, (knot_changesets_t *)xfr.data);
 	if (ret != KNOT_EOK) {
 		zones_store_changesets_rollback(journal);
 		dbg_zones("zones: create_changesets: "
 		          "Could not store in the journal. Reason: %s.\n",
 		          knot_strerror(ret));
-		
+
 		return ret;
 	}
-	
+
 	ret = zones_store_changesets_commit(journal);
 	if (ret != KNOT_EOK) {
 		dbg_zones("zones: create_changesets: "
 		          "Could not commit to journal. Reason: %s.\n",
 		          knot_strerror(ret));
-		
+
 		return ret;
 	}
-	
+
 	knot_free_changesets(&changesets);
-	
+
 	return KNOT_EOK;
 }
 
@@ -3230,7 +3230,7 @@ int zones_schedule_notify(knot_zone_t *zone)
 			continue;
 		}
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -3296,7 +3296,7 @@ int zones_process_update_response(knot_ns_xfr_t *data, uint8_t *rwire, size_t *r
 	} else {
 		ret = KNOT_EOK;
 	}
-	
+
 	/* As it is a response, do not reply back. */
 	*rsize = 0;
 	return ret;
@@ -3311,7 +3311,7 @@ int zones_verify_tsig_query(const knot_packet_t *query,
 	assert(key != NULL);
 	assert(rcode != NULL);
 	assert(tsig_rcode != NULL);
-	
+
 	const knot_rrset_t *tsig_rr = knot_packet_tsig(query);
 	if (tsig_rr == NULL) {
 		dbg_zones("TSIG key required, but not in query - REFUSED.\n");
diff --git a/src/knot/server/zones.h b/src/knot/server/zones.h
index 6d6a21db8a688377bc488f82ca45be2080242f56..26880bf2743ac6afbbbff04111625e96356ae82b 100644
--- a/src/knot/server/zones.h
+++ b/src/knot/server/zones.h
@@ -59,7 +59,7 @@ typedef struct zonedata_t
 
 	/*! \brief Zone data lock for exclusive access. */
 	pthread_mutex_t lock;
-	
+
 	/*! \brief Access control lists. */
 	acl_t *xfr_out;    /*!< ACL for xfr-out.*/
 	acl_t *notify_in;  /*!< ACL for notify-in.*/
@@ -170,7 +170,7 @@ int zones_process_update(knot_nameserver_t *nameserver,
  * \retval KNOT_EINVAL on invalid parameters or packet.
  * \retval KNOT_EMALF if an error occured and the response is not valid.
  */
-int zones_process_response(knot_nameserver_t *nameserver, 
+int zones_process_response(knot_nameserver_t *nameserver,
                            int exp_msgid,
                            sockaddr_t *from,
                            knot_packet_t *packet, uint8_t *response_wire,
diff --git a/src/knot/stat/gatherer.h b/src/knot/stat/gatherer.h
index 62b393997c749acb538976165d20b02b8d36ff40..0bb68297541d0df19d013d2fba190be296e8ac9f 100644
--- a/src/knot/stat/gatherer.h
+++ b/src/knot/stat/gatherer.h
@@ -19,7 +19,7 @@
  * \author Jan Kadlec <jan.kadlec@nic.cz>
  *
  * \brief Contains gatherer structure and its API.
- * 
+ *
  * \addtogroup statistics
  * @{
  */
@@ -55,7 +55,7 @@ struct flow_data {
 typedef struct flow_data flow_data_t;
 
 /*!
- * \brief Gatherer structure, used for gathering statistics from 
+ * \brief Gatherer structure, used for gathering statistics from
  *        multiple threads.
  */
 struct gatherer {
diff --git a/src/knot/zone/semantic-check.c b/src/knot/zone/semantic-check.c
index f0b62acc425b58b8de7ad797bce153a1dcdbf536..08e5e918c4d42782b85fe0dd9abc856378cf4b4b 100644
--- a/src/knot/zone/semantic-check.c
+++ b/src/knot/zone/semantic-check.c
@@ -2,7 +2,7 @@
 #include <stdint.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <netinet/in.h>	
+#include <netinet/in.h>
 #include <arpa/inet.h>
 
 #include "knot/common.h"
@@ -111,7 +111,7 @@ err_handler_t *handler_new(int log_cname, int log_glue, int log_rrsigs,
 	err_handler_t *handler = xmalloc(sizeof(err_handler_t));
 
 	memset(handler->errors, 0, sizeof(uint) * (-ZC_ERR_UNKNOWN + 1));
-	
+
 	handler->error_count = 0;
 	handler->options.log_cname = log_cname;
 	handler->options.log_glue = log_glue;
@@ -139,10 +139,10 @@ static void log_error_from_node(err_handler_t *handler,
 		log_zone_warning("Unknown error.\n");
 		return;
 	}
-	
+
 	char buffer[1024] = {0};
 	size_t offset = 0;
-	
+
 	if (node != NULL) {
 		handler->error_count++;
 		char *name =
@@ -180,8 +180,8 @@ int err_handler_handle_error(err_handler_t *handler, const knot_node_t *node,
 		return KNOT_EINVAL;
 	}
 
-	/* 
-	 * A missing SOA can only occur once, so there needn't be 
+	/*
+	 * A missing SOA can only occur once, so there needn't be
 	 * an option for it.
 	 */
 
@@ -252,45 +252,45 @@ static int check_cname_cycles_in_zone(knot_zone_contents_t *zone,
 	    rrset->type != KNOT_RRTYPE_DNAME) {
 		return KNOT_EINVAL;
 	}
-	
+
 	const knot_rrset_t *next_rrset = rrset;
 	assert(rrset);
 	const knot_node_t *next_node = NULL;
 
 	uint i = 0;
-	
+
 	if (knot_rrset_rdata_rr_count(rrset) == 0) {
 		return KNOT_EOK;
 	}
-	
+
 	const knot_dname_t *next_dname =
 		knot_rrset_rdata_cname_name(rrset);
 	/* (cname_name == dname_target) */
 	assert(next_dname);
-	
+
 	/* Check wildcard pointing to itself. */
 	if (knot_dname_is_wildcard(knot_rrset_owner(rrset))) {
 		/* We need to chop the wildcard. */
-		
+
 		knot_dname_t *chopped_wc =
 			knot_dname_left_chop(knot_rrset_owner(rrset));
 		if (!chopped_wc) {
 			/* Definitely not a cycle. */
 			return KNOT_EOK;
 		}
-		
+
 		/*
 		 * And check that no sub-dname up to zone apex is present
 		 * in its rdata.
 		 */
-		
+
 		knot_dname_t *next_dname_copy =
 			knot_dname_deep_copy(next_dname);
 		if (!next_dname_copy) {
 			knot_dname_free(&chopped_wc);
 			return KNOT_ERROR;
 		}
-		
+
 		const knot_dname_t *zone_origin =
 			knot_node_owner(knot_zone_contents_apex(zone));
 		if (!zone_origin) {
@@ -298,10 +298,10 @@ static int check_cname_cycles_in_zone(knot_zone_contents_t *zone,
 			knot_dname_free(&next_dname_copy);
 			return KNOT_ERROR;
 		}
-		
+
 		char error_found = 0;
 		char cut_offs = 1;
-		
+
 		while (knot_dname_compare(next_dname_copy,
 		                          zone_origin) != 0 &&
 		       !error_found) {
@@ -315,10 +315,10 @@ static int check_cname_cycles_in_zone(knot_zone_contents_t *zone,
 				knot_dname_free(&chopped_wc);
 				return KNOT_EOK;
 			}
-			
+
 			knot_dname_t *tmp_chopped =
 				knot_dname_left_chop(next_dname_copy);
-			if (!tmp_chopped && 
+			if (!tmp_chopped &&
 				!(knot_dname_is_fqdn(next_dname_copy) &&
 			          knot_dname_label_count(next_dname_copy) == 0)) {
 				knot_dname_free(&chopped_wc);
@@ -332,12 +332,12 @@ static int check_cname_cycles_in_zone(knot_zone_contents_t *zone,
 				break;
 			}
 			knot_dname_free(&next_dname_copy);
-			
+
 			cut_offs++;
-			
+
 			next_dname_copy = tmp_chopped;
 		}
-		
+
 		if (error_found) {
 			knot_dname_free(&next_dname_copy);
 			knot_dname_free(&chopped_wc);
@@ -345,18 +345,18 @@ static int check_cname_cycles_in_zone(knot_zone_contents_t *zone,
 			*fatal_error = 1;
 			return ZC_ERR_CNAME_WILDCARD_SELF;
 		}
-		
+
 		knot_dname_free(&next_dname_copy);
 		knot_dname_free(&chopped_wc);
-		
+
 		/*
 		 * Test for transitive wildcard loops.
 		 * Basically the same as below, only we look for wildcards and
 		 * strip them in the same fashion as above.
 		 */
-		
+
 	}
-	
+
 	while (i < MAX_CNAME_CYCLE_DEPTH && next_dname != NULL) {
 		next_node = knot_zone_contents_get_node(zone, next_dname);
 		if (next_node == NULL) {
@@ -364,12 +364,12 @@ static int check_cname_cycles_in_zone(knot_zone_contents_t *zone,
 				knot_zone_contents_get_nsec3_node(zone,
 			                                          next_dname);
 		}
-		
+
 /*!< \todo #1887 this might replace some of the code above. */
 //		/* Still NULL, try wildcards. */
 //		if (next_node == NULL && knot_dname_is_wildcard(next_dname)) {
 //			/* We can only use the wildcard so many times. */
-			
+
 //			/* Create chopped copy of wc. */
 //			knot_dname_t *chopped_wc =
 //				knot_dname_left_chop(next_dname);
@@ -383,7 +383,7 @@ static int check_cname_cycles_in_zone(knot_zone_contents_t *zone,
 //				knot_dname_free(&chopped_wc);
 //			}
 //		}
-		
+
 		/* Just a guess. */
 		knot_dname_t *chopped_next =
 			knot_dname_left_chop(next_dname);
@@ -399,13 +399,13 @@ static int check_cname_cycles_in_zone(knot_zone_contents_t *zone,
 				knot_dname_free(&chopped_next);
 				return KNOT_ENOMEM;
 			}
-			
+
 			if (knot_dname_cat(wc, chopped_next) == NULL) {
 				knot_dname_free(&chopped_next);
 				knot_dname_free(&wc);
 				return KNOT_ERROR;
 			}
-			
+
 			next_node =
 				knot_zone_contents_get_node(zone, wc);
 			knot_dname_free(&wc);
@@ -413,7 +413,7 @@ static int check_cname_cycles_in_zone(knot_zone_contents_t *zone,
 			chopped_next = knot_dname_left_chop(chopped_next);
 			knot_dname_free(&tmp);
 		}
-		
+
 		knot_dname_free(&chopped_next);
 
 		if (next_node != NULL) {
@@ -545,7 +545,7 @@ static int check_rrsig_rdata(err_handler_t *handler,
 	/* Compare algorithm, key tag and signer's name with DNSKEY rrset
 	 * one of the records has to match. Signer name has been checked
 	 * before */
-	
+
 	int match = 0;
 	uint8_t rrsig_alg = knot_rrset_rdata_rrsig_algorithm(rrsig, rr_pos);
 	uint16_t key_tag_rrsig = knot_rrset_rdata_rrsig_key_tag(rrsig, rr_pos);
@@ -556,7 +556,7 @@ static int check_rrsig_rdata(err_handler_t *handler,
 		if (rrsig_alg != dnskey_alg) {
 			continue;
 		}
-		
+
 		/* Get DNSKEY key wire. */ /* TODO key only or what? see below.*/
 		uint16_t key_size = 0;
 		uint8_t *key = NULL;
@@ -567,13 +567,13 @@ static int check_rrsig_rdata(err_handler_t *handler,
 		if (key_tag_rrsig != dnskey_key_tag) {
 			continue;
 		}
-		
+
 		/* Final step - check DNSKEY validity. TODO should be checked elsewhere. */
 		if (check_dnskey_rdata(dnskey_rrset, i) == KNOT_EOK) {
 			match = 1;
 		}
 	}
-	
+
 	if (!match) {
 		err_handler_handle_error(handler, node, ZC_ERR_RRSIG_NO_RRSIG,
 		                         NULL);
@@ -603,7 +603,7 @@ static int check_rrsig_in_rrset(err_handler_t *handler,
 	    dnskey_rrset == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Prepare additional info string. */
 	char info_str[50];
 	int ret = snprintf(info_str, sizeof(info_str), "Record type: %d.",
@@ -611,7 +611,7 @@ static int check_rrsig_in_rrset(err_handler_t *handler,
 	if (ret < 0 || ret >= sizeof(info_str)) {
 		return KNOT_ENOMEM;
 	}
-	
+
 	assert(dnskey_rrset && rrset);
 
 	const knot_rrset_t *rrsigs = knot_rrset_rrsigs(rrset);
@@ -656,7 +656,7 @@ static int check_rrsig_in_rrset(err_handler_t *handler,
 		/* Nothing to check, and should not happen. */
 		return KNOT_EOK;
 	}
-	
+
 	for (uint16_t i = 0; i < knot_rrset_rdata_rr_count(rrsigs); ++i) {
 		int ret = check_rrsig_rdata(handler, node, rrsigs, i, rrset,
 		                            dnskey_rrset);
@@ -665,7 +665,7 @@ static int check_rrsig_in_rrset(err_handler_t *handler,
 			             knot_strerror(ret));
 		}
 	}
-	
+
 	int all_signed =
 		knot_rrset_rdata_rr_count(rrset) == knot_rrset_rdata_rr_count(rrsigs);
 	if (!all_signed) {
@@ -709,7 +709,7 @@ static int rdata_nsec_to_type_array(const knot_rrset_t *rrset, size_t pos,
 {
 	assert(*array == NULL);
 	assert(rrset->type == KNOT_RRTYPE_NSEC || rrset->type == KNOT_RRTYPE_NSEC3);
-	
+
 	uint8_t *data = NULL;
 	uint16_t rr_bitmap_size = 0;
 	if (rrset->type == KNOT_RRTYPE_NSEC) {
@@ -720,7 +720,7 @@ static int rdata_nsec_to_type_array(const knot_rrset_t *rrset, size_t pos,
 	if (data == NULL) {
 		return KNOT_EMALF;
 	}
-	
+
 	*count = 0;
 	int increment = 0;
 	for (int i = 0; i < rr_bitmap_size; i += increment) {
@@ -867,7 +867,7 @@ static int check_nsec3_node_in_zone(knot_zone_contents_t *zone,
 	/* This is why we allocate maximum length of decoded string + 1 */
 //	memmove(next_dname_decoded + 1, next_dname_decoded, real_size);
 //	next_dname_decoded[0] = real_size;
-	
+
 	/* Local allocation, will be discarded. */
 	knot_dname_t *next_dname =
 		knot_dname_new_from_str((char *)next_dname_decoded,
@@ -877,10 +877,10 @@ static int check_nsec3_node_in_zone(knot_zone_contents_t *zone,
 		log_zone_warning("Could not create new dname!\n");
 		return KNOT_ERROR;
 	}
-	
+
 	free(next_dname_decoded);
 	knot_dname_to_lower(next_dname);
-	
+
 	if (knot_dname_cat(next_dname,
 		     knot_node_owner(knot_zone_contents_apex(zone))) == NULL) {
 		log_zone_warning("Could not concatenate dnames!\n");
@@ -896,7 +896,7 @@ static int check_nsec3_node_in_zone(knot_zone_contents_t *zone,
 
 	/* Directly discard. */
 	knot_dname_free(&next_dname);
-	
+
 	size_t arr_size;
 	uint16_t *array = NULL;
 	/* TODO only works for one NSEC3 RR. */
@@ -907,7 +907,7 @@ static int check_nsec3_node_in_zone(knot_zone_contents_t *zone,
 		             knot_strerror(ret));
 		return ret;
 	}
-	
+
 	uint16_t type = 0;
 	for (int j = 0; j < arr_size; j++) {
 		/* test for each type's presence */
@@ -915,7 +915,7 @@ static int check_nsec3_node_in_zone(knot_zone_contents_t *zone,
 		if (type == KNOT_RRTYPE_RRSIG) {
 		       continue;
 		}
-		
+
 		if (knot_node_rrset(node,
 				      type) == NULL) {
 			err_handler_handle_error(handler, node,
@@ -923,13 +923,13 @@ static int check_nsec3_node_in_zone(knot_zone_contents_t *zone,
 			                         NULL);
 		}
 	}
-	
+
 	/* Check that the node only contains NSEC3 and RRSIG. */
 	const knot_rrset_t **rrsets = knot_node_rrsets_no_copy(nsec3_node);
 	if (rrsets == NULL) {
 		return KNOT_ENOMEM;
 	}
-	
+
 	for (int i = 0; i < knot_node_rrset_count(nsec3_node); i++) {
 		uint16_t type = knot_rrset_type(rrsets[i]);
 		if (!(type == KNOT_RRTYPE_NSEC3 ||
@@ -1030,13 +1030,13 @@ static int sem_check_node_mandatory(knot_zone_contents_t *zone,
 			                         ZC_ERR_CNAME_EXTRA_RECORDS,
 			                         NULL);
 		}
-		
+
 		if (node->children != 0) {
 			/*
 			 * With DNSSEC and node being zone apex,
 			 * NSEC3 and its RRSIG can be present.
 			 */
-			
+
 			/* The NSEC3 tree can thus only have one node. */
 			struct sem_check_param param;
 			param.node_count = 0;
@@ -1064,7 +1064,7 @@ static int sem_check_node_mandatory(knot_zone_contents_t *zone,
 			}
 		}
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -1093,7 +1093,7 @@ static int sem_check_node_optional(knot_zone_contents_t *zone,
 
 		const knot_node_t *glue_node =
 				knot_zone_contents_find_node(zone, ns_dname);
-		
+
 		if (knot_dname_is_subdomain(ns_dname,
 			      knot_node_owner(knot_zone_contents_apex(zone)))) {
 			if (glue_node == NULL) {
@@ -1104,17 +1104,17 @@ static int sem_check_node_optional(knot_zone_contents_t *zone,
 					knot_dname_free(&ns_dname);
 					return KNOT_ENOMEM;
 				}
-				
+
 				knot_dname_left_chop_no_copy(ns_dname);
-		
+
 				if (knot_dname_cat(wildcard,
 				                   ns_dname) == NULL) {
 					knot_dname_free(&ns_dname);
 					knot_dname_free(&wildcard);
 					return KNOT_ENOMEM;
 				}
-				
-				const knot_node_t *wildcard_node = 
+
+				const knot_node_t *wildcard_node =
 					knot_zone_contents_find_node(zone,
 				                                     wildcard);
 				if (wildcard_node == NULL) {
@@ -1131,7 +1131,7 @@ static int sem_check_node_optional(knot_zone_contents_t *zone,
 								 ZC_ERR_GLUE_RECORD,
 								 NULL);
 					}
-				}	
+				}
 				knot_dname_free(&wildcard);
 			} else {
 				if ((knot_node_rrset(glue_node,
@@ -1173,7 +1173,7 @@ int sem_check_node_plain(knot_zone_contents_t *zone,
 		/* Determine level for our own. */
 		do_checks = (zone_is_secure(zone) ? 2 : 1);
 	}
-	
+
 	if (only_mandatory == 1) {
 		/* Check CNAME and DNAME, else no-op. */
 		return sem_check_node_mandatory(zone, node, do_checks, handler,
@@ -1242,7 +1242,7 @@ static int semantic_checks_dnssec(knot_zone_contents_t *zone,
 				/* check NSEC/NSEC3 bitmap */
 				size_t count;
 				uint16_t *array = NULL;
-				
+
 				int ret = rdata_nsec_to_type_array(nsec_rrset,
 				                                   0,
 				                                   &array,
@@ -1355,7 +1355,7 @@ static void do_checks_in_tree(knot_node_t *node, void *data)
 	knot_node_t **last_node = (knot_node_t **)args->arg5;
 
 	err_handler_t *handler = (err_handler_t *)args->arg6;
-	
+
 	char do_checks = *((char *)(args->arg3));
 
 	if (do_checks) {
@@ -1400,14 +1400,14 @@ int zone_do_sem_checks(knot_zone_contents_t *zone, int do_checks,
 	knot_zone_contents_tree_apply_inorder(zone,
 			   do_checks_in_tree,
 			   (void *)&arguments);
-	
+
 	if (fatal_error) {
 		return KNOT_ERROR;
 	}
-	
+
 	log_cyclic_errors_in_zone(handler, zone, last_node, first_nsec3_node,
 	                          last_nsec3_node, do_checks);
-	
+
 	return KNOT_EOK;
 }
 
diff --git a/src/knot/zone/zone-load.c b/src/knot/zone/zone-load.c
index 74a694fd273947e49ae5ece78d8499a1902c0ae7..499b4d83274b6fe495c91b29923a33d4a74a03c2 100644
--- a/src/knot/zone/zone-load.c
+++ b/src/knot/zone/zone-load.c
@@ -55,7 +55,7 @@ static int rrset_list_add(rrset_list_t **head, knot_rrset_t *rrsig)
 		tmp->data = rrsig;
 		*head = tmp;
 	}
-	
+
 	dbg_zp_verb("zp: rrset_add: Added RRSIG %p to list.\n", rrsig);
 
 	return KNOT_EOK;
@@ -80,7 +80,7 @@ static void rrset_list_delete(rrset_list_t **head)
 	}
 
 	*head = NULL;
-	
+
 	dbg_zp("zp: list_delete: List deleleted.\n");
 }
 
@@ -121,9 +121,9 @@ static int find_rrset_for_rrsig_in_node(knot_zone_contents_t *zone,
 			return KNOT_ERROR;
 		}
 	}
-	
+
 	assert(tmp_rrset);
-	
+
 	if (tmp_rrset->ttl != rrsig->ttl) {
 		char *name = knot_dname_to_str(tmp_rrset->owner);
 		assert(name);
@@ -166,7 +166,7 @@ static knot_node_t *create_node(knot_zone_contents_t *zone,
 		               knot_strerror(ret));
 		return NULL;
 	}
-	
+
 	assert(current_rrset->owner == node->owner);
 
 	return node;
@@ -224,7 +224,7 @@ static size_t calculate_item_size(const knot_rrset_t *rrset,
 			        scanner->r_data_blocks[i];
 		}
 	}
-	
+
 	return size;
 }
 
@@ -234,16 +234,16 @@ static int add_rdata_to_rr(knot_rrset_t *rrset, const scanner_t *scanner)
 		dbg_zp("zp: add_rdata_to_rr: No RRSet.\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	parser_context_t *parser = scanner->data;
-	
+
 	const rdata_descriptor_t *desc =
 		get_rdata_descriptor(knot_rrset_type(rrset));
 	assert(desc);
-	
+
 	dbg_zp_detail("zp: add_rdata_to_rr: Adding type %d, RRSet has %d RRs.\n",
 	              rrset->type, rrset->rdata_count);
-	
+
 	size_t rdlen = calculate_item_size(rrset, scanner);
 	size_t offset = 0;
 	uint8_t *rdata = knot_rrset_create_rdata(rrset, rdlen);
@@ -251,7 +251,7 @@ static int add_rdata_to_rr(knot_rrset_t *rrset, const scanner_t *scanner)
 		dbg_zp("zp: create_rdata: Could not create RR.\n");
 		return KNOT_ENOMEM;
 	}
-	
+
 	for (int i = 0; desc->block_types[i] != KNOT_RDATA_WF_END; i++) {
 		int item = desc->block_types[i];
 		if (descriptor_item_is_dname(item)) {
@@ -294,7 +294,7 @@ dbg_zp_exec_detail(
 			          scanner->r_data_blocks[i];
 		}
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -310,23 +310,23 @@ static void process_rr(const scanner_t *scanner)
 	knot_zone_contents_t *contents = parser->current_zone;
 	knot_dname_t *current_owner = NULL;
 	knot_rrset_t *current_rrset = NULL;
-    	if (parser->last_node &&
-    	    (scanner->r_owner_length == parser->last_node->owner->size) &&
-    	    (strncmp((char *)parser->last_node->owner->name,
-    	            (char *)scanner->r_owner, scanner->r_owner_length) == 0)) {
-    		// no need to create new dname;
-    		current_owner = parser->last_node->owner;
+	if (parser->last_node &&
+	    (scanner->r_owner_length == parser->last_node->owner->size) &&
+	    (strncmp((char *)parser->last_node->owner->name,
+		    (char *)scanner->r_owner, scanner->r_owner_length) == 0)) {
+		// no need to create new dname;
+		current_owner = parser->last_node->owner;
 		knot_dname_retain(current_owner);
-    	} else {
-    		current_owner = 
-    			knot_dname_new_from_wire(scanner->r_owner,
-    			                         scanner->r_owner_length,
-    			                         NULL);
-	    	if (current_owner == NULL) {
+	} else {
+		current_owner =
+			knot_dname_new_from_wire(scanner->r_owner,
+						 scanner->r_owner_length,
+						 NULL);
+		if (current_owner == NULL) {
 			parser->ret = KNOT_ERROR;
 			return;
 		}
-        	knot_dname_to_lower(current_owner);
+		knot_dname_to_lower(current_owner);
 		/*!< \todo
 		 * If name is already in the table, we might not need to create
 		 * dname object, just compare wires.
@@ -334,30 +334,30 @@ static void process_rr(const scanner_t *scanner)
 		knot_zone_contents_insert_dname_into_table(&current_owner,
 		                                           parser->lookup_tree);
 	}
-	
+
 	/*!< \todo Do not create RRSet each time - merging needs to be sorted though. */
 	current_rrset = knot_rrset_new(current_owner,
 	               scanner->r_type,
 	               scanner->r_class,
 	               scanner->r_ttl);
 	knot_dname_release(current_owner);
-	
+
 	assert(current_owner);
 	assert(current_rrset);
 	parser->current_rrset = current_rrset;
-	
+
 	int ret = add_rdata_to_rr(current_rrset, scanner);
 	if (ret != KNOT_EOK) {
 		log_zone_error("Cannot add RDATA to zone, load failed.\n");
 		parser->ret = ret;
 		return;
 	}
-	
+
 	dbg_zp_verb("zp: process_rr: Processing type: %d.\n",
 	            parser->current_rrset->type);
 
 	assert(current_rrset->rdata_count);
-	
+
 	/* Node add/get functions. */
 	int (*node_add_func)(knot_zone_contents_t *, knot_node_t *, int,
 	                     uint8_t);
@@ -431,12 +431,12 @@ static void process_rr(const scanner_t *scanner)
 				                       parser->last_node);
 				rrset_list_delete(&parser->node_rrsigs);
 			}
-			
+
 			/* The node might however been created previously. */
 			parser->last_node =
 				knot_zone_contents_get_node(contents,
 					knot_rrset_owner(current_rrset));
-			
+
 			if (parser->last_node == NULL) {
 				/* Try NSEC3 tree. */
 				if (current_rrset->type == KNOT_RRTYPE_NSEC3 ||
@@ -448,7 +448,7 @@ static void process_rr(const scanner_t *scanner)
 								current_rrset));
 				}
 			}
-			
+
 			if (parser->last_node == NULL) {
 				/* Still NULL, node has to be created. */
 				if ((parser->last_node = create_node(contents,
@@ -471,12 +471,12 @@ static void process_rr(const scanner_t *scanner)
 			parser->ret = KNOT_ERROR;
 			return;
 		}
-		
+
 		dbg_zp_verb("zp: process_rr: RRSIG proccesed successfully.\n");
 		parser->ret = KNOT_EOK;
 		return;
 	}
-	
+
 	/*! \todo Move RRSIG and RRSet handling to funtions. */
 	assert(current_rrset->type != KNOT_RRTYPE_RRSIG);
 
@@ -519,13 +519,13 @@ static void process_rr(const scanner_t *scanner)
 			return;
 		}
 	}
-	
+
 	if (current_rrset->type != KNOT_RRTYPE_RRSIG) {
 		/*
 		 * If there's already an RRSet of this type in a node, check
-		 * that TTLs are the same, if not, give warning a change TTL. 
+		 * that TTLs are the same, if not, give warning a change TTL.
 		 */
-		const knot_rrset_t *rrset_in_node =        
+		const knot_rrset_t *rrset_in_node =
 			knot_node_rrset(node, current_rrset->type);
 		if (rrset_in_node &&
 		    current_rrset->ttl != rrset_in_node->ttl) {
@@ -535,7 +535,7 @@ static void process_rr(const scanner_t *scanner)
 			/* Actual change will happen in merge. */
 		}
 	}
-	
+
 	ret = knot_zone_contents_add_rrset(contents, current_rrset,
 	                                   &node,
 	                                   KNOT_RRSET_DUPL_MERGE);
@@ -567,40 +567,40 @@ static void process_rr(const scanner_t *scanner)
 		parser->ret = KNOT_EMALF;
 		return;
 	}
-	
+
 	parser->last_node = node;
-	
+
 	dbg_zp_verb("zp: process_rr: RRSet %p processed successfully.\n",
 	            parser->current_rrset);
 	parser->ret = KNOT_EOK;
 }
 
-int knot_zload_open(zloader_t **dst, const char *source, const char *origin, 
+int knot_zload_open(zloader_t **dst, const char *source, const char *origin,
                     int semantic_checks)
 {
 	if (!dst || !source || !origin) {
 		dbg_zload("zload: open: Bad arguments.\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	*dst = NULL;
-	
+
 	/* Check zone file. */
 	struct stat st;
 	if (stat(source, &st) < 0) {
 		return knot_map_errno(errno);
 	}
-	
+
 	/* Create context. */
 	parser_context_t *context = xmalloc(sizeof(parser_context_t));
-	
+
 	/* Create trie for DNAME duplicits. */
 	context->lookup_tree = hattrie_create();
 	if (context->lookup_tree == NULL) {
 		free(context);
 		return KNOT_ENOMEM;
 	}
-	
+
 	context->origin_from_config =
 		knot_dname_new_from_str(origin, strlen(origin), NULL);
 	assert(context->origin_from_config);
@@ -615,7 +615,7 @@ int knot_zload_open(zloader_t **dst, const char *source, const char *origin,
 	context->current_zone = knot_zone_get_contents(zone);
 	context->node_rrsigs = NULL;
 	context->ret = KNOT_EOK;
-	
+
 	/* Create file loader. */
 	file_loader_t *loader = file_loader_create(source, origin,
 	                                           KNOT_CLASS_IN, 3600,
@@ -627,17 +627,17 @@ int knot_zload_open(zloader_t **dst, const char *source, const char *origin,
 		free(context);
 		return KNOT_ERROR;
 	}
-	
+
 	/* Allocate new loader. */
 	zloader_t *zl = xmalloc(sizeof(zloader_t));
-	
+
 	zl->source = strdup(source);
 	zl->origin = strdup(origin);
 	zl->file_loader = loader;
 	zl->context = context;
 	zl->semantic_checks = semantic_checks;
 	*dst = zl;
-	
+
 	/* Log all information for now - possibly more config options. */
 	zl->err_handler = handler_new(1, 1, 1, 1, 1);
 	if (zl->err_handler == NULL) {
@@ -646,9 +646,9 @@ int knot_zload_open(zloader_t **dst, const char *source, const char *origin,
 		                 "Semantic check skipped for zone %s\n",
 		                 origin);
 	}
-	
+
 	context->err_handler = zl->err_handler;
-	
+
 	return KNOT_EOK;
 }
 
@@ -659,7 +659,7 @@ knot_zone_t *knot_zload_load(zloader_t *loader)
 		dbg_zload("zload: load: NULL loader!\n");
 		return NULL;
 	}
-	
+
 	parser_context_t *c = loader->context;
 	assert(c);
 	file_loader_process(loader->file_loader);
@@ -672,7 +672,7 @@ knot_zone_t *knot_zload_load(zloader_t *loader)
 		rrset_list_delete(&c->node_rrsigs);
 		return NULL;
 	}
-	
+
 	if (loader->file_loader->scanner->error_counter > 0) {
 		log_zone_error("Zone could not be loaded due to %"PRIu64" errors"
 		               " encountered.\n",
@@ -684,13 +684,13 @@ knot_zone_t *knot_zload_load(zloader_t *loader)
 		knot_zone_free(&zone_to_free);
 		return NULL;
 	}
-	
+
 	knot_node_t *first_nsec3_node = NULL;
 	knot_node_t *last_nsec3_node = NULL;
 	rrset_list_delete(&c->node_rrsigs);
 	knot_zone_contents_adjust(c->current_zone, &first_nsec3_node,
 	                          &last_nsec3_node, 0);
-	
+
 	if (loader->semantic_checks) {
 		int check_level = 1;
 		const knot_rrset_t *soa_rr =
@@ -713,7 +713,7 @@ knot_zone_t *knot_zload_load(zloader_t *loader)
 		log_zone_info("Semantic checks completed for zone=%s\n", zname);
 		free(zname);
 	}
-	
+
 	return c->current_zone->zone;
 }
 
@@ -722,9 +722,9 @@ void knot_zload_close(zloader_t *loader)
 	if (!loader) {
 		return;
 	}
-	
+
 	hattrie_free(loader->context->lookup_tree);
-	
+
 	file_loader_free(loader->file_loader);
 
 	free(loader->source);
diff --git a/src/libknot/consts.h b/src/libknot/consts.h
index 49c4124b5d2d1e11cf8dfa2b6da1fe228aa933ea..e2b3a828d096d1e2494c1e310301f002ac63de05 100644
--- a/src/libknot/consts.h
+++ b/src/libknot/consts.h
@@ -197,7 +197,7 @@ extern knot_lookup_table_t knot_tsig_alg_domain_names[];
  *
  * \param algorithm Algorithm code to be used.
  *
- * \retval Digest length for given algorithm. 
+ * \retval Digest length for given algorithm.
  */
 size_t knot_tsig_digest_length(const uint8_t algorithm);
 
@@ -206,7 +206,7 @@ size_t knot_tsig_digest_length(const uint8_t algorithm);
  *
  * \param algorithm Algorithm code to be used.
  *
- * \retval Digest length for given algorithm. 
+ * \retval Digest length for given algorithm.
  */
 size_t knot_ds_digest_length(const uint8_t algorithm);
 
diff --git a/src/libknot/dname.c b/src/libknot/dname.c
index b0f9be06cbb20f638720b2a6b0e6688f8ed89bbf..f1afed8fabf2412f58d8ef6fc615e3686d4437ce 100644
--- a/src/libknot/dname.c
+++ b/src/libknot/dname.c
@@ -179,7 +179,7 @@ static int knot_dname_str_to_wire(const char *name, uint size,
 
 	while (ch - (const uint8_t *)name < size) {
 		assert(w - wire - 1 == ch - (const uint8_t *)name);
-		
+
 		if (*ch == '.') {
 			/* Zero-length label inside a dname - invalid. */
 			if (label_length == 0) {
@@ -719,7 +719,7 @@ char *knot_dname_to_str(const knot_dname_t *dname)
 		}
 
 		label_len--;
-	} 
+	}
 
 	// String_termination.
 	name[str_len] = 0;
@@ -734,7 +734,7 @@ int knot_dname_to_lower(knot_dname_t *dname)
 	if (dname == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	for (int i = 0; i < dname->size; ++i) {
 		dname->name[i] = knot_tolower(dname->name[i]);
 	}
@@ -743,13 +743,13 @@ int knot_dname_to_lower(knot_dname_t *dname)
 
 /*----------------------------------------------------------------------------*/
 
-int knot_dname_to_lower_copy(const knot_dname_t *dname, char *name, 
+int knot_dname_to_lower_copy(const knot_dname_t *dname, char *name,
                              size_t size)
 {
 	if (dname == NULL || name == NULL || size < dname->size) {
 		return KNOT_EINVAL;
 	}
-	
+
 	for (int i = 0; i < dname->size; ++i) {
 		name[i] = knot_tolower(dname->name[i]);
 	}
@@ -819,7 +819,7 @@ dbg_dname_exec_detail(
 			       : -1);
 	}
 );
-	
+
 	if (node && knot_node_zone(node)
 	    && knot_zone_contents(knot_node_zone(node))
 	    && knot_zone_contents_gen_is_new(knot_zone_contents(
@@ -878,28 +878,28 @@ knot_dname_t *knot_dname_left_chop(const knot_dname_t *dname)
 		 (knot_dname_is_fqdn(dname)))) {
 		return NULL;
 	}
-	
+
 	knot_dname_t *parent = knot_dname_new();
 	if (parent == NULL) {
 		return NULL;
 	}
-	
+
 	// last label, the result should be root domain
 	if (dname->label_count == 1) {
 		dbg_dname_verb("Chopping last label.\n");
 		parent->label_count = 0;
-		
+
 		parent->name = (uint8_t *)malloc(1);
 		if (parent->name == NULL) {
 			ERR_ALLOC_FAILED;
 			knot_dname_free(&parent);
 			return NULL;
 		}
-		
+
 		*parent->name = 0;
-		
+
 		parent->size = 1;
-		
+
 		return parent;
 	}
 
@@ -920,7 +920,7 @@ knot_dname_t *knot_dname_left_chop(const knot_dname_t *dname)
 	}
 
 	memcpy(parent->name, &dname->name[dname->name[0] + 1], parent->size);
-	
+
 
 	short first_label_length = dname->labels[1];
 
@@ -1205,4 +1205,3 @@ knot_dname_t *knot_dname_cat(knot_dname_t *d1, const knot_dname_t *d2)
 
 	return d1;
 }
-
diff --git a/src/libknot/dname.h b/src/libknot/dname.h
index 4e11cb7f82856d6fd7cf1cb741f74df12ab98d34..6d300b4153fabfecb8ba8d67e22444e8a21b5699 100644
--- a/src/libknot/dname.h
+++ b/src/libknot/dname.h
@@ -206,7 +206,7 @@ char *knot_dname_to_str(const knot_dname_t *dname);
 
 int knot_dname_to_lower(knot_dname_t *dname);
 
-int knot_dname_to_lower_copy(const knot_dname_t *dname, char *name, 
+int knot_dname_to_lower_copy(const knot_dname_t *dname, char *name,
                              size_t size);
 
 /*!
diff --git a/src/libknot/edns.c b/src/libknot/edns.c
index 0c952e280e56605a4f5208ac64d57b6fdc3a87d7..51b7b63feab98dca9bdc335cbe2623ae72607f19 100644
--- a/src/libknot/edns.c
+++ b/src/libknot/edns.c
@@ -197,8 +197,8 @@ int knot_edns_new_from_rr(knot_opt_rr_t *opt_rr,
 			pos += 4 + opt_size;
 		}
 	}
-	
-	
+
+
 	dbg_edns_verb("EDNS created.\n");
 
 	return KNOT_EOK;
diff --git a/src/libknot/nameserver/name-server.c b/src/libknot/nameserver/name-server.c
index 4baf5884d10ecdbe2c7dd2f2cbe3ec25614fd2a9..54c29772db7a41eceac5dce86816213f5273a570 100644
--- a/src/libknot/nameserver/name-server.c
+++ b/src/libknot/nameserver/name-server.c
@@ -134,7 +134,7 @@ static knot_rrset_t *ns_synth_from_wildcard(
 		dbg_ns("ns: ns_synth_from_wildcard: Could not copy RRSet.\n");
 		return NULL;
 	}
-	
+
 	knot_dname_t *dname_copy = knot_dname_deep_copy(qname);
 	knot_rrset_set_owner(rrset, dname_copy);
 	knot_dname_release(dname_copy);
@@ -278,7 +278,7 @@ static int ns_follow_cname(const knot_node_t **node,
 		   wildcard name with qname */
 
 		assert(cname_rrset != NULL);
-		
+
 		dbg_ns_detail("CNAME RRSet: %p, owner: %p\n", cname_rrset,
 		              cname_rrset->owner);
 
@@ -345,10 +345,10 @@ static int ns_follow_cname(const knot_node_t **node,
 				return ret;
 			}
 		}
-		
+
 		dbg_ns_detail("Using RRSet: %p, owner: %p\n", rrset,
 		              rrset->owner);
-		
+
 dbg_ns_exec_verb(
 		char *name = knot_dname_to_str(knot_rrset_owner(rrset));
 		dbg_ns("CNAME record for owner %s put to response.\n", name);
@@ -497,7 +497,7 @@ dbg_ns_exec_verb(
 		knot_rrset_t *rrset2 = rrset;
 		if (rrset != NULL && knot_rrset_rdata_rr_count(rrset)) {
 			dbg_ns_verb("Found RRSet of type %u\n", type);
-			
+
 			ret = ns_check_wildcard(name, resp, &rrset2);
 			if (ret != KNOT_EOK) {
 				dbg_ns("Failed to process wildcard.\n");
@@ -570,7 +570,7 @@ dbg_ns_exec_detail(
 );
 		assert(dname != NULL);
 		node = knot_dname_node(dname);
-		
+
 		dbg_ns_detail("Node saved in RDATA dname: %p\n", node);
 		if (node != NULL && node->owner != dname) {
 			// the stored node should be the wildcard covering the
@@ -889,10 +889,10 @@ static int ns_put_nsec3_from_node(const knot_node_t *node,
 		// bad zone, ignore
 		return KNOT_EOK;
 	}
-	
+
 	int res = KNOT_EOK;
 	if (knot_rrset_rdata_rr_count(rrset)) {
-		res = knot_response_add_rrset_authority(resp, rrset, 1, 1, 0, 
+		res = knot_response_add_rrset_authority(resp, rrset, 1, 1, 0,
 		                                        1);
 	}
 	// add RRSIG for the RRSet
@@ -939,7 +939,7 @@ static int ns_put_covering_nsec3(const knot_zone_contents_t *zone,
 		// if run-time collision => SERVFAIL
 		return KNOT_EOK;
 	}
-	
+
 dbg_ns_exec_verb(
 	char *name = knot_dname_to_str(prev->owner);
 	dbg_ns_verb("Covering NSEC3 node: %s\n", name);
@@ -1177,7 +1177,7 @@ static int ns_put_nsec_nsec3_nodata(const knot_zone_contents_t *zone,
 	} else {
 		dbg_ns_verb("Adding NSEC for NODATA\n");
 		if ((rrset = knot_node_get_rrset(node, KNOT_RRTYPE_NSEC))
-		    != NULL 
+		    != NULL
 		    && knot_rrset_rdata_rr_count(rrset)) {
 			dbg_ns_detail("Putting the RRSet to Authority\n");
 			ret = knot_response_add_rrset_authority(resp, rrset, 1,
@@ -1229,12 +1229,12 @@ static int ns_put_nsec_nxdomain(const knot_dname_t *qname,
 		/*! \todo Check version. */
 		previous = knot_zone_contents_find_previous(zone, qname);
 		assert(previous != NULL);
-		
+
 		while (!knot_node_is_auth(previous)) {
 			previous = knot_node_previous(previous);
 		}
 	}
-	
+
 dbg_ns_exec_verb(
 	char *name = knot_dname_to_str(previous->owner);
 	dbg_ns_verb("Previous node: %s\n", name);
@@ -1247,7 +1247,7 @@ dbg_ns_exec_verb(
 		// no NSEC records
 		//return NS_ERR_SERVFAIL;
 		return KNOT_EOK;
-		
+
 	}
 
 	int ret = knot_response_add_rrset_authority(resp, rrset, 1, 0, 0, 1);
@@ -1434,7 +1434,7 @@ static int ns_put_nsec3_wildcard(const knot_zone_contents_t *zone,
 	if (!knot_zone_contents_nsec3_enabled(zone)) {
 		return KNOT_EOK;
 	}
-	
+
 	/*
 	 * NSEC3 that covers the "next closer" name.
 	 */
@@ -1482,10 +1482,10 @@ static int ns_put_nsec_wildcard(const knot_zone_contents_t *zone,
 	       && knot_query_dnssec_requested(knot_packet_query(resp)));
 
 	// check if we have previous; if not, find one using the tree
-	if (previous == NULL) {		
+	if (previous == NULL) {
 		previous = knot_zone_contents_find_previous(zone, qname);
 		assert(previous != NULL);
-		
+
 		while (!knot_node_is_auth(previous)) {
 			previous = knot_node_previous(previous);
 		}
@@ -1659,9 +1659,9 @@ static inline int ns_referral(const knot_node_t *node,
 
 	// Special handling of DS queries
 	if (qtype == KNOT_RRTYPE_DS) {
-		knot_rrset_t *ds_rrset = knot_node_get_rrset(node, 
+		knot_rrset_t *ds_rrset = knot_node_get_rrset(node,
 		                                             KNOT_RRTYPE_DS);
-		
+
 		if (ds_rrset) {
 			ret = knot_response_add_rrset_answer(resp, ds_rrset, 1,
 			                                     0, 0, 1);
@@ -1675,25 +1675,25 @@ static inline int ns_referral(const knot_node_t *node,
 		} else {
 			// normal NODATA response
 			/*! \todo Handle in some generic way. */
-			
+
 			dbg_ns_verb("Adding NSEC/NSEC3 for NODATA.\n");
 			ret = ns_put_nsec_nsec3_nodata(zone, node, resp);
 			if (ret != KNOT_EOK) {
 				return ret;
 			}
-			
+
 			ret = ns_put_authority_soa(zone, resp);
 		}
 
 		// This is an authoritative answer, set AA bit
 		knot_response_set_aa(resp);
-		
+
 		return ret;
 	}
-	
+
 	knot_rrset_t *rrset = knot_node_get_rrset(node, KNOT_RRTYPE_NS);
 	assert(rrset != NULL);
-	
+
 	ret = knot_response_add_rrset_authority(resp, rrset, 1, 0, 0, 1);
 	if (ret == KNOT_EOK) {
 		ret = ns_add_rrsigs(rrset, resp, node->owner,
@@ -1905,7 +1905,7 @@ dbg_ns_exec(
 		knot_dname_release(cname);
 		return NULL;
 	}
-	
+
 	/* Store DNAME into RDATA. */
 	memcpy(cname_rdata, &cname, sizeof(knot_dname_t *));
 
@@ -2338,7 +2338,7 @@ int ns_response_to_wire(knot_packet_t *resp, uint8_t *wire,
 	} else {
 		dbg_ns("Using the same space or wire format.\n");
 	}
-	
+
 	*wire_size = rsize;
 
 	return KNOT_EOK;
@@ -2365,7 +2365,7 @@ static int ns_error_response_to_wire(knot_packet_t *resp, uint8_t *wire,
 	 * This is ideal, we just truncate the packet after the question.
 	 */
 	dbg_ns_verb("Creating error response.\n");
-	
+
 	size_t rsize = knot_packet_question_size(knot_packet_query(resp));
 	dbg_ns_detail("Error response (~ query) size: %zu\n", rsize);
 
@@ -2379,7 +2379,7 @@ static int ns_error_response_to_wire(knot_packet_t *resp, uint8_t *wire,
 	}
 
 	assert(rwire != wire);
-	
+
 	/*! \todo Why is this copied?? Why we cannot use resp->wireformat?? */
 	memcpy(wire, rwire, rsize);
 
@@ -2407,7 +2407,7 @@ typedef struct ns_axfr_params {
 
 /*----------------------------------------------------------------------------*/
 
-int knot_ns_tsig_required(int packet_nr) 
+int knot_ns_tsig_required(int packet_nr)
 {
 	dbg_ns_verb("ns_tsig_required(%d): %d\n", packet_nr,
 	            (packet_nr % KNOT_NS_TSIG_FREQ == 0));
@@ -2430,11 +2430,11 @@ static int ns_xfr_send_and_clear(knot_ns_xfr_t *xfr, int add_tsig)
 	if (ns_response_to_wire(xfr->response, xfr->wire, &real_size) != 0) {
 		return NS_ERR_SERVFAIL;
 	}
-	
+
 	int res = 0;
-	
+
 	size_t digest_real_size = xfr->digest_max_size;
-	
+
 	dbg_ns_detail("xfr->tsig_key=%p\n", xfr->tsig_key);
 	dbg_ns_detail("xfr->tsig_rcode=%d\n", xfr->tsig_rcode);
 
@@ -2456,8 +2456,8 @@ static int ns_xfr_send_and_clear(knot_ns_xfr_t *xfr, int add_tsig)
 			              xfr->digest, xfr->digest_size, xfr->digest,
 			              digest_real_size, xfr->tsig_key);
 			res = knot_tsig_sign(xfr->wire, &real_size,
-			               xfr->wire_size, xfr->digest, 
-			               xfr->digest_size, xfr->digest, 
+			               xfr->wire_size, xfr->digest,
+			               xfr->digest_size, xfr->digest,
 			               &digest_real_size,
 			               xfr->tsig_key, xfr->tsig_rcode,
 			               xfr->tsig_prev_time_signed);
@@ -2465,10 +2465,10 @@ static int ns_xfr_send_and_clear(knot_ns_xfr_t *xfr, int add_tsig)
 			/* Add key, digest and digest length. */
 			dbg_ns_detail("Calling tsig_sign_next()\n");
 			res = knot_tsig_sign_next(xfr->wire, &real_size,
-			                          xfr->wire_size, 
+			                          xfr->wire_size,
 			                          xfr->digest,
 			                          xfr->digest_size,
-			                          xfr->digest, 
+			                          xfr->digest,
 			                          &digest_real_size,
 			                          xfr->tsig_key, xfr->tsig_data,
 			                          xfr->tsig_data_size);
@@ -2480,7 +2480,7 @@ static int ns_xfr_send_and_clear(knot_ns_xfr_t *xfr, int add_tsig)
 		if (res != KNOT_EOK) {
 			return res;
 		}
-	
+
 		assert(digest_real_size > 0);
 		// save the new previous digest size
 		xfr->digest_size = digest_real_size;
@@ -2522,7 +2522,7 @@ static int ns_xfr_send_and_clear(knot_ns_xfr_t *xfr, int add_tsig)
 	// Clean the response structure
 	dbg_ns_verb("Clearing response structure..\n");
 	knot_response_clear(xfr->response, 0);
-	
+
 	// increment the packet number
 	++xfr->packet_nr;
 	if ((xfr->tsig_key && knot_ns_tsig_required(xfr->packet_nr))
@@ -2596,7 +2596,7 @@ rrset:
 		if (ret == KNOT_ESPACE) {
 			// TODO: send the packet and clean the structure
 			dbg_ns("Packet full, sending..\n");
-			ret = ns_xfr_send_and_clear(params->xfr, 
+			ret = ns_xfr_send_and_clear(params->xfr,
 				knot_ns_tsig_required(params->xfr->packet_nr));
 			if (ret != KNOT_EOK) {
 				// some wierd problem, we should end
@@ -2669,7 +2669,7 @@ static int ns_axfr_from_zone(knot_zone_contents_t *zone, knot_ns_xfr_t *xfr)
 	params.ret = KNOT_EOK;
 
 	xfr->packet_nr = 0;
-	
+
 	/*
 	 * First SOA
 	 */
@@ -2723,7 +2723,7 @@ static int ns_axfr_from_zone(knot_zone_contents_t *zone, knot_ns_xfr_t *xfr)
 	ret = knot_response_add_rrset_answer(xfr->response, soa_rrset, 0, 0, 1,
 	                                     0);
 	if (ret == KNOT_ESPACE) {
-			
+
 		// if there is not enough space, send the response and
 		// add the SOA record to a new packet
 		dbg_ns("Packet full, sending..\n");
@@ -2823,7 +2823,7 @@ static int ns_ixfr_from_zone(knot_ns_xfr_t *xfr)
 	assert(xfr->data != NULL);
 
 	rcu_read_lock();
-	
+
 	knot_changesets_t *chgsets = (knot_changesets_t *)xfr->data;
 	knot_zone_contents_t *contents = knot_zone_get_contents(xfr->zone);
 	assert(contents);
@@ -2832,7 +2832,7 @@ static int ns_ixfr_from_zone(knot_ns_xfr_t *xfr)
 		                    KNOT_RRTYPE_SOA);
 
 	// 4) put the zone SOA as the first Answer RR
-	int res = knot_response_add_rrset_answer(xfr->response, zone_soa, 0, 
+	int res = knot_response_add_rrset_answer(xfr->response, zone_soa, 0,
 	                                         0, 0, 0);
 	if (res != KNOT_EOK) {
 		dbg_ns("IXFR query cannot be answered: %s.\n",
@@ -2919,7 +2919,7 @@ static int knot_ns_prepare_response(knot_packet_t *query, knot_packet_t **resp,
                                     size_t max_size, int copy_question)
 {
 	assert(max_size >= 500);
-	
+
 	// initialize response packet structure
 	*resp = knot_packet_new(KNOT_PACKET_PREALLOC_RESPONSE);
 	if (*resp == NULL) {
@@ -3104,19 +3104,19 @@ void knot_ns_set_nsid(knot_nameserver_t *nameserver, const char *nsid, size_t le
 		dbg_ns("NS: set_nsid: nameserver=NULL.\n");
 		return;
 	}
-	
+
 	if (nsid == NULL) {
 		/* This is fine. */
 		return;
 	}
-	
+
 	int ret = knot_ns_replace_nsid(nameserver->opt_rr, nsid, len);
 
 	if (ret != KNOT_EOK) {
 		dbg_ns("NS: set_nsid: could not add EDNS option.\n");
 		return;
 	}
-	
+
 	dbg_ns_verb("NS: set_nsid: added successfully.\n");
 }
 
@@ -3273,19 +3273,19 @@ int knot_ns_error_response_from_query(const knot_nameserver_t *nameserver,
 			/*
 			 * At this point, the wireformat of query may be in the
 			 * same place where the response is assembled. This does
-			 * not matter before this point, although the query 
+			 * not matter before this point, although the query
 			 * wireformat is rewritten. Now we just need to copy
 			 * the original Question section. So if the pointers are
-			 * the same, we may just leave it and increase the 
+			 * the same, we may just leave it and increase the
 			 * response wire size. Otherwise we must copy the data.
 			 */
 			if (response_wire != knot_packet_wireformat(query)) {
 				memcpy(response_wire + KNOT_WIRE_HEADER_SIZE,
-				       knot_packet_wireformat(query) 
+				       knot_packet_wireformat(query)
 				       + KNOT_WIRE_HEADER_SIZE, question_size);
 			}
 			*rsize += question_size;
-			
+
 			// adjust QDCOUNT
 			knot_wire_set_qdcount(response_wire, 1);
 		}
@@ -3384,7 +3384,7 @@ int knot_ns_prep_normal_response(knot_nameserver_t *nameserver,
 	size_t resp_max_size = 0;
 
 	knot_packet_dump(query);
-	
+
 	if (max_size > 0) {
 		// if TCP is used, buffer size is the only constraint
 		assert(max_size > 0);
@@ -3591,7 +3591,7 @@ dbg_ns_exec_verb(
 
 /*----------------------------------------------------------------------------*/
 
-int knot_ns_answer_normal(knot_nameserver_t *nameserver, 
+int knot_ns_answer_normal(knot_nameserver_t *nameserver,
                           const knot_zone_t *zone, knot_packet_t *resp,
                           uint8_t *response_wire, size_t *rsize, int check_any)
 {
@@ -3690,13 +3690,13 @@ int knot_ns_init_xfr(knot_nameserver_t *nameserver, knot_ns_xfr_t *xfr)
 
 	ret = knot_packet_parse_rest(xfr->query, 0);
 	if (ret != KNOT_EOK) {
-		dbg_ns("Failed to parse rest of the query: %s\n", 
+		dbg_ns("Failed to parse rest of the query: %s\n",
 		       knot_strerror(ret));
 		xfr->rcode = (ret == KNOT_EMALF) ? KNOT_RCODE_FORMERR
 		                                 : KNOT_RCODE_SERVFAIL;
 		return ret;
 	}
-	
+
 dbg_ns_exec_verb(
 	dbg_ns_verb("Parsed XFR query:\n");
 	knot_packet_dump(xfr->query);
@@ -3727,8 +3727,8 @@ dbg_ns_exec(
 );
 	knot_zone_retain(zone);
 	xfr->zone = zone;
-	
-	
+
+
 	return KNOT_EOK;
 }
 
@@ -3742,7 +3742,7 @@ int knot_ns_init_xfr_resp(knot_nameserver_t *nameserver, knot_ns_xfr_t *xfr)
 		knot_ns_error_response_from_query(nameserver, xfr->query,
 		                                  KNOT_RCODE_SERVFAIL,
 		                                  xfr->wire, &xfr->wire_size);
-		ret = xfr->send(xfr->session, &xfr->addr, xfr->wire, 
+		ret = xfr->send(xfr->session, &xfr->addr, xfr->wire,
 		                xfr->wire_size);
 		return ret;
 	}
@@ -3758,14 +3758,14 @@ int knot_ns_init_xfr_resp(knot_nameserver_t *nameserver, knot_ns_xfr_t *xfr)
 		knot_ns_error_response_from_query(nameserver, xfr->query,
 		                                  KNOT_RCODE_SERVFAIL,
 		                                  xfr->wire, &xfr->wire_size);
-		int res = xfr->send(xfr->session, &xfr->addr, xfr->wire, 
+		int res = xfr->send(xfr->session, &xfr->addr, xfr->wire,
 		                    xfr->wire_size);
 		knot_packet_free(&resp);
 		return res;
 	}
 
 	xfr->response = resp;
-	
+
 	assert(knot_packet_qtype(xfr->response) == KNOT_RRTYPE_AXFR ||
 	       knot_packet_qtype(xfr->response) == KNOT_RRTYPE_IXFR);
 	return ret;
@@ -3777,36 +3777,36 @@ int ns_serial_compare(uint32_t s1, uint32_t s2)
 {
 	int32_t diff = ns_serial_difference(s1, s2);
 	return (s1 == s2) /* s1 equal to s2 */
-	        ? 0 
-	        :((diff >= 1 && diff < ((uint32_t)1 << 31)) 
+	        ? 0
+	        :((diff >= 1 && diff < ((uint32_t)1 << 31))
 	           ? 1	/* s1 larger than s2 */
 	           : -1); /* s1 less than s2 */
 }
 
 /*----------------------------------------------------------------------------*/
 
-int ns_ixfr_load_serials(const knot_ns_xfr_t *xfr, uint32_t *serial_from, 
+int ns_ixfr_load_serials(const knot_ns_xfr_t *xfr, uint32_t *serial_from,
                          uint32_t *serial_to)
 {
-	if (xfr == NULL || xfr->zone == NULL || serial_from == NULL 
+	if (xfr == NULL || xfr->zone == NULL || serial_from == NULL
 	    || serial_to == NULL) {
 		dbg_ns("Wrong parameters: xfr=%p,"
 		       " xfr->zone = %p\n", xfr, xfr->zone);
 		return KNOT_EINVAL;
 	}
-	
+
 	const knot_zone_t *zone = xfr->zone;
 	const knot_zone_contents_t *contents = knot_zone_contents(zone);
 	if (!contents) {
 		dbg_ns("Missing contents\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	if (knot_zone_contents_apex(contents) == NULL) {
 		dbg_ns("No apex.\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	const knot_rrset_t *zone_soa =
 		knot_node_rrset(knot_zone_contents_apex(contents),
 		                  KNOT_RRTYPE_SOA);
@@ -3814,22 +3814,22 @@ int ns_ixfr_load_serials(const knot_ns_xfr_t *xfr, uint32_t *serial_from,
 		dbg_ns("No SOA.\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	if (knot_packet_nscount(xfr->query) < 1) {
 		dbg_ns("No Authority record.\n");
 		return KNOT_EMALF;
 	}
-	
+
 	if (knot_packet_authority_rrset(xfr->query, 0) == NULL) {
 		dbg_ns("Authority record missing.\n");
 		return KNOT_ERROR;
 	}
-	
+
 	// retrieve origin (xfr) serial and target (zone) serial
 	*serial_to = knot_rrset_rdata_soa_serial(zone_soa);
 	*serial_from =
 		knot_rrset_rdata_soa_serial(knot_packet_authority_rrset(xfr->query, 0));
-	
+
 	return KNOT_EOK;
 }
 
@@ -3840,7 +3840,7 @@ int knot_ns_xfr_send_error(const knot_nameserver_t *nameserver,
 {
 	/*! \todo Handle TSIG errors differently. */
 	knot_response_set_rcode(xfr->response, rcode);
-	
+
 	int ret = 0;
 	if ((ret = ns_xfr_send_and_clear(xfr, 1)) != KNOT_EOK
 	    || xfr->response == NULL) {
@@ -3850,7 +3850,7 @@ int knot_ns_xfr_send_error(const knot_nameserver_t *nameserver,
 		                                  xfr->wire, &size);
 		ret = xfr->send(xfr->session, &xfr->addr, xfr->wire, size);
 	}
-	
+
 	return ret;
 }
 
@@ -3861,9 +3861,9 @@ int knot_ns_answer_axfr(knot_nameserver_t *nameserver, knot_ns_xfr_t *xfr)
 	if (xfr == NULL || nameserver == NULL || xfr->zone == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	rcu_read_lock();
-	
+
 	// take the contents and answer from them
 	int ret = 0;
 	knot_zone_contents_t *contents = knot_zone_get_contents(xfr->zone);
@@ -3876,13 +3876,13 @@ int knot_ns_answer_axfr(knot_nameserver_t *nameserver, knot_ns_xfr_t *xfr)
 		knot_packet_free(&xfr->response);
 		return ret;
 	}
-	
+
 	/*
 	 * The TSIG data should already be stored in 'xfr'.
 	 * Now just count the expected size of the TSIG RR and save it
 	 * to the response structure.
 	 */
-	
+
 	/*! \todo [TSIG] Get the TSIG size from some API function. */
 	if (xfr->tsig_size > 0) {
 		dbg_ns_verb("Setting TSIG size in packet: %zu\n",
@@ -3920,7 +3920,7 @@ int knot_ns_answer_ixfr(knot_nameserver_t *nameserver, knot_ns_xfr_t *xfr)
 	    || xfr->response == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	// parse rest of the packet (we need the Authority record)
 	int ret = knot_packet_parse_rest(xfr->query, 0);
 	if (ret != KNOT_EOK) {
@@ -3938,19 +3938,19 @@ int knot_ns_answer_ixfr(knot_nameserver_t *nameserver, knot_ns_xfr_t *xfr)
 		knot_packet_free(&xfr->response);
 		return ret;
 	}
-	
+
 	/*
 	 * The TSIG data should already be stored in 'xfr'.
 	 * Now just count the expected size of the TSIG RR and save it
 	 * to the response structure. This should be optional, only if
 	 * the request contained TSIG, i.e. if there is the data in 'xfr'.
 	 */
-	
+
 	/*! \todo [TSIG] Get the TSIG size from some API function. */
 	if (xfr->tsig_size > 0) {
 		knot_packet_set_tsig_size(xfr->response, xfr->tsig_size);
 	}
-	
+
 	ret = ns_ixfr(xfr);
 
 	knot_packet_free(&xfr->response);
@@ -3967,21 +3967,21 @@ int knot_ns_process_axfrin(knot_nameserver_t *nameserver, knot_ns_xfr_t *xfr)
 	 * and the digest of the query sent to the master or the previous
 	 * digest.
 	 */
-	
+
 	dbg_ns("ns_process_axfrin: incoming packet, wire size: %zu\n",
 	       xfr->wire_size);
 	int ret = xfrin_process_axfr_packet(xfr);
 
 	if (ret > 0) { // transfer finished
 		dbg_ns("ns_process_axfrin: AXFR finished, zone created.\n");
-		
+
 		gettimeofday(&xfr->t_end, NULL);
-		
+
 		/*
 		 * Adjust zone so that node count is set properly and nodes are
 		 * marked authoritative / delegation point.
 		 */
-		xfrin_constructed_zone_t *constr_zone = 
+		xfrin_constructed_zone_t *constr_zone =
 				(xfrin_constructed_zone_t *)xfr->data;
 		knot_zone_contents_t *zone = constr_zone->contents;
 		assert(zone != NULL);
@@ -4000,13 +4000,13 @@ int knot_ns_process_axfrin(knot_nameserver_t *nameserver, knot_ns_xfr_t *xfr)
 		if (rc != KNOT_EOK) {
 			return rc;
 		}
-		
+
 		// save the zone contents to the xfr->data
 		xfr->new_contents = zone;
 		xfr->flags |= XFR_FLAG_AXFR_FINISHED;
 
 		assert(zone->nsec3_nodes != NULL);
-		
+
 		// free the structure used for processing XFR
 		assert(constr_zone->rrsigs == NULL);
 		free(constr_zone);
@@ -4017,23 +4017,23 @@ dbg_ns_exec_verb(
 		dbg_ns_verb("Zone integrity check: %d errors.\n", errs);
 );
 	}
-	
+
 	/*! \todo In case of error, shouldn't the zone be destroyed here? */
-	
+
 	return ret;
 }
 
 /*----------------------------------------------------------------------------*/
 
-int knot_ns_switch_zone(knot_nameserver_t *nameserver, 
+int knot_ns_switch_zone(knot_nameserver_t *nameserver,
                           knot_ns_xfr_t *xfr)
 {
 	if (xfr == NULL || nameserver == NULL || xfr->new_contents == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	knot_zone_contents_t *zone = (knot_zone_contents_t *)xfr->new_contents;
-	
+
 	dbg_ns("Replacing zone by new one: %p\n", zone);
 	if (zone == NULL) {
 		dbg_ns("No new zone!\n");
@@ -4054,7 +4054,7 @@ int knot_ns_switch_zone(knot_nameserver_t *nameserver,
 	} else {
 		zone->zone = z;
 	}
-	
+
 	int ret = xfrin_switch_zone(z, zone, xfr->type);
 
 dbg_ns_exec_verb(
@@ -4079,18 +4079,18 @@ dbg_ns_exec_verb(
 
 /*----------------------------------------------------------------------------*/
 
-int knot_ns_process_ixfrin(knot_nameserver_t *nameserver, 
+int knot_ns_process_ixfrin(knot_nameserver_t *nameserver,
                              knot_ns_xfr_t *xfr)
 {
 	dbg_ns("ns_process_ixfrin: incoming packet\n");
-	
+
 	/*
 	 * [TSIG] Here we assume that 'xfr' contains TSIG information
 	 * and the digest of the query sent to the master or the previous
 	 * digest.
 	 */
 	int ret = xfrin_process_ixfr_packet(xfr);
-	
+
 	if (ret == XFRIN_RES_FALLBACK) {
 		dbg_ns("ns_process_ixfrin: Fallback to AXFR.\n");
 		ret = KNOT_ENOIXFR;
@@ -4121,7 +4121,7 @@ int knot_ns_process_ixfrin(knot_nameserver_t *nameserver,
 				(knot_changesets_t **)(&xfr->data));
 			return KNOT_ENOZONE;
 		}
-		
+
 		switch (ret) {
 		case XFRIN_RES_COMPLETE:
 			break;
@@ -4133,13 +4133,13 @@ int knot_ns_process_ixfrin(knot_nameserver_t *nameserver,
 			if (apex == NULL) {
 				return KNOT_ERROR;
 			}
-			
+
 			const knot_rrset_t *zone_soa = knot_node_rrset(
 					apex, KNOT_RRTYPE_SOA);
 			if (zone_soa == NULL) {
 				return KNOT_ERROR;
 			}
-			
+
 			if (ns_serial_compare(
 			      knot_rrset_rdata_soa_serial(chgsets->first_soa),
 			      knot_rrset_rdata_soa_serial(zone_soa))
@@ -4168,22 +4168,22 @@ int knot_ns_process_ixfrin(knot_nameserver_t *nameserver,
 		} break;
 		}
 	}
-	
+
 	/*! \todo In case of error, shouldn't the zone be destroyed here? */
-	
+
 	return ret;
 }
 
 /*----------------------------------------------------------------------------*/
 /*
- * The given query is already fully parsed. But the parameter contains an 
- * already prepared response structure. 
+ * The given query is already fully parsed. But the parameter contains an
+ * already prepared response structure.
  *
  * This function should process the contents, prepare prerequisities, prepare
  * changeset and return to the caller.
  */
-int knot_ns_process_update(const knot_packet_t *query, 
-                           const knot_zone_contents_t *zone, 
+int knot_ns_process_update(const knot_packet_t *query,
+                           const knot_zone_contents_t *zone,
                            knot_changeset_t *changeset, knot_rcode_t *rcode)
 {
 	assert(knot_packet_is_query(query));
@@ -4191,7 +4191,7 @@ int knot_ns_process_update(const knot_packet_t *query,
 	dbg_ns("Processing Dynamic Update.\n");
 
 	*rcode = KNOT_RCODE_NOERROR;
-	
+
 	// 1) Check zone
 	// Already done
 //	dbg_ns_verb("Checking zone for DDNS.\n");
@@ -4254,12 +4254,12 @@ int knot_ns_process_update(const knot_packet_t *query,
  *    - If everything went OK, continue.
  * 3) Finalize the updated zone.
  *
- * NOTE: Mostly copied from xfrin_apply_changesets(). Should be refactored in 
+ * NOTE: Mostly copied from xfrin_apply_changesets(). Should be refactored in
  *       order to get rid of duplicate code.
  */
-int knot_ns_process_update2(const knot_packet_t *query, 
-                            knot_zone_contents_t *old_contents, 
-                            knot_zone_contents_t **new_contents, 
+int knot_ns_process_update2(const knot_packet_t *query,
+                            knot_zone_contents_t *old_contents,
+                            knot_zone_contents_t **new_contents,
                             knot_changesets_t *chgs, knot_rcode_t *rcode)
 {
 	/*! \todo Implement. */
@@ -4282,10 +4282,10 @@ int knot_ns_process_update2(const knot_packet_t *query,
 		*rcode = KNOT_RCODE_SERVFAIL;
 		return ret;
 	}
-	
+
 	/* 2) Apply the UPDATE and create changesets. */
 	dbg_ns_verb("Applying the UPDATE and creating changeset...\n");
-	ret = knot_ddns_process_update2(contents_copy, query, &chgs->sets[0], 
+	ret = knot_ddns_process_update2(contents_copy, query, &chgs->sets[0],
 	                                changes, rcode);
 	if (ret != KNOT_EOK) {
 		dbg_ns("Failed to apply UPDATE to the zone copy or no update"
@@ -4294,7 +4294,7 @@ int knot_ns_process_update2(const knot_packet_t *query,
 		xfrin_rollback_update(old_contents, &contents_copy, &changes);
 		return ret;
 	}
-	
+
 	dbg_ns_verb("Finalizing updated zone...\n");
 	ret = xfrin_finalize_updated_zone(contents_copy, changes);
 	if (ret != KNOT_EOK) {
@@ -4308,7 +4308,7 @@ int knot_ns_process_update2(const knot_packet_t *query,
 
 	chgs->changes = changes;
 	*new_contents = contents_copy;
-	
+
 	return KNOT_EOK;
 }
 
diff --git a/src/libknot/nameserver/name-server.h b/src/libknot/nameserver/name-server.h
index 8ddda916f36a2137f0b347fc9bb3a280df7b2835..7f36ed51892ff3134ced23bd83bd3182c6d83455 100644
--- a/src/libknot/nameserver/name-server.h
+++ b/src/libknot/nameserver/name-server.h
@@ -67,7 +67,7 @@ typedef struct knot_nameserver {
 	uint8_t *err_response;    /*!< Prepared generic error response. */
 	size_t err_resp_size;     /*!< Size of the prepared error response. */
 	knot_opt_rr_t *opt_rr;  /*!< OPT RR with the server's EDNS0 info. */
-	
+
 	void *data;
 } knot_nameserver_t;
 
@@ -92,16 +92,16 @@ typedef struct knot_ns_xfr {
 	xfr_callback_t recv;
 	int session;
 	struct timeval t_start, t_end;
-	
+
 	/*!
 	 * XFR-out: Output buffer.
 	 * XFR-in: Buffer for query or incoming packet.
 	 */
 	uint8_t *wire;
-	
-	/*! 
-	 * XFR-out: Size of the output buffer. 
-	 * XFR-in: Size of the current packet. 
+
+	/*!
+	 * XFR-out: Size of the output buffer.
+	 * XFR-in: Size of the current packet.
 	 */
 	size_t wire_size;
 	size_t wire_maxlen;
@@ -110,37 +110,37 @@ typedef struct knot_ns_xfr {
 	char* zname;
 	knot_zone_contents_t *new_contents;
 	char *msg;
-	
+
 	/*! \note [TSIG] TSIG fields */
-	/*! \brief Message(s) to sign in wireformat. 
+	/*! \brief Message(s) to sign in wireformat.
 	 *
-	 *  This field should be allocated at the start of transfer and 
+	 *  This field should be allocated at the start of transfer and
 	 *  freed at the end. During the transfer it is only rewritten.
 	 */
 	uint8_t *tsig_data;
 	size_t tsig_data_size;	/*!< Size of the message(s) in bytes */
 	size_t tsig_size;	/*!< Size of the TSIG RR wireformat in bytes.*/
 	knot_tsig_key_t *tsig_key; /*!< Associated TSIG key for signing. */
-	
+
 	uint8_t *digest;     /*!< Buffer for counting digest. */
 	size_t digest_size;  /*!< Size of the digest. */
 	size_t digest_max_size; /*!< Size of the buffer. */
-	
+
 	/*! \note [DDNS] Update forwarding fields. */
 	int fwd_src_fd;           /*!< Query originator fd. */
 	sockaddr_t fwd_addr;
 
 	uint16_t tsig_rcode;
 	uint64_t tsig_prev_time_signed;
-	
-	/*! 
+
+	/*!
 	 * \brief Number of the packet currently assembled.
 	 *
-	 * In case of XFR-in, this is not the overall number of packet, just 
+	 * In case of XFR-in, this is not the overall number of packet, just
 	 * number counted from last TSIG check.
 	 */
 	int packet_nr;
-	
+
 	hattrie_t *lookup_tree;
 } knot_ns_xfr_t;
 
@@ -256,7 +256,7 @@ int knot_ns_prep_update_response(knot_nameserver_t *nameserver,
  * \retval KNOT_EOK if a valid response was created.
  * \retval KNOT_EMALF if an error occured and the response is not valid.
  */
-int knot_ns_answer_normal(knot_nameserver_t *nameserver, 
+int knot_ns_answer_normal(knot_nameserver_t *nameserver,
                           const knot_zone_t *zone, knot_packet_t *resp,
                           uint8_t *response_wire, size_t *rsize, int check_any);
 
@@ -267,7 +267,7 @@ int knot_ns_answer_ixfr_udp(knot_nameserver_t *nameserver,
 int knot_ns_init_xfr(knot_nameserver_t *nameserver, knot_ns_xfr_t *xfr);
 int knot_ns_init_xfr_resp(knot_nameserver_t *nameserver, knot_ns_xfr_t *xfr);
 
-/*! 
+/*!
  * \brief Compares two zone serials.
  *
  * \retval < 0 if s1 is less than s2.
@@ -276,7 +276,7 @@ int knot_ns_init_xfr_resp(knot_nameserver_t *nameserver, knot_ns_xfr_t *xfr);
  */
 int ns_serial_compare(uint32_t s1, uint32_t s2);
 
-int ns_ixfr_load_serials(const knot_ns_xfr_t *xfr, uint32_t *serial_from, 
+int ns_ixfr_load_serials(const knot_ns_xfr_t *xfr, uint32_t *serial_from,
                          uint32_t *serial_to);
 
 int knot_ns_xfr_send_error(const knot_nameserver_t *nameserver,
@@ -322,11 +322,11 @@ int knot_ns_answer_ixfr(knot_nameserver_t *nameserver, knot_ns_xfr_t *xfr);
  * \param xfr Persistent transfer-specific data.
  *
  */
-int knot_ns_process_axfrin(knot_nameserver_t *nameserver, 
+int knot_ns_process_axfrin(knot_nameserver_t *nameserver,
                              knot_ns_xfr_t *xfr);
 
 /*! \todo Document me. */
-int knot_ns_switch_zone(knot_nameserver_t *nameserver, 
+int knot_ns_switch_zone(knot_nameserver_t *nameserver,
                           knot_ns_xfr_t *xfr);
 
 /*!
@@ -337,14 +337,14 @@ int knot_ns_switch_zone(knot_nameserver_t *nameserver,
  *
  * \retval KNOT_EOK If this packet was processed successfuly and another packet
  *                  is expected. (RFC1995bis, case c)
- * \retval KNOT_ENOXFR If the transfer is not taking place because server's 
+ * \retval KNOT_ENOXFR If the transfer is not taking place because server's
  *                     SERIAL is the same as this client's SERIAL. The client
  *                     should close the connection and do no further processing.
  *                     (RFC1995bis case a).
  * \retval KNOT_EAGAIN If the server could not fit the transfer into the packet.
  *                     This should happen only if UDP was used. In this case
  *                     the client should retry the request via TCP. If UDP was
- *                     not used, it should be considered that the transfer was 
+ *                     not used, it should be considered that the transfer was
  *                     malformed and the connection should be closed.
  *                     (RFC1995bis case b).
  * \retval >0 Transfer successully finished. Changesets are created and furter
@@ -353,16 +353,16 @@ int knot_ns_switch_zone(knot_nameserver_t *nameserver,
  *
  * \todo Document me.
  */
-int knot_ns_process_ixfrin(knot_nameserver_t *nameserver, 
+int knot_ns_process_ixfrin(knot_nameserver_t *nameserver,
                              knot_ns_xfr_t *xfr);
 
-int knot_ns_process_update(const knot_packet_t *query, 
-                           const knot_zone_contents_t *zone, 
+int knot_ns_process_update(const knot_packet_t *query,
+                           const knot_zone_contents_t *zone,
                            knot_changeset_t *changeset, knot_rcode_t *rcode);
 
-int knot_ns_process_update2(const knot_packet_t *query, 
-                            knot_zone_contents_t *old_contents, 
-                            knot_zone_contents_t **new_contents, 
+int knot_ns_process_update2(const knot_packet_t *query,
+                            knot_zone_contents_t *old_contents,
+                            knot_zone_contents_t **new_contents,
                             knot_changesets_t *chgs, knot_rcode_t *rcode);
 
 int knot_ns_create_forward_query(const knot_packet_t *query,
diff --git a/src/libknot/nsec3.c b/src/libknot/nsec3.c
index b2b5f22ac2cbd2a03f8b992df576ba79f6fe7e1f..74fd10774ab58b73109729bbac963b0bbd99a196 100644
--- a/src/libknot/nsec3.c
+++ b/src/libknot/nsec3.c
@@ -39,13 +39,13 @@ int knot_nsec3_params_from_wire(knot_nsec3_params_t *params,
 	}
 
 	assert(knot_rrset_type(nsec3param) == KNOT_RRTYPE_NSEC3PARAM);
-	
+
 	params->algorithm = knot_rrset_rdata_nsec3param_algorithm(nsec3param);
 	params->iterations = knot_rrset_rdata_nsec3param_iterations(nsec3param);
 	params->flags = knot_rrset_rdata_nsec3param_flags(nsec3param);
 	params->salt_length =
 		knot_rrset_rdata_nsec3param_salt_length(nsec3param);
-	
+
 	if (params->salt_length > 0) {
 		/* It is called also on reload, so we need to free if exists. */
 		if (params->salt != NULL) {
diff --git a/src/libknot/packet/packet.c b/src/libknot/packet/packet.c
index 5472ba4d3481614872a9ecee010e7eab4f4db533..27d8c7530d9c3dd6a23b0fa63500b1b4fe52d65d 100644
--- a/src/libknot/packet/packet.c
+++ b/src/libknot/packet/packet.c
@@ -46,7 +46,7 @@
 static void knot_packet_init_pointers_response(knot_packet_t *pkt)
 {
 	dbg_packet_detail("Packet pointer: %p\n", pkt);
-	
+
 	char *pos = (char *)pkt + PREALLOC_PACKET;
 
 	// put QNAME directly after the structure
@@ -71,14 +71,14 @@ static void knot_packet_init_pointers_response(knot_packet_t *pkt)
 		pkt->answer = (const knot_rrset_t **)pos;
 		pos += DEFAULT_ANCOUNT * sizeof(const knot_rrset_t *);
 	}
-	
+
 	if (DEFAULT_NSCOUNT == 0) {
 		pkt->authority = NULL;
 	} else {
 		pkt->authority = (const knot_rrset_t **)pos;
 		pos += DEFAULT_NSCOUNT * sizeof(const knot_rrset_t *);
 	}
-	
+
 	if (DEFAULT_ARCOUNT == 0) {
 		pkt->additional = NULL;
 	} else {
@@ -139,7 +139,7 @@ static void knot_packet_init_pointers_response(knot_packet_t *pkt)
 static void knot_packet_init_pointers_query(knot_packet_t *pkt)
 {
 	dbg_packet_detail("Packet pointer: %p\n", pkt);
-	
+
 	char *pos = (char *)pkt + PREALLOC_PACKET;
 
 	// put QNAME directly after the structure
@@ -163,14 +163,14 @@ static void knot_packet_init_pointers_query(knot_packet_t *pkt)
 		pkt->answer = (const knot_rrset_t **)pos;
 		pos += DEFAULT_ANCOUNT_QUERY * sizeof(const knot_rrset_t *);
 	}
-	
+
 	if (DEFAULT_NSCOUNT_QUERY == 0) {
 		pkt->authority = NULL;
 	} else {
 		pkt->authority = (const knot_rrset_t **)pos;
 		pos += DEFAULT_NSCOUNT_QUERY * sizeof(const knot_rrset_t *);
 	}
-	
+
 	if (DEFAULT_ARCOUNT_QUERY == 0) {
 		pkt->additional = NULL;
 	} else {
@@ -357,9 +357,9 @@ static int knot_packet_parse_rdata(knot_rrset_t *rr, const uint8_t *wire,
 	if (!rr || !wire || !pos || rdlength == 0) {
 		return KNOT_EINVAL;
 	}
-	
-	
-	
+
+
+
 	/*! \todo As I'm revising it, seems highly inefficient to me.
 	 *        We just need to skim through the packet,
 	 *        check if it is in valid format and store pointers to various
@@ -368,7 +368,7 @@ static int knot_packet_parse_rdata(knot_rrset_t *rr, const uint8_t *wire,
 	 *        use use the wireformat for lookup again. Compression could
 	 *        be handled in-situ without additional memory allocs...
 	 */
-	
+
 	int ret = knot_rrset_rdata_from_wire_one(rr, wire, pos, total_size,
 	                                         rdlength);
 	if (ret != KNOT_EOK) {
@@ -376,13 +376,13 @@ static int knot_packet_parse_rdata(knot_rrset_t *rr, const uint8_t *wire,
 		           knot_strerror(ret));
 		return ret;
 	}
-	
+
 //	uint8_t* rd = knot_rrset_create_rdata(rr, rdlength);
 //	if (!rd) {
 //		return KNOT_ERROR;
 //	}
 //	uint8_t* np = rd + rdlength;
-	
+
 //	const rdata_descriptor_t *desc = get_rdata_descriptor(knot_rrset_type(rr));
 //	if (!desc) {
 //		/*! \todo Free rdata mem ? Not essential, but nice. */
@@ -414,7 +414,7 @@ static int knot_packet_parse_rdata(knot_rrset_t *rr, const uint8_t *wire,
 //			assert(knot_rrset_type(rr) == KNOT_RRTYPE_NAPTR);
 //			assert(0);
 //		}
-		
+
 //	}
 
 	return KNOT_EOK;
@@ -487,8 +487,8 @@ dbg_packet_exec_verb(
 	if (rdlength == 0) {
 		return rrset;
 	}
-	
-	
+
+
 	// parse RDATA
 	/*! \todo Merge with add_rdata_to_rr in zcompile, should be a rrset func
 	 *        probably. */
@@ -858,7 +858,7 @@ int knot_packet_parse_from_wire(knot_packet_t *packet,
 
 	if (packet->header.qdcount == 1) {
 		if ((err = knot_packet_parse_question(wireformat, &pos, size,
-		             &packet->question, packet->prealloc_type 
+		             &packet->question, packet->prealloc_type
 		                                == KNOT_PACKET_PREALLOC_NONE)
 		     ) != KNOT_EOK) {
 			return err;
@@ -901,7 +901,7 @@ int knot_packet_parse_rest(knot_packet_t *packet, knot_packet_flag_t flags)
 
 	// If there is less data then required, the next function will find out.
 	// If there is more data than required, it also returns EMALF.
-	
+
 	size_t pos = packet->parsed;
 
 	/*! \todo If we already parsed some part of the packet, it is not ok
@@ -935,7 +935,7 @@ int knot_packet_parse_next_rr_answer(knot_packet_t *packet,
 	if (packet->parsed_an == packet->header.ancount) {
 		assert(packet->parsed < packet->size);
 		//dbg_packet("Trailing garbage, ignoring...\n");
-		// there may be other data in the packet 
+		// there may be other data in the packet
 		// (authority or additional).
 		return KNOT_EOK;
 	}
@@ -948,7 +948,7 @@ int knot_packet_parse_next_rr_answer(knot_packet_t *packet,
 		dbg_packet_verb("Failed to parse RR!\n");
 		return KNOT_EMALF;
 	}
-	
+
 	dbg_packet_detail("Parsed. Pos: %zu.\n", pos);
 
 	packet->parsed = pos;
@@ -997,7 +997,7 @@ int knot_packet_parse_next_rr_additional(knot_packet_t *packet,
 		dbg_packet_verb("Failed to parse RR!\n");
 		return KNOT_EMALF;
 	}
-	
+
 	dbg_packet_detail("Parsed. Pos: %zu.\n", pos);
 
 	packet->parsed = pos;
@@ -1182,7 +1182,7 @@ int knot_packet_rcode(const knot_packet_t *packet)
 	if (packet == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	return knot_wire_flags_get_rcode(packet->header.flags2);
 }
 
@@ -1193,7 +1193,7 @@ int knot_packet_tc(const knot_packet_t *packet)
 	if (packet == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	return knot_wire_flags_get_tc(packet->header.flags1);
 }
 
@@ -1659,4 +1659,3 @@ int knot_packet_free_rrsets(knot_packet_t *packet)
 	ret += knot_packet_free_section(packet->additional, packet->ar_rrsets);
 	return ret;
 }
-
diff --git a/src/libknot/packet/packet.h b/src/libknot/packet/packet.h
index 663a8acd670ed4540ee88ed70626d1c9b653bf49..c27a489a6743d666759c81062b2ca30e403b0998 100644
--- a/src/libknot/packet/packet.h
+++ b/src/libknot/packet/packet.h
@@ -161,7 +161,7 @@ struct knot_packet {
 	struct knot_packet *query; /*!< Associated query. */
 
 	knot_packet_prealloc_type_t prealloc_type;
-	
+
 	size_t tsig_size;	/*!< Space to reserve for the TSIG RR. */
 	knot_rrset_t *tsig_rr;  /*!< TSIG RR stored in the packet. */
 	uint16_t flags;         /*!< Packet flags. */
diff --git a/src/libknot/packet/query.c b/src/libknot/packet/query.c
index 0e1091eabc5faea5c8b3dda635f8653b3dabb66d..c20ae15a52e40fb3d47cfdb5107c3134d1c6032b 100644
--- a/src/libknot/packet/query.c
+++ b/src/libknot/packet/query.c
@@ -133,14 +133,14 @@ int knot_query_add_rrset_authority(knot_packet_t *query,
 	/* Write to wire. */
 	uint8_t *startp = query->wireformat + query->size;
 	uint8_t *endp = query->wireformat + query->max_size;
-	
+
 	assert(endp - startp > query->opt_rr.size + query->tsig_size);
 	// reserve space for OPT RR
 	/*! \todo Why here??? */
 	endp -= query->opt_rr.size;
 	/* Reserve space for TSIG RR */
 	endp -= query->tsig_size;
-	
+
 	size_t written = 0;
 	uint16_t rr_count = 0;
 	int ret = knot_rrset_to_wire(rrset, startp, &written, query->max_size,
@@ -154,4 +154,3 @@ int knot_query_add_rrset_authority(knot_packet_t *query,
 
 	return KNOT_EOK;
 }
-
diff --git a/src/libknot/packet/response.c b/src/libknot/packet/response.c
index f7a8dd91380a7b30493346264f68ddc620550849..7a22391c9889eada1c59b11d005f8b70ad7a3c86 100644
--- a/src/libknot/packet/response.c
+++ b/src/libknot/packet/response.c
@@ -208,7 +208,7 @@ dbg_response_exec_detail(
 		// and resulting in using the 0 offset.
 		// If case-sensitive search is in place, we should not save the
 		// node's parent's positions.
-		
+
 		// Added check to rule out wildcard-covered dnames
 		// (in such case the offset is not right)
 
@@ -311,7 +311,7 @@ static int knot_response_put_dname_ptr(const knot_dname_t *dname,
 	knot_wire_put_pointer(wire + size, offset);
 
 	dbg_response_detail("Size of the dname with ptr: %d\n", size + 2);
-	
+
 	return size + 2;
 }
 
@@ -378,7 +378,7 @@ dbg_response_exec_detail(
 			dbg_response_detail("compr_cs: %d\n", compr_cs);
 			dbg_response_detail("knot_dname_node(to_find, 1) == %p"
 			                    "\n", knot_dname_node(to_find));
-			
+
 			if (knot_dname_node(to_find) != NULL) {
 				dbg_response_detail("knot_node_owner(knot_dname_node("
 				             "to_find, 1)) = %p, to_find = %p\n",
@@ -408,7 +408,7 @@ dbg_response_exec_detail(
 #endif
 
 	dbg_response_detail("Max size available for domain name: %zu\n", max);
-	
+
 	if (offset > 0) {
 		// found such dname somewhere in the packet
 		// the pointer should be legal as no illegal pointers are stored
@@ -432,7 +432,7 @@ dbg_response_exec_detail(
 	}
 
 	// in either way, put info into the compression table
-	/*! \todo This is useless if the name was already in the table. 
+	/*! \todo This is useless if the name was already in the table.
 	 *        It is meaningful only if the found name is the one from QNAME
 	 *        and thus its parents are not stored yet.
 	 */
@@ -528,7 +528,7 @@ dbg_response_exec(
 	uint16_t rr_count = 0;
 	int ret = knot_rrset_to_wire(rrset, pos, &size, max_size,
 	                             &rr_count, &param);
-	
+
 	if (ret != KNOT_EOK) {
 		dbg_response("Failed to convert RRSet to wire. (%s).\n,",
 		             knot_strerror(ret));
@@ -708,11 +708,11 @@ int knot_response_init_from_query(knot_packet_t *response,
 	// clear TC flag
 	knot_wire_flags_clear_tc(&response->header.flags1);
 	knot_wire_clear_tc(response->wireformat);
-	
+
 	// clear AD flag
 	knot_wire_flags_clear_ad(&response->header.flags2);
 	knot_wire_clear_ad(response->wireformat);
-	
+
 	// clear RA flag
 	knot_wire_flags_clear_ra(&response->header.flags2);
 	knot_wire_clear_ad(response->wireformat);
@@ -981,7 +981,7 @@ int knot_response_add_rrset_additional(knot_packet_t *response,
 	                                        &response->ar_rrsets, response,
 	                                        response->max_size
 	                                        - response->size
-	                                        - response->tsig_size, rrset, 
+	                                        - response->tsig_size, rrset,
 	                                        tc, compr_cs);
 
 	if (rrs >= 0) {
diff --git a/src/libknot/rrset-dump.c b/src/libknot/rrset-dump.c
index ad0b489c6266796d5aa37f22cdfcf82eb298750a..f3b2618a3b163285371da76bec996876c72a260f 100644
--- a/src/libknot/rrset-dump.c
+++ b/src/libknot/rrset-dump.c
@@ -500,7 +500,7 @@ static void wire_len_data_encode_to_str(rrset_dump_params_t *p,
 		p->out += ret;
 		p->out_max -= ret;
 		p->total += ret;
-	
+
 		// String termination.
 		if (p->out_max > 0) {
 			*p->out = '\0';
@@ -1057,14 +1057,14 @@ static void wire_loc_to_str(rrset_dump_params_t *p)
 		lon = lon_w - LOC_ZERO;
 	} else {
 		lon_mark = 'W';
-		lon = LOC_ZERO - lon_w; 
+		lon = LOC_ZERO - lon_w;
 	}
 
 	uint32_t d2 = lon / 3600000;
 	uint32_t m2 = (lon - 3600000 * d2) / 60000;
 	double s2 = 0.001 * (lon - 3600000 * d2 - 60000 * m2);
 
-	// Write latitude and longitude. 
+	// Write latitude and longitude.
 	ret = snprintf(p->out, p->out_max, "%u %u %.*f %c  %u %u %.*f %c",
 	               d1, m1, (uint32_t)s1 != s1 ? 3 : 0, s1, lat_mark,
 	               d2, m2, (uint32_t)s2 != s2 ? 3 : 0, s2, lon_mark);
@@ -1430,7 +1430,7 @@ static int dump_txt(DUMP_PARAMS)
 
 	// Other text strings if any.
 	while (p.in_max > 0) {
-		DUMP_SPACE; DUMP_TEXT; 
+		DUMP_SPACE; DUMP_TEXT;
 	}
 
 	DUMP_END;
@@ -1951,7 +1951,7 @@ int knot_rrset_txt_dump_header(const knot_rrset_t      *rrset,
 		return KNOT_ESPACE;
 	}
 	len += ret;
-	
+
 	return len;
 }
 
diff --git a/src/libknot/rrset.c b/src/libknot/rrset.c
index 7fe433a4623b8c4552300c3e26bc596dfd4e4aa1..0695d7a2e32f56b5b9fa3f54d5af9d214b7c6f39 100644
--- a/src/libknot/rrset.c
+++ b/src/libknot/rrset.c
@@ -43,7 +43,7 @@ static int rrset_retain_dnames_in_rr(knot_dname_t **dname, void *data)
 	if (dname == NULL || *dname == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	knot_dname_retain(*dname);
 	return KNOT_EOK;
 }
@@ -66,7 +66,7 @@ static uint32_t rrset_rdata_offset(const knot_rrset_t *rrset,
 	    pos >= rrset->rdata_count || pos == 0) {
 		return 0;
 	}
-	
+
 	assert(rrset->rdata_count >= 2);
 	return rrset->rdata_indices[pos - 1];
 }
@@ -78,7 +78,7 @@ static uint8_t *rrset_rdata_pointer(const knot_rrset_t *rrset,
 	    || pos >= rrset->rdata_count) {
 		return NULL;
 	}
-	
+
 	return rrset->rdata + rrset_rdata_offset(rrset, pos);
 }
 
@@ -88,23 +88,23 @@ static uint16_t rrset_rdata_naptr_bin_chunk_size(const knot_rrset_t *rrset,
 	if (rrset == NULL || pos >= rrset->rdata_count) {
 		return 0;
 	}
-	
+
 	size_t size = 0;
 	uint8_t *rdata = rrset_rdata_pointer(rrset, pos);
 	assert(rdata);
-	
+
 	/* Two shorts at the beginning. */
 	size += 4;
 	/* 3 binary TXTs with length in the first byte. */
 	for (int i = 0; i < 3; i++) {
 		size += *(rdata + size) + 1;
 	}
-	
-	/* 
+
+	/*
 	 * Dname remaning, but we usually want to get to the DNAME, so
 	 * there's no need to include it in the returned size.
 	 */
-	
+
 	return size;
 }
 
@@ -120,7 +120,7 @@ dbg_rrset_exec_detail(
 	const rdata_descriptor_t *desc =
 		get_rdata_descriptor(knot_rrset_type(rrset));
 	assert(desc != NULL);
-	
+
 	size_t offset = 0;
 	for (int i = 0; desc->block_types[i] != KNOT_RDATA_WF_END; i++) {
 		int item = desc->block_types[i];
@@ -166,7 +166,7 @@ static size_t rrset_rdata_remainder_size(const knot_rrset_t *rrset,
                                          size_t offset, size_t pos)
 {
 	assert(rrset_rdata_item_size(rrset, pos) != 0);
-	
+
 	size_t ret = rrset_rdata_item_size(rrset, pos) - offset;
 	assert(ret <= rrset_rdata_size_total(rrset));
 	return ret;
@@ -180,14 +180,14 @@ static int rrset_rdata_compare_one(const knot_rrset_t *rrset1,
 	/* [code-review] Just to be sure. */
 	assert(rrset1 != NULL);
 	assert(rrset2 != NULL);
-	
+
 	uint8_t *r1 = rrset_rdata_pointer(rrset1, pos1);
 	uint8_t *r2 = rrset_rdata_pointer(rrset2, pos2);
 	assert(rrset1->type == rrset2->type);
 	const rdata_descriptor_t *desc = get_rdata_descriptor(rrset1->type);
 	int cmp = 0;
 	size_t offset = 0;
-	
+
 	for (int i = 0; desc->block_types[i] != KNOT_RDATA_WF_END; i++) {
 		if (descriptor_item_is_dname(desc->block_types[i])) {
 			knot_dname_t *dname1 = NULL;
@@ -224,10 +224,10 @@ static int rrset_rdata_compare_one(const knot_rrset_t *rrset1,
 			if (cmp == 0 && naptr_chunk_size1 == naptr_chunk_size2) {
 				cmp = naptr_chunk_size1 < naptr_chunk_size2 ? -1 : 1;
 			}
-			
+
 			/*
 			 * It does not matter which one we assign. If the
-			 * offsets were different, then cmp != 0, if yes, 
+			 * offsets were different, then cmp != 0, if yes,
 			 * NAPTR DNAME will be on correct offset.
 			 */
 			offset += naptr_chunk_size1;
@@ -250,22 +250,22 @@ static int knot_rrset_rdata_to_wire_one(const knot_rrset_t *rrset,
 {
 	assert(rrset);
 	assert(pos);
-	
+
 	size_t size = 0;
-	
+
 	if (rrset->owner == NULL) {
 		return KNOT_EMALF;
 	}
-	
+
 	if (compr) {
 	        dbg_response("Max size: %zu, owner pos: %zu, owner size: %d\n",
-		             max_size, compr->owner.pos, compr->owner.size);		
+		             max_size, compr->owner.pos, compr->owner.size);
 		if (size + ((compr->owner.pos == 0
-		    || compr->owner.pos > KNOT_RESPONSE_MAX_PTR) 
+		    || compr->owner.pos > KNOT_RESPONSE_MAX_PTR)
 		    ? compr->owner.size : 2) + 10 > max_size) {
 			return KNOT_ESPACE;
 		}
-		
+
 		// put owner if needed (already compressed)
 		if (compr->owner.pos == 0 ||
 		    compr->owner.pos > KNOT_RESPONSE_MAX_PTR) {
@@ -290,14 +290,14 @@ static int knot_rrset_rdata_to_wire_one(const knot_rrset_t *rrset,
 			return KNOT_ESPACE;
 		}
 
-		memcpy(*pos, knot_dname_name(rrset->owner), 
+		memcpy(*pos, knot_dname_name(rrset->owner),
 		       knot_dname_size(rrset->owner));
 		*pos += knot_dname_size(rrset->owner);
 		size += knot_dname_size(rrset->owner);
 	}
 
 	dbg_rrset_detail("Max size: %zu, size: %zu\n", max_size, size);
-	
+
 	// put rest of RR 'header'
 	knot_wire_write_u16(*pos, rrset->type);
 	dbg_rrset_detail("  Type: %u\n", rrset->type);
@@ -327,7 +327,7 @@ static int knot_rrset_rdata_to_wire_one(const knot_rrset_t *rrset,
 	size_t offset = 0;
 	/* Actual RDLENGTH. */
 	uint16_t rdlength = 0;
-	
+
 	const rdata_descriptor_t *desc = get_rdata_descriptor(rrset->type);
 	assert(desc);
 
@@ -362,7 +362,7 @@ dbg_rrset_exec_detail(
 			free(name);
 );
 			// save whole domain name
-			memcpy(*pos, knot_dname_name(dname), 
+			memcpy(*pos, knot_dname_name(dname),
 			       knot_dname_size(dname));
 			dbg_rrset_detail("Uncompressed dname size: %d\n",
 			                 knot_dname_size(dname));
@@ -417,7 +417,7 @@ dbg_rrset_exec_detail(
 			compr->wire_pos += rdlength;
 		}
 	}
-	
+
 	knot_wire_write_u16(rdlength_pos, rdlength);
 	size += rdlength;
 
@@ -430,12 +430,12 @@ static int knot_rrset_to_wire_aux(const knot_rrset_t *rrset, uint8_t **pos,
                                   size_t max_size, compression_param_t *comp)
 {
 	size_t size = 0;
-	
+
 	assert(rrset != NULL);
 	assert(rrset->owner != NULL);
 	assert(pos != NULL);
 	assert(*pos != NULL);
-	
+
 	dbg_rrset_detail("Max size: %zu, owner: %p, owner size: %d\n",
 	                 max_size, rrset->owner, rrset->owner->size);
 	knot_compr_t compr_info;
@@ -461,11 +461,11 @@ static int knot_rrset_to_wire_aux(const knot_rrset_t *rrset, uint8_t **pos,
 			return KNOT_ESPACE;
 		}
 		compr_info.owner.size = ret;
-		
+
 		dbg_response_detail("Compressed owner has size=%d\n",
 		                    compr_info.owner.size);
 	}
-	
+
 	dbg_rrset_detail("Max size: %zu, size: %zu\n", max_size, size);
 
 	const rdata_descriptor_t *desc = get_rdata_descriptor(rrset->type);
@@ -489,7 +489,7 @@ static int knot_rrset_to_wire_aux(const knot_rrset_t *rrset, uint8_t **pos,
 		/* Change max size. */
 		max_size -= rr_size;
 	}
-	
+
 	dbg_rrset_detail("Max size: %zu, size: %zu\n", max_size, size);
 	return size;
 }
@@ -503,7 +503,7 @@ static int knot_rrset_rdata_store_binary(uint8_t *rdata, size_t *offset,
 {
 	assert(rdata);
 	assert(wire);
-	
+
 	/* Check that size is OK. */
 	if ((*pos - packet_offset) + size > rdlength) {
 		dbg_rrset("rrset: rdata_store_binary: Read of size=%zu on "
@@ -511,12 +511,12 @@ static int knot_rrset_rdata_store_binary(uint8_t *rdata, size_t *offset,
 		          *pos, ((*pos - packet_offset) + size) - rdlength);
 		return KNOT_ESPACE;
 	}
-	
+
 	/* Store actual data. */
 	memcpy(rdata + *offset, wire + *pos, size);
 	*offset += size;
 	*pos += size;
-	
+
 	return KNOT_EOK;
 }
 
@@ -536,17 +536,17 @@ static int rrset_find_rr_pos_for_pointer(const knot_rrset_t *rrset,
 	if (p == NULL) {
 		return 0;
 	}
-	
+
 	/* [code-review] Added check of 'p' validity - whether it
 	 * points to the RDATA array of 'rrset'.
 	 */
-	if ((size_t)p < (size_t)rrset->rdata 
-	    || (size_t)p > (size_t)rrset->rdata 
+	if ((size_t)p < (size_t)rrset->rdata
+	    || (size_t)p > (size_t)rrset->rdata
 	                   + rrset_rdata_size_total(rrset)) {
 		// 'p' is not within the RDATA array
 		return KNOT_ERANGE;
 	}
-	
+
 	size_t offset = (size_t)p - (size_t)rrset->rdata;
 
 	if (offset < rrset_rdata_item_size(rrset, 0)) {
@@ -571,7 +571,7 @@ static size_t rrset_binary_size_one(const knot_rrset_t *rrset,
 	const rdata_descriptor_t *desc =
 		get_rdata_descriptor(knot_rrset_type(rrset));
 	assert(desc != NULL);
-	
+
 	size_t offset = 0;
 	size_t size = 0;
 	for (int i = 0; desc->block_types[i] != KNOT_RDATA_WF_END; i++) {
@@ -601,7 +601,7 @@ static size_t rrset_binary_size_one(const knot_rrset_t *rrset,
 			offset += naptr_chunk_size;
 		}
 	}
-	
+
 	return size;
 }
 
@@ -611,7 +611,7 @@ static void rrset_serialize_rr(const knot_rrset_t *rrset, size_t rdata_pos,
 	const rdata_descriptor_t *desc =
 		get_rdata_descriptor(knot_rrset_type(rrset));
 	assert(desc != NULL);
-	
+
 	size_t offset = 0;
 	*size = 0;
 	for (int i = 0; desc->block_types[i] != KNOT_RDATA_WF_END; i++) {
@@ -649,7 +649,7 @@ static void rrset_serialize_rr(const knot_rrset_t *rrset, size_t rdata_pos,
 			memcpy(stream + *size, rdata + offset, naptr_chunk_size);
 		}
 	}
-	
+
 	dbg_rrset_detail("RR nr=%zu serialized, size=%zu\n", rdata_pos, *size);
 }
 
@@ -660,7 +660,7 @@ static int rrset_deserialize_rr(knot_rrset_t *rrset, size_t rdata_pos,
 	const rdata_descriptor_t *desc =
 		get_rdata_descriptor(knot_rrset_type(rrset));
 	assert(desc != NULL);
-	
+
 	size_t stream_offset = 0;
 	size_t rdata_offset = 0;
 	for (int i = 0; desc->block_types[i] != KNOT_RDATA_WF_END; i++) {
@@ -713,7 +713,7 @@ int knot_rrset_remove_rdata_pos(knot_rrset_t *rrset, size_t pos)
 	if (rrset == NULL || pos >= rrset->rdata_count) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Handle DNAMEs inside RDATA. */
 	int ret = rrset_rr_dnames_apply(rrset, pos, rrset_release_dnames_in_rr,
 	                                NULL);
@@ -734,16 +734,16 @@ int knot_rrset_remove_rdata_pos(knot_rrset_t *rrset, size_t pos)
 		assert(next_rdata);
 		size_t remainder_size = rrset_rdata_size_total(rrset)
 		                        - rrset_rdata_offset(rrset, pos + 1);
-		/* 
+		/*
 		 * Copy the all following RR data to where this item is.
 		 * No need to worry about exceeding allocated space now.
 		 */
 		memmove(rdata_to_remove, next_rdata, remainder_size);
 	}
-	
+
 	uint32_t removed_size = rrset_rdata_item_size(rrset, pos);
 	uint32_t new_size = rrset_rdata_size_total(rrset) - removed_size;
-	
+
 	/*! \todo Realloc might not be needed. Only if the RRSet is large. */
 	if (new_size == 0) {
 		assert(rrset->rdata_count == 1);
@@ -767,18 +767,18 @@ int knot_rrset_remove_rdata_pos(knot_rrset_t *rrset, size_t pos)
 		for (uint16_t i = pos; i < rrset->rdata_count - 1; ++i) {
 			rrset->rdata_indices[i] = rrset->rdata_indices[i + 1] - removed_size;
 		}
-	
+
 		/* Save size of the whole RDATA array. Note: probably not needed! */
 		rrset->rdata_indices[rrset->rdata_count - 2] = new_size;
-	
+
 		/* Resize indices, might not be needed, but we'll do it to be proper. */
 		rrset->rdata_indices =
 			xrealloc(rrset->rdata_indices,
 		                 (rrset->rdata_count - 1) * sizeof(uint32_t));
 	}
-	
+
 	--rrset->rdata_count;
-	
+
 	dbg_rrset_detail("rrset: remove rdata pos: RR after removal:\n");
 	knot_rrset_dump(rrset);
 
@@ -795,7 +795,7 @@ uint32_t rrset_rdata_size_total(const knot_rrset_t *rrset)
 	    rrset->rdata_count == 0) {
 		return 0;
 	}
-	
+
 	/* Last index denotes end of all RRs. */
 	return (rrset->rdata_indices[rrset->rdata_count - 1]);
 }
@@ -827,10 +827,10 @@ int knot_rrset_add_rdata(knot_rrset_t *rrset,
 	if (rrset == NULL || rdata == NULL || size == 0) {
 		return KNOT_EINVAL;
 	}
-	
+
 	uint8_t *p = knot_rrset_create_rdata(rrset, size);
 	memcpy(p, rdata, size);
-	
+
 	return KNOT_EOK;
 }
 
@@ -841,9 +841,9 @@ uint8_t* knot_rrset_create_rdata(knot_rrset_t *rrset, uint16_t size)
 	if (rrset == NULL || size == 0) {
 		return NULL;
 	}
-	
+
 	uint32_t total_size = rrset_rdata_size_total(rrset);
-	
+
 	/* Realloc indices. We will allocate exact size to save space. */
 	/* TODO this sucks big time - allocation of length 1. */
 	/* But another variable holding allocated count is out of question. What now?*/
@@ -852,10 +852,10 @@ uint8_t* knot_rrset_create_rdata(knot_rrset_t *rrset, uint16_t size)
 
 	/* Realloc actual data. */
 	rrset->rdata = xrealloc(rrset->rdata, total_size + size);
-	
+
 	/* Pointer to new memory. */
 	uint8_t *dst = rrset->rdata + total_size;
-	
+
 	/* Update indices. */
 	if (rrset->rdata_count == 0) {
 		rrset->rdata_indices[0] = size;
@@ -863,9 +863,9 @@ uint8_t* knot_rrset_create_rdata(knot_rrset_t *rrset, uint16_t size)
 		rrset->rdata_indices[rrset->rdata_count - 1] = total_size;
 		rrset->rdata_indices[rrset->rdata_count] = total_size + size;
 	}
-	
+
 	++rrset->rdata_count;
-	
+
 	return dst;
 }
 
@@ -880,12 +880,12 @@ uint16_t rrset_rdata_item_size(const knot_rrset_t *rrset,
 		//invalid case
 		return 0;
 	}
-	
+
 	if (rrset->rdata_count == 1 || pos == 0) {
 		//first RR or only one RR (either size of first RR or total size)
 		return rrset->rdata_indices[0];
 	}
-	
+
 	assert(rrset->rdata_count >= 2 && pos != 0);
 	return rrset->rdata_indices[pos] - rrset->rdata_indices[pos - 1];
 }
@@ -1048,7 +1048,7 @@ int knot_rrset_rdata_equal(const knot_rrset_t *r1, const knot_rrset_t *r2)
 	if (desc == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	// compare RDATA sets (order is not significant)
 
 	// find all RDATA from r1 in r2
@@ -1059,11 +1059,11 @@ int knot_rrset_rdata_equal(const knot_rrset_t *r1, const knot_rrset_t *r2)
 			found = !rrset_rdata_compare_one(r1, r2, i, j);
 		}
 	}
-	
+
 	if (!found) {
 		return 0;
 	}
-	
+
 	// other way around
 	for (uint16_t i = 0; i < r2->rdata_count; i++) {
 		found = 0;
@@ -1071,11 +1071,11 @@ int knot_rrset_rdata_equal(const knot_rrset_t *r1, const knot_rrset_t *r2)
 			found = !rrset_rdata_compare_one(r1, r2, j, i);
 		}
 	}
-	
+
 	if (!found) {
 		return 0;
 	}
-	
+
 	return 1;
 }
 
@@ -1085,26 +1085,26 @@ int knot_rrset_to_wire(const knot_rrset_t *rrset, uint8_t *wire, size_t *size,
                        size_t max_size, uint16_t *rr_count, void *data)
 {
 	/* [code-review] Missing parameter checks. */
-	
+
 	// if no RDATA in RRSet, return
 	if (rrset->rdata == NULL) {
 		*size = 0;
 		*rr_count = 0;
 		return KNOT_EOK;
 	}
-	
+
 	assert(rrset->rdata_count > 0);
-	
+
 	compression_param_t *comp_data = (compression_param_t *)data;
 	uint8_t *pos = wire;
-	
+
 dbg_rrset_exec_detail(
 	dbg_rrset_detail("Converting following RRSet:\n");
 	knot_rrset_dump(rrset);
 );
 
 	int ret = knot_rrset_to_wire_aux(rrset, &pos, max_size, comp_data);
-	
+
 	assert(ret != 0);
 
 	if (ret < 0) {
@@ -1118,11 +1118,11 @@ dbg_rrset_exec_detail(
 	assert(ret <= max_size);
 	assert(pos - wire == ret);
 	*size = ret;
-	
+
 	dbg_rrset_detail("Size after: %zu\n", *size);
 
 	*rr_count = rrset->rdata_count;
-	
+
 	return KNOT_EOK;
 }
 
@@ -1133,25 +1133,25 @@ int knot_rrset_rdata_from_wire_one(knot_rrset_t *rrset,
                                    size_t total_size, size_t rdlength)
 {
 	/* [code-review] Missing parameter checks. */
-	
+
 	if (rdlength == 0) {
 		return KNOT_EOK;
 	}
-	
+
 	dbg_rrset_detail("rr: parse_rdata_wire: Parsing RDATA of size=%zu,"
 	                 " wire_size=%zu, type=%d.\n", rdlength, total_size,
 	                 rrset->type);
-	
+
 	size_t extra_dname_size = 0;
 	const rdata_descriptor_t *desc = get_rdata_descriptor(rrset->type);
 	assert(desc);
-	
+
 	for (int i = 0; desc->block_types[i] != KNOT_RDATA_WF_END; ++i) {
 		if (descriptor_item_is_dname(desc->block_types[i])) {
 			extra_dname_size += sizeof(knot_dname_t *) - 1;
 		}
 	}
-	
+
 	/* [code-review] Isn't this invalid? You cannot do static allocation
 	 * with dynamic data (parameter, local variable).
 	 */
@@ -1159,7 +1159,7 @@ int knot_rrset_rdata_from_wire_one(knot_rrset_t *rrset,
 	memset(rdata_buffer, 0, rdlength + extra_dname_size);
 	dbg_rrset_detail("rr: parse_rdata_wire: Added %zu bytes to buffer to "
 	                 "store RDATA DNAME pointers.\n", extra_dname_size);
-	
+
 	size_t offset = 0; // offset within in-memory RDATA
 	size_t parsed = 0; // actual count of parsed octets
 	const size_t packet_offset = *pos;
@@ -1268,14 +1268,14 @@ dbg_rrset_exec_detail(
 			}
 		}
 	}
-	
+
 	uint8_t *rdata = knot_rrset_create_rdata(rrset, offset);
 	if (rdata == NULL) {
 		return KNOT_ENOMEM;
 	}
-	
+
 	memcpy(rdata, rdata_buffer, offset);
-	
+
 	return KNOT_EOK;
 }
 
@@ -1291,14 +1291,14 @@ int knot_rrset_equal(const knot_rrset_t *r1,
 	if (res != 0) {
 		return 0;
 	}
-	
+
 	if (r1->rclass == r2->rclass &&
 	    r1->type == r2->type) {
 		res = 1;
 	} else {
 		res = 0;
 	}
-	
+
 	if (cmp == KNOT_RRSET_COMPARE_WHOLE && res == 1) {
 		res = knot_rrset_rdata_equal(r1, r2);
 	}
@@ -1312,10 +1312,10 @@ int knot_rrset_deep_copy(const knot_rrset_t *from, knot_rrset_t **to,
 	if (from == NULL || to == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	dbg_rrset_detail("rr: deep_copy: Copying RRs of type %d\n",
 	                 from->type);
-	
+
 	*to = xmalloc(sizeof(knot_rrset_t));
 
 	(*to)->owner = knot_dname_deep_copy(from->owner);
@@ -1324,7 +1324,7 @@ int knot_rrset_deep_copy(const knot_rrset_t *from, knot_rrset_t **to,
 		*to = NULL;
 		return KNOT_ENOMEM;
 	}
-	
+
 	(*to)->rclass = from->rclass;
 	(*to)->ttl = from->ttl;
 	(*to)->type = from->type;
@@ -1339,11 +1339,11 @@ int knot_rrset_deep_copy(const knot_rrset_t *from, knot_rrset_t **to,
 	} else {
 		(*to)->rrsigs = NULL;
 	}
-	
+
 	/* Just copy arrays - actual data + indices. */
 	(*to)->rdata = xmalloc(rrset_rdata_size_total(from));
 	memcpy((*to)->rdata, from->rdata, rrset_rdata_size_total(from));
-	
+
 	(*to)->rdata_indices = xmalloc(sizeof(uint32_t) * from->rdata_count);
 	memcpy((*to)->rdata_indices, from->rdata_indices,
 	       sizeof(uint32_t) * from->rdata_count);
@@ -1376,11 +1376,11 @@ dbg_rrset_exec_detail(
 				free(*to);
 				return KNOT_ENOMEM;
 			}
-			
+
 			*dname_to = dname_copy;
 		}
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -1390,12 +1390,12 @@ int knot_rrset_shallow_copy(const knot_rrset_t *from, knot_rrset_t **to)
 {
 	*to = (knot_rrset_t *)malloc(sizeof(knot_rrset_t));
 	CHECK_ALLOC_LOG(*to, KNOT_ENOMEM);
-	
+
 	memcpy(*to, from, sizeof(knot_rrset_t));
 
 	/* Retain owner. */
 	knot_dname_retain((*to)->owner);
-	
+
 	return KNOT_EOK;
 }
 
@@ -1428,16 +1428,16 @@ void knot_rrset_deep_free(knot_rrset_t **rrset, int free_owner,
 	if (rrset == NULL || *rrset == NULL) {
 		return;
 	}
-	
+
 	if ((*rrset)->rrsigs != NULL) {
 		knot_rrset_deep_free(&(*rrset)->rrsigs, free_owner, free_rdata_dnames);
 	}
-	
+
 	if (free_rdata_dnames) {
 		rrset_dnames_apply(*rrset, rrset_release_dnames_in_rr,
 	                           NULL);
 	}
-	
+
 	free((*rrset)->rdata);
 	free((*rrset)->rdata_indices);
 
@@ -1455,7 +1455,7 @@ void knot_rrset_deep_free_no_sig(knot_rrset_t **rrset, int free_owner,
 	if (rrset == NULL || *rrset == NULL) {
 		return;
 	}
-	
+
 	if (free_rdata_dnames) {
 		int ret = rrset_dnames_apply(*rrset, rrset_release_dnames_in_rr,
 		                             NULL);
@@ -1463,7 +1463,7 @@ void knot_rrset_deep_free_no_sig(knot_rrset_t **rrset, int free_owner,
 			dbg_rrset("rr: deep_free: Could not free DNAMEs in RDATA.\n");
 		}
 	}
-	
+
 	free((*rrset)->rdata);
 	free((*rrset)->rdata_indices);
 
@@ -1480,60 +1480,60 @@ int knot_rrset_merge(knot_rrset_t *rrset1, const knot_rrset_t *rrset2)
 	if (rrset1 == NULL || rrset2 == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Check, that we really merge RRSets? */
 	if (rrset1->type != rrset2->type ||
 	    rrset1->rclass != rrset2->rclass ||
 	    (knot_dname_compare_non_canon(rrset1->owner, rrset2->owner) != 0)) {
 		return KNOT_EINVAL;
 	}
-	                
-	/* Merging empty RRSets is OK. */	
+
+	/* Merging empty RRSets is OK. */
 	if (rrset1->rdata_count == 0 && rrset2->rdata_count == 0) {
 		return KNOT_EOK;
 	}
-	                
+
 	/* Add all RDATAs from rrset2 to rrset1 (i.e. concatenate two arrays) */
-	
+
 	/*! \note The following code should work for
 	 *        all the cases i.e. R1 or R2 are empty.
 	 */
-	
+
 	/* Reallocate actual RDATA array. */
 	rrset1->rdata = xrealloc(rrset1->rdata, rrset_rdata_size_total(rrset1) +
 	                         rrset_rdata_size_total(rrset2));
-	
+
 	/* The space is ready, copy the actual data. */
 	memcpy(rrset1->rdata + rrset_rdata_size_total(rrset1),
 	       rrset2->rdata, rrset_rdata_size_total(rrset2));
-	
+
 	/* Indices have to be readjusted. But space has to be made first. */
-	rrset1->rdata_indices = 
+	rrset1->rdata_indices =
 		xrealloc(rrset1->rdata_indices,
 	        (rrset1->rdata_count + rrset2->rdata_count) *
 	         sizeof(uint32_t));
-	
+
 	uint32_t rrset1_total_size = rrset_rdata_size_total(rrset1);
 	uint32_t rrset2_total_size = rrset_rdata_size_total(rrset2);
-	
+
 	/*
-	 * Move the indices. Discard the last item in the first array, as it 
+	 * Move the indices. Discard the last item in the first array, as it
 	 * contains total length of the data, which is now different.
 	 */
 	memcpy(rrset1->rdata_indices + rrset1->rdata_count,
 	       rrset2->rdata_indices, rrset2->rdata_count);
-	
+
 	/* Go through the second part of index array and adjust offsets. */
 	for (uint16_t i = 0; i < rrset2->rdata_count - 1; i++) {
 		rrset1->rdata_indices[rrset1->rdata_count + i] +=
 			rrset1_total_size;
 	}
-	
-	rrset1->rdata_indices[rrset1->rdata_count + rrset2->rdata_count - 1] = 
+
+	rrset1->rdata_indices[rrset1->rdata_count + rrset2->rdata_count - 1] =
 		rrset1_total_size + rrset2_total_size;
-	
+
 	rrset1->rdata_count += rrset2->rdata_count;
-	
+
 	return KNOT_EOK;
 }
 
@@ -1558,7 +1558,7 @@ dbg_rrset_exec_detail(
 		          "different RRs.\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	*deleted_rrs = 0;
 	*merged = 0;
 	/* For each item in second RRSet, make sure it is not duplicated. */
@@ -1570,7 +1570,7 @@ dbg_rrset_exec_detail(
 			duplicated = !rrset_rdata_compare_one(rrset1, rrset2,
 			                                      j, i);
 		}
-		
+
 		if (!duplicated) {
 			*merged += 1; // = need to shallow free rrset2
 			// This index goes to merged RRSet.
@@ -1587,7 +1587,7 @@ dbg_rrset_exec_detail(
 			*deleted_rrs += 1; // = need to shallow free rrset2
 		}
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -1598,7 +1598,7 @@ const knot_dname_t *knot_rrset_rdata_cname_name(const knot_rrset_t *rrset)
 	if (rrset == NULL) {
 		return NULL;
 	}
-	
+
 	knot_dname_t *dname;
 	memcpy(&dname, rrset->rdata, sizeof(knot_dname_t *));
 	return dname;
@@ -1645,7 +1645,7 @@ const knot_dname_t *knot_rrset_rdata_rp_first_dname(const knot_rrset_t *rrset,
 	if (rrset == NULL || pos >= rrset->rdata_count) {
 		return NULL;
 	}
-	
+
 	knot_dname_t *dname;
 	memcpy(&dname, knot_rrset_get_rdata(rrset, pos), sizeof(knot_dname_t *));
 	return dname;
@@ -1657,7 +1657,7 @@ const knot_dname_t *knot_rrset_rdata_rp_second_dname(const knot_rrset_t *rrset,
 	if (rrset == NULL || pos >= rrset->rdata_count) {
 		return NULL;
 	}
-	
+
 	knot_dname_t *dname;
 	memcpy(&dname, knot_rrset_get_rdata(rrset, pos) + sizeof(knot_dname_t *),
 	       sizeof(knot_dname_t *));
@@ -1681,7 +1681,7 @@ uint32_t knot_rrset_rdata_soa_serial(const knot_rrset_t *rrset)
 	if (rrset == NULL) {
 		return 0;
 	}
-	
+
 	return knot_wire_read_u32(rrset->rdata + sizeof(knot_dname_t *) * 2);
 }
 
@@ -1705,8 +1705,8 @@ uint32_t knot_rrset_rdata_soa_refresh(const knot_rrset_t *rrset)
 	if (rrset == NULL) {
 		return 0;
 	}
-	
-	return knot_wire_read_u32(rrset->rdata + 
+
+	return knot_wire_read_u32(rrset->rdata +
 	                          sizeof(knot_dname_t *) * 2 + 4);
 }
 
@@ -1718,8 +1718,8 @@ uint32_t knot_rrset_rdata_soa_retry(const knot_rrset_t *rrset)
 	if (rrset == NULL) {
 		return 0;
 	}
-	
-	return knot_wire_read_u32(rrset->rdata + 
+
+	return knot_wire_read_u32(rrset->rdata +
 	                          sizeof(knot_dname_t *) * 2 + 8);
 }
 
@@ -1730,8 +1730,8 @@ uint32_t knot_rrset_rdata_soa_expire(const knot_rrset_t *rrset)
 	if (rrset == NULL) {
 		return 0;
 	}
-	
-	return knot_wire_read_u32(rrset->rdata + 
+
+	return knot_wire_read_u32(rrset->rdata +
 	                          sizeof(knot_dname_t *) * 2 + 12);
 }
 
@@ -1742,8 +1742,8 @@ uint32_t knot_rrset_rdata_soa_minimum(const knot_rrset_t *rrset)
 	if (rrset == NULL) {
 		return 0;
 	}
-	
-	return knot_wire_read_u32(rrset->rdata + 
+
+	return knot_wire_read_u32(rrset->rdata +
 	                          sizeof(knot_dname_t *) * 2 + 16);
 }
 
@@ -1754,17 +1754,17 @@ uint16_t knot_rrset_rdata_rrsig_type_covered(const knot_rrset_t *rrset)
 	if (rrset == NULL) {
 		return 0;
 	}
-	
+
 	return knot_wire_read_u16(rrset->rdata);
 }
 
-uint8_t knot_rrset_rdata_rrsig_algorithm(const knot_rrset_t *rrset, 
+uint8_t knot_rrset_rdata_rrsig_algorithm(const knot_rrset_t *rrset,
                                          size_t rr_pos)
 {
 	if (rrset == NULL || rr_pos >= rrset->rdata_count) {
 		return 0;
 	}
-	
+
 	return *(knot_rrset_get_rdata(rrset, rr_pos) + 2);
 }
 
@@ -1775,17 +1775,17 @@ uint8_t knot_rrset_rdata_rrsig_labels(const knot_rrset_t *rrset,
 	if (rrset == NULL || rr_pos >= rrset->rdata_count) {
 		return 0;
 	}
-	
+
 	return *(knot_rrset_get_rdata(rrset, rr_pos) + 3);
 }
-	
+
 uint32_t knot_rrset_rdata_rrsig_original_ttl(const knot_rrset_t *rrset,
                                              size_t rr_pos)
 {
 	if (rrset == NULL || rr_pos >= rrset->rdata_count) {
 		return 0;
 	}
-	
+
 	return knot_wire_read_u32(knot_rrset_get_rdata(rrset, rr_pos) + 4);
 }
 
@@ -1795,7 +1795,7 @@ uint32_t knot_rrset_rdata_rrsig_sig_expiration(const knot_rrset_t *rrset,
 	if (rrset == NULL || rr_pos >= rrset->rdata_count) {
 		return 0;
 	}
-	
+
 	return knot_wire_read_u32(knot_rrset_get_rdata(rrset, rr_pos) + 8);
 }
 
@@ -1805,7 +1805,7 @@ uint32_t knot_rrset_rdata_rrsig_sig_inception(const knot_rrset_t *rrset,
 	if (rrset == NULL || rr_pos >= rrset->rdata_count) {
 		return 0;
 	}
-	
+
 	return knot_wire_read_u32(knot_rrset_get_rdata(rrset, rr_pos) + 12);
 }
 
@@ -1815,7 +1815,7 @@ uint16_t knot_rrset_rdata_rrsig_key_tag(const knot_rrset_t *rrset,
 	if (rrset == NULL || rr_pos >= rrset->rdata_count) {
 		return 0;
 	}
-	
+
 	return knot_wire_read_u16(knot_rrset_get_rdata(rrset, rr_pos) + 16);
 }
 
@@ -1825,11 +1825,11 @@ const knot_dname_t *knot_rrset_rdata_rrsig_signer_name(const knot_rrset_t *rrset
 	if (rrset == NULL || rr_pos >= rrset->rdata_count) {
 		return NULL;
 	}
-	
+
 	const knot_dname_t *dname = NULL;
 	memcpy(&dname, knot_rrset_get_rdata(rrset, rr_pos) + 18,
 	       sizeof(knot_dname_t *));
-	
+
 	return dname;
 }
 
@@ -1838,7 +1838,7 @@ uint16_t knot_rrset_rdata_dnskey_flags(const knot_rrset_t *rrset, size_t rr_pos)
 	if (rrset == NULL || rr_pos >= rrset->rdata_count) {
 		return 0;
 	}
-	
+
 	return knot_wire_read_u16(knot_rrset_get_rdata(rrset, rr_pos));
 }
 
@@ -1847,7 +1847,7 @@ uint8_t knot_rrset_rdata_dnskey_proto(const knot_rrset_t *rrset, size_t rr_pos)
 	if (rrset == NULL || rr_pos >= rrset->rdata_count) {
 		return 0;
 	}
-	
+
 	return *(knot_rrset_get_rdata(rrset, rr_pos) + 2);
 }
 
@@ -1856,7 +1856,7 @@ uint8_t knot_rrset_rdata_dnskey_alg(const knot_rrset_t *rrset, size_t rr_pos)
 	if (rrset == NULL || rr_pos >= rrset->rdata_count) {
 		return 0;
 	}
-	
+
 	return *(knot_rrset_get_rdata(rrset, rr_pos) + 3);
 }
 
@@ -1877,7 +1877,7 @@ const knot_dname_t *knot_rrset_rdata_nsec_next(const knot_rrset_t *rrset,
 	if (rrset == NULL) {
 		return NULL;
 	}
-	
+
 	const knot_dname_t *dname;
 	memcpy(&dname, rrset_rdata_pointer(rrset, rr_pos),
 	       sizeof(knot_dname_t *));
@@ -1890,7 +1890,7 @@ void knot_rrset_rdata_nsec_bitmap(const knot_rrset_t *rrset, size_t rr_pos,
 	if (rrset == NULL || rr_pos >= rrset->rdata_count) {
 		return;
 	}
-	
+
 	*bitmap = knot_rrset_get_rdata(rrset, rr_pos) + sizeof(knot_dname_t *);
 	*size = rrset_rdata_item_size(rrset, rr_pos) - sizeof(knot_dname_t *);
 }
@@ -1901,7 +1901,7 @@ void knot_rrset_rdata_nsec3_bitmap(const knot_rrset_t *rrset, size_t rr_pos,
 	if (rrset == NULL || rr_pos >= rrset->rdata_count) {
 		return;
 	}
-	
+
 	/* Bitmap is last, skip all the items. */
 	size_t offset = 1; //hash alg.
 	offset += 1; //flags
@@ -1926,7 +1926,7 @@ uint8_t knot_rrset_rdata_nsec3_algorithm(const knot_rrset_t *rrset,
 	if (rrset == NULL || pos >= rrset->rdata_count) {
 		return 0;
 	}
-	
+
 	return *(rrset_rdata_pointer(rrset, pos));
 }
 
@@ -1936,7 +1936,7 @@ uint8_t knot_rrset_rdata_nsec3_flags(const knot_rrset_t *rrset,
 	if (rrset == NULL || pos >= rrset->rdata_count) {
 		return 0;
 	}
-	
+
 	return *(rrset_rdata_pointer(rrset, pos) + 1);
 }
 
@@ -1948,7 +1948,7 @@ uint16_t knot_rrset_rdata_nsec3_iterations(const knot_rrset_t *rrset,
 	if (rrset == NULL || pos >= rrset->rdata_count) {
 		return 0;
 	}
-	
+
 	return knot_wire_read_u16(rrset_rdata_pointer(rrset, pos) + 2);
 }
 
@@ -1959,7 +1959,7 @@ uint8_t knot_rrset_rdata_nsec3param_flags(const knot_rrset_t *rrset)
 	if (rrset == NULL) {
 		return 0;
 	}
-	
+
 	return *(rrset_rdata_pointer(rrset, 0) + 1);
 }
 
@@ -1970,7 +1970,7 @@ uint8_t knot_rrset_rdata_nsec3param_algorithm(const knot_rrset_t *rrset)
 	if (rrset == NULL) {
 		return 0;
 	}
-	
+
 	return *(rrset_rdata_pointer(rrset, 0));
 }
 
@@ -1981,7 +1981,7 @@ uint16_t knot_rrset_rdata_nsec3param_iterations(const knot_rrset_t *rrset)
 	if (rrset == NULL) {
 		return 0;
 	}
-	
+
 	return knot_wire_read_u16(rrset_rdata_pointer(rrset, 0) + 2);
 }
 
@@ -1992,7 +1992,7 @@ uint8_t knot_rrset_rdata_nsec3param_salt_length(const knot_rrset_t *rrset)
 	if (rrset == NULL) {
 		return 0;
 	}
-	
+
 	return *(rrset_rdata_pointer(rrset, 0) + 4);
 }
 
@@ -2003,7 +2003,7 @@ const uint8_t *knot_rrset_rdata_nsec3param_salt(const knot_rrset_t *rrset)
 	if (rrset == NULL) {
 		return NULL;
 	}
-	
+
 	return rrset_rdata_pointer(rrset, 0) + 5;
 }
 
@@ -2016,7 +2016,7 @@ uint8_t knot_rrset_rdata_nsec3_salt_length(const knot_rrset_t *rrset,
 	if (rrset == NULL || pos >= rrset->rdata_count) {
 		return 0;
 	}
-	
+
 	return *(rrset_rdata_pointer(rrset, pos) + 4);
 }
 
@@ -2026,7 +2026,7 @@ void knot_rrset_rdata_nsec3_next_hashed(const knot_rrset_t *rrset, size_t pos,
 	if (rrset == NULL || pos >= rrset->rdata_count) {
 		return;
 	}
-	
+
 	uint8_t salt_size = knot_rrset_rdata_nsec3_salt_length(rrset, pos);
 	*name_size = *(knot_rrset_get_rdata(rrset, pos) + 4 + salt_size + 1);
 	*name = knot_rrset_get_rdata(rrset, pos) + 4 + salt_size + 2;
@@ -2040,7 +2040,7 @@ const uint8_t *knot_rrset_rdata_nsec3_salt(const knot_rrset_t *rrset,
 	if (rrset == NULL || pos >= rrset->rdata_count) {
 		return NULL;
 	}
-	
+
 	return rrset_rdata_pointer(rrset, pos) + 5;
 }
 
@@ -2051,7 +2051,7 @@ knot_dname_t **knot_rrset_get_next_rr_dname(const knot_rrset_t *rrset,
 	if (rrset == NULL || rr_pos >= rrset->rdata_count) {
 		return NULL;
 	}
-	
+
 	uint8_t *rdata = rrset_rdata_pointer(rrset, rr_pos);
 	if (rrset_type_multiple_dnames(rrset)) {
 		if (prev_dname == NULL) {
@@ -2095,7 +2095,7 @@ knot_dname_t **knot_rrset_get_next_rr_dname(const knot_rrset_t *rrset,
 			}
 		}
 	}
-	
+
 	return NULL;
 }
 
@@ -2105,24 +2105,24 @@ knot_dname_t **knot_rrset_get_next_dname(const knot_rrset_t *rrset,
 	if (rrset == NULL || rrset->rdata_count == 0) {
 		return NULL;
 	}
-	
+
 	/* 1) Find in which RR is the given dname. */
 	size_t pos = 0;
 	int ret = rrset_find_rr_pos_for_pointer(rrset, prev_dname, &pos);
 	if (ret != KNOT_EOK) {
 		return NULL;
 	}
-	
+
 	/* 2) Try to get next dname from the RR. */
-	knot_dname_t **next = 
+	knot_dname_t **next =
 		knot_rrset_get_next_rr_dname(rrset, prev_dname, pos);
-	
+
 	/* 3) If not found and there is a next RR to search in, try it. */
 	if (next == NULL && pos < rrset->rdata_count - 1) {
 		// prev_dname = NULL because in this RR we haven't searched yet
 		next = knot_rrset_get_next_rr_dname(rrset, NULL, pos + 1);
 	}
-	
+
 	return next;
 }
 
@@ -2132,9 +2132,9 @@ dbg_rrset_exec_detail(
 	if (rrset == NULL) {
 		return;
 	}
-	
+
 	dbg_rrset_detail("      ------- RRSET -------\n");
-	
+
 	char *name = knot_dname_to_str(rrset->owner);
 	dbg_rrset_detail("  owner: %s\n", name);
 	free(name);
@@ -2142,26 +2142,26 @@ dbg_rrset_exec_detail(
 	dbg_rrset_detail("  class: %d\n",  rrset->rclass);
 	dbg_rrset_detail("  ttl: %d\n", rrset->ttl);
 	dbg_rrset_detail("  RDATA count: %d\n", rrset->rdata_count);
-	
+
 	dbg_rrset_detail("  RRSIGs:\n");
 	if (rrset->rrsigs != NULL) {
 	        knot_rrset_dump(rrset->rrsigs);
 	} else {
 	        dbg_rrset_detail("  none\n");
 	}
-	
+
 	dbg_rrset_detail("RDATA indices (total=%d):\n",
 	        rrset_rdata_size_total(rrset));
-	
+
 	for (uint16_t i = 0; i < rrset->rdata_count; i++) {
 		dbg_rrset_detail("%d=%d ", i, rrset_rdata_offset(rrset, i));
 	}
 	dbg_rrset_detail("\n");
-	
+
 	if (knot_rrset_rdata_rr_count(rrset) == 0) {
 		dbg_rrset_detail("NO RDATA\n");
 	}
-	
+
 	for (uint16_t i = 0; i < knot_rrset_rdata_rr_count(rrset); i++) {
 		knot_rrset_rdata_dump(rrset, i);
 	}
@@ -2187,7 +2187,7 @@ uint64_t rrset_binary_size(const knot_rrset_t *rrset)
 		/* Actual data. */
 		size += rrset_binary_size_one(rrset, i);
 	}
-	
+
 	return size;
 }
 
@@ -2196,11 +2196,11 @@ int rrset_serialize(const knot_rrset_t *rrset, uint8_t *stream, size_t *size)
 	if (rrset == NULL || rrset->rdata_count == 0) {
 		return KNOT_EINVAL;
 	}
-	
+
 	uint64_t rrset_length = rrset_binary_size(rrset);
 	dbg_rrset_detail("rr: serialize: Binary size=%"PRIu64"\n", rrset_length);
 	memcpy(stream, &rrset_length, sizeof(uint64_t));
-	
+
 	size_t offset = sizeof(uint64_t);
 	/* Save RR indices. Size first. */
 	memcpy(stream + offset, &rrset->rdata_count, sizeof(uint16_t));
@@ -2214,7 +2214,7 @@ int rrset_serialize(const knot_rrset_t *rrset, uint8_t *stream, size_t *size)
 	memcpy(stream + offset, knot_dname_name(rrset->owner),
 	       knot_dname_size(rrset->owner));
 	offset += knot_dname_size(rrset->owner);
-	
+
 	/* Save static data. */
 	memcpy(stream + offset, &rrset->type, sizeof(uint16_t));
 	offset += sizeof(uint16_t);
@@ -2222,7 +2222,7 @@ int rrset_serialize(const knot_rrset_t *rrset, uint8_t *stream, size_t *size)
 	offset += sizeof(uint16_t);
 	memcpy(stream + offset, &rrset->ttl, sizeof(uint32_t));
 	offset += sizeof(uint32_t);
-	
+
 	/* Copy RDATA. */
 	for (uint16_t i = 0; i < rrset->rdata_count; i++) {
 		size_t size_one = 0;
@@ -2237,7 +2237,7 @@ int rrset_serialize(const knot_rrset_t *rrset, uint8_t *stream, size_t *size)
 		assert(size_one == rr_size);
 		offset += size_one;
 	}
-	
+
 	*size = offset;
 	assert(*size == rrset_length);
 	dbg_rrset_detail("rr: serialize: RRSet serialized, size=%zu\n", *size);
@@ -2254,13 +2254,13 @@ int rrset_serialize_alloc(const knot_rrset_t *rrset, uint8_t **stream,
 		dbg_rrset("rrset: serialize alloc: No data to serialize.\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Prepare memory. */
 	*stream = malloc(*size);
 	if (*stream == NULL) {
 		return KNOT_ENOMEM;
 	}
-	
+
 	return rrset_serialize(rrset, *stream, size);
 }
 
@@ -2279,7 +2279,7 @@ int rrset_deserialize(uint8_t *stream, size_t *stream_size,
 		          rrset_length);
 		return KNOT_ESPACE;
 	}
-	
+
 	size_t offset = sizeof(uint64_t);
 	uint16_t rdata_count = 0;
 	memcpy(&rdata_count, stream + offset, sizeof(uint16_t));
@@ -2307,14 +2307,14 @@ int rrset_deserialize(uint8_t *stream, size_t *stream_size,
 	uint32_t ttl = 0;
 	memcpy(&ttl, stream + offset, sizeof(uint32_t));
 	offset += sizeof(uint32_t);
-	
+
 	/* Create new RRSet. */
 	*rrset = knot_rrset_new(owner, type, rclass, ttl);
 	if (*rrset == NULL) {
 		return KNOT_ENOMEM;
 	}
 	knot_dname_release(owner);
-	
+
 	(*rrset)->rdata_indices = rdata_indices;
 	(*rrset)->rdata_count = rdata_count;
 
@@ -2344,13 +2344,13 @@ int rrset_deserialize(uint8_t *stream, size_t *stream_size,
 		assert(read == rdata_size);
 		offset += read;
 	}
-	
+
 dbg_rrset_exec_detail(
 	dbg_rrset_detail("RRSet deserialized:\n");
 	knot_rrset_dump(*rrset);
 );
 	*stream_size = *stream_size - offset;
-	
+
 	return KNOT_EOK;
 }
 
@@ -2360,7 +2360,7 @@ const knot_dname_t *knot_rrset_rdata_ns_name(const knot_rrset_t *rrset,
 	if (rrset == NULL) {
 		return NULL;
 	}
-	
+
 	const knot_dname_t *dname;
 	memcpy(&dname, rrset_rdata_pointer(rrset, rdata_pos),
 	       sizeof(knot_dname_t *));
@@ -2373,7 +2373,7 @@ const knot_dname_t *knot_rrset_rdata_mx_name(const knot_rrset_t *rrset,
 	if (rrset == NULL) {
 		return NULL;
 	}
-	
+
 	knot_dname_t *dname;
 	memcpy(&dname, rrset_rdata_pointer(rrset, rdata_pos) + 2,
 	       sizeof(knot_dname_t *));
@@ -2386,7 +2386,7 @@ const knot_dname_t *knot_rrset_rdata_srv_name(const knot_rrset_t *rrset,
 	if (rrset == NULL) {
 		return NULL;
 	}
-	
+
 	knot_dname_t *dname;
 	memcpy(&dname, rrset_rdata_pointer(rrset, rdata_pos) + 6,
 	       sizeof(knot_dname_t *));
@@ -2399,7 +2399,7 @@ const knot_dname_t *knot_rrset_rdata_name(const knot_rrset_t *rrset,
 	if (rrset == NULL || rrset->rdata_count <= rdata_pos) {
 		return NULL;
 	}
-	
+
 	switch (rrset->type) {
 		case KNOT_RRTYPE_NS:
 			return knot_rrset_rdata_ns_name(rrset, rdata_pos);
@@ -2426,7 +2426,7 @@ int knot_rrset_find_rr_pos(const knot_rrset_t *rr_search_in,
 			found = 1;
 		}
 	}
-	
+
 	return found ? KNOT_EOK : KNOT_ENOENT;
 }
 
@@ -2457,7 +2457,7 @@ int knot_rrset_remove_rr(knot_rrset_t *rrset,
 		               knot_strerror(ret));
 		return ret;
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -2466,11 +2466,11 @@ int knot_rrset_rdata_reset(knot_rrset_t *rrset)
 	if (rrset == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	rrset->rdata = NULL;
 	rrset->rdata_indices = NULL;
 	rrset->rdata_count = 0;
-	
+
 	return KNOT_EOK;
 }
 
@@ -2481,7 +2481,7 @@ int rrset_rr_dnames_apply(knot_rrset_t *rrset, size_t rdata_pos,
 		return KNOT_EINVAL;
 	}
 
-	
+
 	knot_dname_t **dname = NULL;
 	while ((dname = knot_rrset_get_next_rr_dname(rrset, dname,
 	                                             rdata_pos))) {
@@ -2493,7 +2493,7 @@ int rrset_rr_dnames_apply(knot_rrset_t *rrset, size_t rdata_pos,
 			return ret;
 		}
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -2503,14 +2503,14 @@ int rrset_dnames_apply(knot_rrset_t *rrset, int (*func)(knot_dname_t **, void *)
 	if (rrset == NULL || rrset->rdata_count == 0 || func == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	for (uint16_t i = 0; i < rrset->rdata_count; ++i) {
 		int ret = rrset_rr_dnames_apply(rrset, i, func, data);
 		if (ret != KNOT_EOK) {
 			return ret;
 		}
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -2521,7 +2521,7 @@ int knot_rrset_add_rr_from_rrset(knot_rrset_t *dest, const knot_rrset_t *source,
 	    rdata_pos >= source->rdata_count) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Get size of RDATA to be copied. */
 	uint16_t item_size = rrset_rdata_item_size(source, rdata_pos);
 	/* Reserve space in dest RRSet. */
@@ -2530,10 +2530,10 @@ int knot_rrset_add_rr_from_rrset(knot_rrset_t *dest, const knot_rrset_t *source,
 		dbg_rrset("rr: add_rr_from_rrset: Could not create RDATA.\n");
 		return KNOT_ERROR;
 	}
-	
+
 	/* Copy actual data. */
 	memcpy(rdata, rrset_rdata_pointer(source, rdata_pos), item_size);
-	
+
 	/* Retain DNAMEs inside RDATA. */
 	int ret = rrset_rr_dnames_apply((knot_rrset_t *)source, rdata_pos,
 	                                rrset_retain_dnames_in_rr, NULL);
@@ -2542,7 +2542,7 @@ int knot_rrset_add_rr_from_rrset(knot_rrset_t *dest, const knot_rrset_t *source,
 		          " in RR (%s).\n", knot_strerror(ret));
 		return ret;
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -2551,7 +2551,7 @@ int knot_rrset_remove_rr_using_rrset(knot_rrset_t *from,
                                      knot_rrset_t **rr_deleted, int ddns_check)
 {
 	/* [code-review] Missing parameter checks. */
-	
+
 	knot_rrset_t *return_rr = NULL;
 	int ret = knot_rrset_shallow_copy(what, &return_rr);
 	if (ret != KNOT_EOK) {
@@ -2572,11 +2572,11 @@ int knot_rrset_remove_rr_using_rrset(knot_rrset_t *from,
 		 * may not even be in the zone.
 		 */
 		//TODO REVIEW LS : relevant?
-		/* [code-review] Hm, it seems OK, but the variable should be 
-		 *               documented, maybe even named differently. 
-		 *               Setting it to 1 means: 'leave the last RR in 
+		/* [code-review] Hm, it seems OK, but the variable should be
+		 *               documented, maybe even named differently.
+		 *               Setting it to 1 means: 'leave the last RR in
 		 *               the RRSet'. Deciding whether to leave the last
-		 *               there is on the caller. Thus the assert() is 
+		 *               there is on the caller. Thus the assert() is
 		 *               wrong (it MAY be used in other cases).
 		 *               Also there can be just break; instead of the
 		 *               parameter setting and return.
@@ -2586,7 +2586,7 @@ int knot_rrset_remove_rr_using_rrset(knot_rrset_t *from,
 			*rr_deleted = return_rr;
 			return KNOT_EOK;
 		}
-		
+
 		ret = knot_rrset_remove_rr(from, what, i);
 		if (ret == KNOT_EOK) {
 			/* RR was removed, can be added to 'return' RRSet. */
@@ -2609,7 +2609,7 @@ int knot_rrset_remove_rr_using_rrset(knot_rrset_t *from,
 			return ret;
 		}
 	}
-	
+
 	*rr_deleted = return_rr;
 	return KNOT_EOK;
 }
@@ -2631,7 +2631,7 @@ int knot_rrset_remove_rr_using_rrset_del(knot_rrset_t *from,
 //			return ret;
 //		}
 //	}
-	
+
 //	return KNOT_EOK;
 }
 
@@ -2640,7 +2640,7 @@ void knot_rrset_set_class(knot_rrset_t *rrset, uint16_t rclass)
 	if (!rrset) {
 		return;
 	}
-	
+
 	rrset->rclass = rclass;
 }
 
@@ -2664,4 +2664,3 @@ int knot_rrset_ds_check(const knot_rrset_t *rrset)
 	}
 	return KNOT_EOK;
 }
-
diff --git a/src/libknot/rrset.h b/src/libknot/rrset.h
index aebef231e0230c86790a876b4463b639fca17f42..383125cd05328f9caa76644957a93213fcd783c2 100644
--- a/src/libknot/rrset.h
+++ b/src/libknot/rrset.h
@@ -50,10 +50,10 @@ struct knot_rrset {
 	uint16_t type; /*!< TYPE of the RRset. */
 	uint16_t rclass; /*!< CLASS of the RRSet. */
 	uint32_t ttl; /*!< TTL of the RRSet. */
-	
+
 	/* [code-review] It would be fine to better describe the format of this
 	 * array and the meaning of the indices. Maybe even draw some simple
-	 * image :-) 
+	 * image :-)
 	 */
 	uint8_t *rdata; /*!< RDATA array (All RRs). */
 	/*! \brief Beginnings of RRs - first one does not contain 0, last
@@ -116,7 +116,7 @@ int knot_rrset_add_rdata(knot_rrset_t *rrset, const uint8_t *rdata,
 
 /*!
  * \brief Creates RDATA memory and returns a pointer to it.
- *        If the RRSet is not empty, function will return a memory 
+ *        If the RRSet is not empty, function will return a memory
  *        pointing to a beginning of a new RR. (Indices will be handled as well)
  *
  * \param rrset RRSet to add the RDATA to.
@@ -350,7 +350,7 @@ int knot_rrset_merge(knot_rrset_t *rrset1, const knot_rrset_t *rrset2);
 
 
 /*!
- * \brief Merges two RRSets, but will only merge unique items. 
+ * \brief Merges two RRSets, but will only merge unique items.
  *
  * \param r1 Pointer to RRSet to be merged into.
  * \param r2 Poitner to RRSet to be merged.
@@ -460,8 +460,8 @@ const knot_dname_t *knot_rrset_rdata_minfo_second_dname(const knot_rrset_t *rrse
  * \param prev_dname Pointer to previous dname.
  * \return next dname or NULL.
  */
-/* [code-review] Emphasize that the 'prev' pointer must point into the RDATA 
- * array of the given RRSet. 
+/* [code-review] Emphasize that the 'prev' pointer must point into the RDATA
+ * array of the given RRSet.
  */
 knot_dname_t **knot_rrset_get_next_dname(const knot_rrset_t *rrset,
                                                  knot_dname_t **prev);
@@ -530,7 +530,7 @@ int rrset_rr_dnames_apply(knot_rrset_t *rrset, size_t rdata_pos,
 int rrset_dnames_apply(knot_rrset_t *rrset, int (*func)(knot_dname_t **, void *),
                        void *data);
 
-int knot_rrset_rdata_from_wire_one(knot_rrset_t *rrset, 
+int knot_rrset_rdata_from_wire_one(knot_rrset_t *rrset,
                                    const uint8_t *wire, size_t *pos,
                                    size_t total_size, size_t rdlength);
 
@@ -538,4 +538,3 @@ int knot_rrset_ds_check(const knot_rrset_t *rrset);
 #endif /* _KNOT_RRSET_H_ */
 
 /*! @} */
-
diff --git a/src/libknot/tsig-op.c b/src/libknot/tsig-op.c
index 29bad82c6376188c82c962f5550b61cf7c48cb87..b9b000a3a9c8d8025e7b5298d409cd3abd442295 100644
--- a/src/libknot/tsig-op.c
+++ b/src/libknot/tsig-op.c
@@ -38,7 +38,7 @@ static int knot_tsig_check_algorithm(const knot_rrset_t *tsig_rr)
 	if (tsig_rr == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	const knot_dname_t *alg_name = tsig_rdata_alg_name(tsig_rr);
 	if (!alg_name) {
 		return KNOT_EMALF;
@@ -60,7 +60,7 @@ static int knot_tsig_check_key(const knot_rrset_t *tsig_rr,
 	if (tsig_rr == NULL || tsig_key == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	const knot_dname_t *tsig_name = knot_rrset_owner(tsig_rr);
 	if (!tsig_name) {
 		return KNOT_EMALF;
@@ -143,7 +143,7 @@ static int knot_tsig_compute_digest(const uint8_t *wire, size_t wire_len,
 	HMAC_Update(&ctx, (const unsigned char *)wire, wire_len);
 	HMAC_Final(&ctx, digest, &tmp_dig_len);
 	*digest_len = tmp_dig_len;
-	
+
 	HMAC_CTX_cleanup(&ctx);
 
 	return KNOT_EOK;
@@ -193,7 +193,7 @@ static int knot_tsig_write_tsig_variables(uint8_t *wire,
 		dbg_tsig("TSIG: write tsig variables: NULL arguments.\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Copy TSIG variables - starting with key name. */
 	const knot_dname_t *tsig_owner = knot_rrset_owner(tsig_rr);
 	if (!tsig_owner) {
@@ -297,7 +297,7 @@ static int knot_tsig_wire_write_timers(uint8_t *wire,
 		dbg_tsig("TSIG: write timers: NULL arguments.\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	//write time signed
 	knot_wire_write_u48(wire, tsig_rdata_time_signed(tsig_rr));
 	//write fudge
@@ -426,9 +426,9 @@ static int knot_tsig_create_sign_wire_next(const uint8_t *msg, size_t msg_len,
 	dbg_tsig_verb("Copying original message.\n");
 	memcpy(wire + prev_mac_len + 2, msg, msg_len);
 	/* Copy TSIG variables. */
-	
+
 	dbg_tsig_verb("Writing TSIG timers.\n");
-	ret = knot_tsig_wire_write_timers(wire + prev_mac_len + msg_len + 2, 
+	ret = knot_tsig_wire_write_timers(wire + prev_mac_len + msg_len + 2,
 	                                  tmp_tsig);
 	if (ret != KNOT_EOK) {
 		dbg_tsig("TSIG: create wire: failed to write TSIG "
@@ -481,8 +481,8 @@ int knot_tsig_sign(uint8_t *msg, size_t *msg_len,
 	}
 
 	/* Create rdata for TSIG RR. */
-	tsig_create_rdata(tmp_tsig, knot_tsig_digest_length(key->algorithm), 
-	                  (tsig_rcode == KNOT_RCODE_BADTIME) 
+	tsig_create_rdata(tmp_tsig, knot_tsig_digest_length(key->algorithm),
+	                  (tsig_rcode == KNOT_RCODE_BADTIME)
 	                    ? tsig_rcode
 	                    : 0);
 	tsig_rdata_set_alg(tmp_tsig, key->algorithm);
@@ -557,7 +557,7 @@ dbg_rrset_exec_detail(
 
 	uint16_t arcount = knot_wire_get_arcount(msg);
 	knot_wire_set_arcount(msg, ++arcount);
-	
+
 	// everything went ok, save the digest to the output parameter
 	memcpy(digest, digest_tmp, digest_tmp_len);
 	*digest_len = digest_tmp_len;
@@ -574,7 +574,7 @@ int knot_tsig_sign_next(uint8_t *msg, size_t *msg_len, size_t msg_max_len,
 	if (!msg || !msg_len || !key || !key || !digest || !digest_len) {
 		return KNOT_EINVAL;
 	}
-	
+
 	uint8_t digest_tmp[KNOT_TSIG_MAX_DIGEST_SIZE];
 	size_t digest_tmp_len = 0;
 
@@ -584,13 +584,13 @@ int knot_tsig_sign_next(uint8_t *msg, size_t *msg_len, size_t msg_max_len,
 	if (!tmp_tsig) {
 		return KNOT_ENOMEM;
 	}
-	
+
 	/* Create rdata for TSIG RR. */
 	tsig_create_rdata(tmp_tsig, knot_tsig_digest_length(key->algorithm), 0);
 	tsig_rdata_set_alg(tmp_tsig, key->algorithm);
 	tsig_rdata_store_current_time(tmp_tsig);
 	tsig_rdata_set_fudge(tmp_tsig, KNOT_TSIG_FUDGE_DEFAULT);
-	
+
 	/* Create wire to be signed. */
 	size_t wire_len = prev_digest_len + to_sign_len
 	                  + KNOT_TSIG_TIMERS_LENGTH + 2;
@@ -622,7 +622,7 @@ int knot_tsig_sign_next(uint8_t *msg, size_t *msg_len, size_t msg_max_len,
 	int ret = KNOT_ERROR;
 	ret = knot_tsig_compute_digest(wire, wire_len,
 	                               digest_tmp, &digest_tmp_len, key);
-	
+
 	/* No matter how the function did, this data is no longer needed. */
 	free(wire);
 	if (ret != KNOT_EOK) {
@@ -630,7 +630,7 @@ int knot_tsig_sign_next(uint8_t *msg, size_t *msg_len, size_t msg_max_len,
 		*digest_len = 0;
 		return ret;
 	}
-	
+
 	if (digest_tmp_len > *digest_len) {
 		knot_rrset_deep_free(&tmp_tsig, 1, 1);
 		*digest_len = 0;
@@ -639,10 +639,10 @@ int knot_tsig_sign_next(uint8_t *msg, size_t *msg_len, size_t msg_max_len,
 
 	/* Set the MAC. */
 	tsig_rdata_set_mac(tmp_tsig, digest_tmp_len, digest_tmp);
-	
+
 	/* Set original id. */
 	tsig_rdata_set_orig_id(tmp_tsig, knot_wire_get_id(msg));
-	
+
 	/* Set other data. */
 	tsig_rdata_set_other_data(tmp_tsig, 0, NULL);
 
@@ -671,7 +671,7 @@ int knot_tsig_sign_next(uint8_t *msg, size_t *msg_len, size_t msg_max_len,
 	*msg_len += tsig_wire_size;
 	uint16_t arcount = knot_wire_get_arcount(msg);
 	knot_wire_set_arcount(msg, ++arcount);
-	
+
 	memcpy(digest, digest_tmp, digest_tmp_len);
 	*digest_len = digest_tmp_len;
 
@@ -729,7 +729,7 @@ static int knot_tsig_check_digest(const knot_rrset_t *tsig_rr,
 
 	memset(wire_to_sign, 0, sizeof(uint8_t) * size);
 	memcpy(wire_to_sign, wire, size);
-	
+
 	/* Restore message id. */
 	knot_wire_set_id(wire_to_sign, tsig_rdata_orig_id(tsig_rr));
 
@@ -740,16 +740,16 @@ static int knot_tsig_check_digest(const knot_rrset_t *tsig_rr,
 	uint8_t digest_tmp[KNOT_TSIG_MAX_DIGEST_SIZE];
 	size_t digest_tmp_len = 0;
 	assert(tsig_rr->rdata);
-	
+
 	if (use_times) {
-		ret = knot_tsig_create_sign_wire_next(wire_to_sign, size, 
+		ret = knot_tsig_create_sign_wire_next(wire_to_sign, size,
 		                                 request_mac, request_mac_len,
-		                                 digest_tmp, &digest_tmp_len, 
+		                                 digest_tmp, &digest_tmp_len,
 		                                 tsig_rr, tsig_key);
 	} else {
-		ret = knot_tsig_create_sign_wire(wire_to_sign, size, 
+		ret = knot_tsig_create_sign_wire(wire_to_sign, size,
 		                                 request_mac, request_mac_len,
-		                                 digest_tmp, &digest_tmp_len, 
+		                                 digest_tmp, &digest_tmp_len,
 		                                 tsig_rr, tsig_key);
 	}
 
@@ -852,7 +852,7 @@ int knot_tsig_add(uint8_t *msg, size_t *msg_len, size_t msg_max_len,
 		knot_dname_free(&key_name);
 		return KNOT_ENOMEM;
 	}
-	
+
 	/* Already referenced in tmp_tsig, release. */
 	knot_dname_release(key_name);
 
@@ -863,8 +863,8 @@ int knot_tsig_add(uint8_t *msg, size_t *msg_len, size_t msg_max_len,
 		knot_rrset_deep_free(&tmp_tsig, 1, 1);
 		return KNOT_ERROR;
 	}
-	
-	
+
+
 	/* Create rdata for TSIG RR. */
 	knot_tsig_algorithm_t alg = tsig_alg_from_name(alg_name);
 	if (alg == KNOT_TSIG_ALG_NULL) {
@@ -873,7 +873,7 @@ int knot_tsig_add(uint8_t *msg, size_t *msg_len, size_t msg_max_len,
 		knot_dname_free(&alg_name);
 		return KNOT_ERROR;
 	}
-	
+
 	assert(tsig_rcode != KNOT_RCODE_BADTIME);
 	tsig_create_rdata(tmp_tsig, 0, tsig_rcode); /* No digest. */
 
@@ -890,7 +890,7 @@ int knot_tsig_add(uint8_t *msg, size_t *msg_len, size_t msg_max_len,
 	/* Set original ID */
 	tsig_rdata_set_orig_id(tmp_tsig, knot_wire_get_id(msg));
 
-	
+
 	/* Set other len. */
 	tsig_rdata_set_other_data(tmp_tsig, 0, 0);
 
@@ -918,4 +918,3 @@ int knot_tsig_add(uint8_t *msg, size_t *msg_len, size_t msg_max_len,
 
 	return KNOT_EOK;
 }
-
diff --git a/src/libknot/tsig.c b/src/libknot/tsig.c
index 8e5b0ef32d0af2b0b42134bd71c42e019047d77b..cbd6a739f9bdb2fd7a9a0f72bc3a7a9d1986e14e 100644
--- a/src/libknot/tsig.c
+++ b/src/libknot/tsig.c
@@ -62,7 +62,7 @@ static uint8_t* tsig_rdata_seek(const knot_rrset_t *rr, tsig_off_t id, size_t nb
 	if (rd == NULL) {
 		return NULL;
 	}
-	
+
 	/* Check if fixed part is readable. */
 	uint16_t lim = rrset_rdata_item_size(rr, 0);
 	if (lim < TSIG_NAMELEN + 5 * sizeof(uint16_t)) {
@@ -71,7 +71,7 @@ static uint8_t* tsig_rdata_seek(const knot_rrset_t *rr, tsig_off_t id, size_t nb
 		         lim, TSIG_NAMELEN + 5 * sizeof(uint16_t));
 		return NULL;
 	}
-	
+
 	/* Not pretty, but fast. */
 	uint8_t *bp = rd;
 	switch(id) {
@@ -84,7 +84,7 @@ static uint8_t* tsig_rdata_seek(const knot_rrset_t *rr, tsig_off_t id, size_t nb
 		rd += TSIG_NAMELEN + 4 * sizeof(uint16_t);
 		rd += knot_wire_read_u16(rd) + sizeof(uint16_t);
 		break;
-		
+
 	case TSIG_ERROR_O:
 		rd += TSIG_NAMELEN + 4 * sizeof(uint16_t);
 		rd += knot_wire_read_u16(rd) + 2 * sizeof(uint16_t);
@@ -98,14 +98,14 @@ static uint8_t* tsig_rdata_seek(const knot_rrset_t *rr, tsig_off_t id, size_t nb
 		rd += knot_wire_read_u16(rd) + 4 * sizeof(uint16_t);
 		break;
 	}
-	
+
 	/* Check remaining bytes. */
 	if (rd + nb > bp + lim) {
 		dbg_tsig("TSIG: rdata: not enough items (needs %zu, has %u).\n",
 		         (rd-bp)+nb, lim);
 		return NULL;
 	}
-	
+
 	return rd;
 }
 
@@ -115,7 +115,7 @@ static int tsig_rdata_set_tsig_error(knot_rrset_t *tsig, uint16_t tsig_error)
 	if (!rd) {
 		return KNOT_ERROR;
 	}
-	
+
 	knot_wire_write_u16(rd, tsig_error);
 	return KNOT_EOK;
 }
@@ -125,7 +125,7 @@ int tsig_create_rdata(knot_rrset_t *rr, uint16_t maclen, uint16_t tsig_err)
 	if (!rr) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* We already checked rr and know rdlen > 0, no need to check rets. */
 	size_t rdlen = TSIG_FIXED_RDLEN + maclen;
 	if (tsig_err != KNOT_RCODE_BADTIME) {
@@ -133,11 +133,11 @@ int tsig_create_rdata(knot_rrset_t *rr, uint16_t maclen, uint16_t tsig_err)
 	}
 	uint8_t *rd = knot_rrset_create_rdata(rr, rdlen);
 	memset(rd, 0, rdlen);
-	
+
 	/* Set MAC variable length in advance. */
 	rd += TSIG_OFF_MACLEN;
 	knot_wire_write_u16(rd, maclen);
-	
+
 	/* Set error. */
 	tsig_rdata_set_tsig_error(rr, tsig_err);
 
@@ -150,7 +150,7 @@ int tsig_rdata_set_alg_name(knot_rrset_t *tsig, knot_dname_t *alg_name)
 	if (!rd) {
 		return KNOT_ERROR;
 	}
-	
+
 	memcpy(rd, &alg_name, sizeof(knot_dname_t*));
 	knot_dname_retain(alg_name);
 	return KNOT_EOK;
@@ -171,7 +171,7 @@ int tsig_rdata_set_time_signed(knot_rrset_t *tsig, uint64_t time)
 	if (!rd) {
 		return KNOT_ERROR;
 	}
-	
+
 	knot_wire_write_u48(rd, time);
 	return KNOT_EOK;
 }
@@ -182,7 +182,7 @@ int tsig_rdata_set_fudge(knot_rrset_t *tsig, uint16_t fudge)
 	if (!rd) {
 		return KNOT_ERROR;
 	}
-	
+
 	knot_wire_write_u16(rd, fudge);
 	return KNOT_EOK;
 }
@@ -193,7 +193,7 @@ int tsig_rdata_set_mac(knot_rrset_t *tsig, uint16_t length, const uint8_t *mac)
 	if (!rd) {
 		return KNOT_ERROR;
 	}
-	
+
 	/*! \note Cannot change length, as rdata is already preallocd. */
 
 	/* Copy the actual MAC. */
@@ -207,7 +207,7 @@ int tsig_rdata_set_orig_id(knot_rrset_t *tsig, uint16_t id)
 	if (!rd) {
 		return KNOT_ERROR;
 	}
-	
+
 	/* Write the length - 2. */
 	knot_wire_write_u16(rd, id);
 	return KNOT_EOK;
@@ -225,10 +225,10 @@ int tsig_rdata_set_other_data(knot_rrset_t *tsig, uint16_t len,
 	if (!rd) {
 		return KNOT_ERROR;
 	}
-	
+
 	/* Write the length. */
 	knot_wire_write_u16(rd, len);
-	
+
 	/* Copy the actual data. */
 	memcpy(rd + sizeof(uint16_t), other_data, len);
 	return KNOT_EOK;
@@ -446,7 +446,7 @@ size_t tsig_wire_actsize(const knot_rrset_t *tsig)
 	if (tsig == NULL) {
 		return 0;
 	}
-	
+
 	/*! \todo Used fixed size as a base. */
 	return knot_dname_size(knot_rrset_owner(tsig)) +
 	sizeof(uint16_t) + /* TYPE */
@@ -468,7 +468,7 @@ int tsig_rdata_is_ok(const knot_rrset_t *tsig)
 {
 	/*! \todo Check size, needs to check variable-length fields. */
 	return (tsig
-	        && knot_rrset_get_rdata(tsig, 0) != NULL 
+	        && knot_rrset_get_rdata(tsig, 0) != NULL
 	        && tsig_rdata_seek(tsig, TSIG_OTHER_O, 0) != NULL
 	        && tsig_rdata_alg_name(tsig) != NULL
 	        && tsig_rdata_time_signed(tsig) != 0);
diff --git a/src/libknot/updates/changesets.c b/src/libknot/updates/changesets.c
index 5fe84ced93abac8d9541fd8d573a51425cff7c01..b00ae6fb0739a2f1498acc6b452fbdb46e1f16cd 100644
--- a/src/libknot/updates/changesets.c
+++ b/src/libknot/updates/changesets.c
@@ -88,7 +88,7 @@ int knot_changeset_allocate(knot_changesets_t **changesets,
 		*changesets = NULL;
 		return KNOT_ENOMEM;
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -311,7 +311,7 @@ void knot_free_changeset(knot_changeset_t **changeset)
 		knot_rrset_deep_free(&(*changeset)->remove[j], 1, 1);
 	}
 	free((*changeset)->remove);
-	
+
 	knot_rrset_deep_free(&(*changeset)->soa_from, 1, 1);
 	knot_rrset_deep_free(&(*changeset)->soa_to, 1, 1);
 
@@ -337,9 +337,9 @@ void knot_free_changesets(knot_changesets_t **changesets)
 	}
 
 	free((*changesets)->sets);
-	
+
 	knot_rrset_deep_free(&(*changesets)->first_soa, 1, 1);
-	
+
 	assert((*changesets)->changes == NULL);
 
 	free(*changesets);
@@ -356,7 +356,7 @@ int knot_changes_rrsets_reserve(knot_rrset_t ***rrsets,
 	if (rrsets == NULL || count == NULL || allocated == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	if (*count + to_add <= *allocated) {
 		return KNOT_EOK;
 	}
@@ -392,7 +392,7 @@ int knot_changes_nodes_reserve(knot_node_t ***nodes,
 	if (nodes == NULL || count == NULL || allocated == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	if (*count + 2 <= *allocated) {
 		return KNOT_EOK;
 	}
@@ -426,7 +426,7 @@ int knot_changes_rdata_reserve(knot_rrset_t ***rdatas,
 	if (rdatas == NULL || allocated == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	if (count + to_add <= *allocated) {
 		return KNOT_EOK;
 	}
@@ -464,7 +464,7 @@ void knot_changes_add_rdata(knot_rrset_t **rdatas, int *count,
 	if (rdatas == NULL || count == NULL || rrset == NULL || rrset->rdata_count == 0) {
 		return;
 	}
-	
+
 	rdatas[*count] = rrset;
 	*count += 1;
 }
@@ -499,20 +499,20 @@ int knot_changes_add_old_rrsets(knot_rrset_t **rrsets, int count,
 		if (rrsets[i] == NULL) {
 			continue;
 		}
-		
+
 		knot_rrset_t *rrsigs = knot_rrset_get_rrsigs(rrsets[i]);
-		
+
 		if (add_rdata) {
-			
+
 			/* RDATA count in the RRSet. */
 			int rdata_count = 1;
-			
+
 			if (rrsigs != NULL) {
-				/* Increment the RDATA count by the count of 
+				/* Increment the RDATA count by the count of
 				 * RRSIGs. */
 				rdata_count += 1;
 			}
-	
+
 			/* Remove old RDATA. */
 			ret = knot_changes_rdata_reserve(&changes->old_rdata,
 			                          changes->old_rdata_count,
@@ -526,12 +526,12 @@ int knot_changes_add_old_rrsets(knot_rrset_t **rrsets, int count,
 			knot_changes_add_rdata(changes->old_rdata,
 			                       &changes->old_rdata_count,
 			                       rrsets[i]);
-			
+
 			knot_changes_add_rdata(changes->old_rdata,
 			                       &changes->old_rdata_count,
 			                       rrsigs);
 		}
-		
+
 		/* Disconnect RRsigs from rrset. */
 		knot_rrset_set_rrsigs(rrsets[i], NULL);
 		changes->old_rrsets[changes->old_rrsets_count++] = rrsets[i];
@@ -569,7 +569,7 @@ int knot_changes_add_new_rrsets(knot_rrset_t **rrsets, int count,
 		if (rrsets[i] == NULL) {
 			continue;
 		}
-		
+
 		if (add_rdata) {
 			ret = knot_changes_rdata_reserve(&changes->new_rdata,
 			                          changes->new_rdata_count,
@@ -578,12 +578,12 @@ int knot_changes_add_new_rrsets(knot_rrset_t **rrsets, int count,
 			if (ret != KNOT_EOK) {
 				return ret;
 			}
-			
+
 			knot_changes_add_rdata(changes->new_rdata,
 			                       &changes->new_rdata_count,
 			                       rrsets[i]);
-		}	
-		
+		}
+
 		changes->new_rrsets[changes->new_rrsets_count++] = rrsets[i];
 	}
 
diff --git a/src/libknot/updates/ddns.c b/src/libknot/updates/ddns.c
index dc5882255c11330f7994edd62e5768092f912511..58393c8e5d96e033051bf9a65117b1417a78d7d0 100644
--- a/src/libknot/updates/ddns.c
+++ b/src/libknot/updates/ddns.c
@@ -41,7 +41,7 @@ static int knot_ddns_prereq_check_rrsets(knot_rrset_t ***rrsets,
 	if (ret < 0) {
 		return KNOT_ENOMEM;
 	}
-	
+
 	*rrsets = (knot_rrset_t**)arr;
 
 	return KNOT_EOK;
@@ -59,7 +59,7 @@ static int knot_ddns_prereq_check_dnames(knot_dname_t ***dnames,
 	if (ret < 0) {
 		return KNOT_ENOMEM;
 	}
-	
+
 	*dnames = (knot_dname_t**)arr;
 
 	return KNOT_EOK;
@@ -340,7 +340,7 @@ static int knot_ddns_check_exist(const knot_zone_contents_t *zone,
 /*----------------------------------------------------------------------------*/
 
 static int knot_ddns_check_exist_full(const knot_zone_contents_t *zone,
-                                      const knot_rrset_t *rrset, 
+                                      const knot_rrset_t *rrset,
                                       knot_rcode_t *rcode)
 {
 	assert(zone != NULL);
@@ -385,7 +385,7 @@ static int knot_ddns_check_exist_full(const knot_zone_contents_t *zone,
 /*----------------------------------------------------------------------------*/
 
 static int knot_ddns_check_not_exist(const knot_zone_contents_t *zone,
-                                     const knot_rrset_t *rrset, 
+                                     const knot_rrset_t *rrset,
                                      knot_rcode_t *rcode)
 {
 	assert(zone != NULL);
@@ -410,7 +410,7 @@ static int knot_ddns_check_not_exist(const knot_zone_contents_t *zone,
 	} else if (knot_node_rrset(node, knot_rrset_type(rrset)) == NULL) {
 		return KNOT_EOK;
 	}
-	
+
 	/* RDATA is always empty for simple RRset checks. */
 
 	*rcode = KNOT_RCODE_YXRRSET;
@@ -420,7 +420,7 @@ static int knot_ddns_check_not_exist(const knot_zone_contents_t *zone,
 /*----------------------------------------------------------------------------*/
 
 static int knot_ddns_check_in_use(const knot_zone_contents_t *zone,
-                                  const knot_dname_t *dname, 
+                                  const knot_dname_t *dname,
                                   knot_rcode_t *rcode)
 {
 	assert(zone != NULL);
@@ -450,7 +450,7 @@ static int knot_ddns_check_in_use(const knot_zone_contents_t *zone,
 /*----------------------------------------------------------------------------*/
 
 static int knot_ddns_check_not_in_use(const knot_zone_contents_t *zone,
-                                      const knot_dname_t *dname, 
+                                      const knot_dname_t *dname,
                                       knot_rcode_t *rcode)
 {
 	assert(zone != NULL);
@@ -480,7 +480,7 @@ static int knot_ddns_check_not_in_use(const knot_zone_contents_t *zone,
 /* API functions                                                              */
 /*----------------------------------------------------------------------------*/
 
-int knot_ddns_check_zone(const knot_zone_contents_t *zone, 
+int knot_ddns_check_zone(const knot_zone_contents_t *zone,
                          const knot_packet_t *query, knot_rcode_t *rcode)
 {
 	if (zone == NULL || query == NULL || rcode == NULL) {
@@ -517,7 +517,7 @@ int knot_ddns_process_prereqs(const knot_packet_t *query,
 	if (query == NULL || prereqs == NULL || rcode == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	dbg_ddns("Processing prerequisities.\n");
 
 	// allocate space for the prerequisities
@@ -553,7 +553,7 @@ int knot_ddns_check_prereqs(const knot_zone_contents_t *zone,
                             knot_ddns_prereq_t **prereqs, knot_rcode_t *rcode)
 {
 	int i, ret;
-	
+
 	dbg_ddns("Checking 'exist' prerequisities.\n");
 
 	for (i = 0; i < (*prereqs)->exist_count; ++i) {
@@ -607,7 +607,7 @@ int knot_ddns_check_prereqs(const knot_zone_contents_t *zone,
 /*----------------------------------------------------------------------------*/
 
 static int knot_ddns_check_update(const knot_rrset_t *rrset,
-                                  const knot_packet_t *query, 
+                                  const knot_packet_t *query,
                                   knot_rcode_t *rcode)
 {
 	/* Accept both subdomain and dname match. */
@@ -876,10 +876,10 @@ static void knot_ddns_check_add_rr(knot_changeset_t *changeset,
 	assert(removed != NULL);
 
 	*removed = NULL;
-	
+
 	dbg_ddns_verb("Removing possible redundant RRs from changeset.\n");
 	for (int i = 0; i < changeset->remove_count; ++i)  {
-		/* Just check exact match, the changeset contains only 
+		/* Just check exact match, the changeset contains only
 		 * whole RRs that have been removed.
 		 */
 		if (knot_rrset_equal(rr, changeset->remove[i],
@@ -902,7 +902,7 @@ static int knot_ddns_rr_is_nsec3(const knot_rrset_t *rr)
 
 	if ((knot_rrset_type(rr) == KNOT_RRTYPE_NSEC3)
 	    || (knot_rrset_type(rr) == KNOT_RRTYPE_RRSIG
-	        && knot_rrset_rdata_rr_count(rr) 
+	        && knot_rrset_rdata_rr_count(rr)
 	        && knot_rrset_rdata_rrsig_type_covered(rr)
 	            == KNOT_RRTYPE_NSEC3))
 	{
@@ -976,7 +976,7 @@ static knot_node_t *knot_ddns_get_node(knot_zone_contents_t *zone,
 
 /*----------------------------------------------------------------------------*/
 
-static int knot_ddns_process_add_cname(knot_node_t *node, 
+static int knot_ddns_process_add_cname(knot_node_t *node,
                                        const knot_rrset_t *rr,
                                        knot_changeset_t *changeset,
                                        knot_changes_t *changes)
@@ -985,14 +985,14 @@ static int knot_ddns_process_add_cname(knot_node_t *node,
 	assert(rr != NULL);
 	assert(changeset != NULL);
 	assert(changes != NULL);
-	
+
 	dbg_ddns_detail("Adding CNAME RR.\n");
-	
+
 	int ret = 0;
-	
+
 	/* Get the current CNAME RR from the node. */
 	knot_rrset_t *removed = knot_node_get_rrset(node, KNOT_RRTYPE_CNAME);
-	
+
 	if (removed != NULL) {
 		/* If they are identical, ignore. */
 		if (knot_rrset_equal(removed, rr, KNOT_RRSET_COMPARE_WHOLE)
@@ -1000,14 +1000,14 @@ static int knot_ddns_process_add_cname(knot_node_t *node,
 			dbg_ddns_verb("CNAME identical to one in the node.\n");
 			return 1;
 		}
-		
+
 		/*! \note
 		 * Together with the removed CNAME we remove also its RRSIGs as
 		 * they would not be valid for the new CNAME anyway.
 		 *
 		 * \todo Document!!
 		 */
-		
+
 		/* b) Store it to 'changes', together with its RRSIGs. */
 		ret = knot_changes_add_old_rrsets(&removed, 1, changes, 1);
 		if (ret != KNOT_EOK) {
@@ -1018,9 +1018,9 @@ static int knot_ddns_process_add_cname(knot_node_t *node,
 
 		/* c) And remove it from the node. */
 		(void)knot_node_remove_rrset(node, KNOT_RRTYPE_CNAME);
-		
+
 		/* d) Check if this CNAME was not previously added by
-		 *    the UPDATE. If yes, remove it from the ADD 
+		 *    the UPDATE. If yes, remove it from the ADD
 		 *    section and do not add it to the REMOVE section.
 		 */
 		knot_rrset_t **from_chgset = NULL;
@@ -1030,14 +1030,14 @@ static int knot_ddns_process_add_cname(knot_node_t *node,
 		                   removed, &from_chgset, &from_chgset_count);
 		if (ret != KNOT_EOK) {
 			dbg_ddns("Failed to remove possible redundant "
-			         "RRs from ADD section: %s.\n", 
+			         "RRs from ADD section: %s.\n",
 			         knot_strerror(ret));
 			free(from_chgset);
 			return ret;
 		}
-	
+
 		assert(from_chgset_count <= 1);
-	
+
 		if (from_chgset_count == 1) {
 			/* Just delete the RRSet. */
 			knot_rrset_deep_free(&(from_chgset[0]), 1, 1);
@@ -1046,11 +1046,11 @@ static int knot_ddns_process_add_cname(knot_node_t *node,
 			 * deleting the first RRSet in the array ;-)
 			 */
 		} else {
-			/* Otherwise copy the removed CNAME and add it 
+			/* Otherwise copy the removed CNAME and add it
 			 * to the REMOVE section.
 			 */
 			knot_rrset_t *removed_copy;
-			ret = knot_rrset_deep_copy(removed, 
+			ret = knot_rrset_deep_copy(removed,
 			                           &removed_copy, 1);
 			if (ret != KNOT_EOK) {
 				dbg_ddns("Failed to copy removed RRSet:"
@@ -1058,14 +1058,14 @@ static int knot_ddns_process_add_cname(knot_node_t *node,
 				free(from_chgset);
 				return ret;
 			}
-			
+
 			ret = knot_changeset_add_rrset(
 				&changeset->remove,
 				&changeset->remove_count,
 				&changeset->remove_allocated,
 				removed_copy);
 			if (ret != KNOT_EOK) {
-				knot_rrset_deep_free(&removed_copy, 
+				knot_rrset_deep_free(&removed_copy,
 				                     1, 1);
 				dbg_ddns("Failed to add removed CNAME "
 				         "to changeset: %s\n",
@@ -1079,35 +1079,35 @@ static int knot_ddns_process_add_cname(knot_node_t *node,
 		/* 2) Other occupied node => ignore. */
 		return 1;
 	}
-	
+
 	return KNOT_EOK;
 }
 
 /*----------------------------------------------------------------------------*/
 
-static int knot_ddns_process_add_soa(knot_node_t *node, 
+static int knot_ddns_process_add_soa(knot_node_t *node,
                                      const knot_rrset_t *rr,
                                      knot_changes_t *changes)
 {
 	assert(node != NULL);
 	assert(rr != NULL);
 	assert(changes != NULL);
-	
+
 	dbg_ddns_detail("Adding SOA RR.\n");
-	
+
 	int ret = 0;
-	
+
 	/*
-	 * Just remove the SOA from the node, together with its RRSIGs. 
+	 * Just remove the SOA from the node, together with its RRSIGs.
 	 * Adding the RR is done in the caller function. Note that only SOA
 	 * with larger SERIAL than the current one will get to these functions,
 	 * so we don't have to check the SERIALS again. But an assert won't
 	 * hurt.
 	 */
-	
+
 	/* Get the current SOA RR from the node. */
 	knot_rrset_t *removed = knot_node_get_rrset(node, KNOT_RRTYPE_SOA);
-	
+
 	if (removed != NULL) {
 		dbg_ddns_detail("Found SOA in the node.\n");
 		/* If they are identical, ignore. */
@@ -1116,11 +1116,11 @@ static int knot_ddns_process_add_soa(knot_node_t *node,
 			dbg_ddns_detail("Old and new SOA identical.\n");
 			return 1;
 		}
-		
+
 		/* Check that the serial is indeed larger than the current one*/
 		assert(ns_serial_compare(knot_rrset_rdata_soa_serial(removed),
 		                         knot_rrset_rdata_soa_serial(rr)) < 0);
-		
+
 		/* 1) Store it to 'changes', together with its RRSIGs. */
 		ret = knot_changes_add_old_rrsets(
 		                        &removed, 1, changes, 1);
@@ -1132,14 +1132,14 @@ static int knot_ddns_process_add_soa(knot_node_t *node,
 
 		/* 2) And remove it from the node. */
 		(void)knot_node_remove_rrset(node, KNOT_RRTYPE_SOA);
-		
+
 		/* No changeset processing needed in this case. */
 	} else {
 		dbg_ddns_detail("No SOA in node, ignoring.\n");
 		/* If there is no SOA in the node, ignore. */
 		return 1;
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -1151,9 +1151,9 @@ static int knot_ddns_add_rr_new_normal(knot_node_t *node, knot_rrset_t *rr_copy,
 	assert(node != NULL);
 	assert(rr_copy != NULL);
 	assert(changes != NULL);
-	
+
 	dbg_ddns_verb("Adding normal RR.\n");
-	
+
 	/* Add the RRSet to 'changes'. */
 	int ret = knot_changes_add_new_rrsets(&rr_copy, 1, changes, 1);
 	if (ret != KNOT_EOK) {
@@ -1162,29 +1162,29 @@ static int knot_ddns_add_rr_new_normal(knot_node_t *node, knot_rrset_t *rr_copy,
 		         "%s\n", knot_strerror(ret));
 		return ret;
 	}
-	
+
 	/* Add the RRSet to the node. */
 	ret = knot_node_add_rrset_no_merge(node, rr_copy);
 	if (ret != KNOT_EOK) {
 		dbg_ddns("Failed to add RR to node: %s\n", knot_strerror(ret));
 		return ret;
 	}
-	
+
 	return KNOT_EOK;
 }
 
 /*----------------------------------------------------------------------------*/
 
 static int knot_ddns_add_rr_new_rrsig(knot_node_t *node, knot_rrset_t *rr_copy,
-                                      knot_changes_t *changes, 
+                                      knot_changes_t *changes,
                                       uint16_t type_covered)
 {
 	assert(node != NULL);
 	assert(rr_copy != NULL);
 	assert(changes != NULL);
-	
+
 	dbg_ddns_verb("Adding RRSIG RR.\n");
-	
+
 	/* Create RRSet to be covered by the RRSIG. */
 	knot_rrset_t *covered_rrset = knot_rrset_new(
 	                        knot_rrset_get_owner(rr_copy), type_covered,
@@ -1196,7 +1196,7 @@ static int knot_ddns_add_rr_new_rrsig(knot_node_t *node, knot_rrset_t *rr_copy,
 		knot_rrset_deep_free(&rr_copy, 1, 1);
 		return KNOT_ENOMEM;
 	}
-	
+
 	/* Add the RRSet to the node. */
 	int ret = knot_node_add_rrset_no_merge(node, covered_rrset);
 	if (ret != KNOT_EOK) {
@@ -1206,7 +1206,7 @@ static int knot_ddns_add_rr_new_rrsig(knot_node_t *node, knot_rrset_t *rr_copy,
 		knot_rrset_deep_free(&covered_rrset, 1, 1);
 		return KNOT_ENOMEM;
 	}
-	
+
 	/* Add the RRSet to 'changes'. */
 	ret = knot_changes_add_new_rrsets(&covered_rrset, 1, changes, 0);
 	if (ret != KNOT_EOK) {
@@ -1225,15 +1225,15 @@ static int knot_ddns_add_rr_new_rrsig(knot_node_t *node, knot_rrset_t *rr_copy,
 			 knot_strerror(ret));
 		return ret;
 	}
-	
+
 	/* Add the RRSIG RRSet to the covered RRSet. */
-	ret = knot_rrset_add_rrsigs(covered_rrset, rr_copy, 
+	ret = knot_rrset_add_rrsigs(covered_rrset, rr_copy,
 	                            KNOT_RRSET_DUPL_SKIP);
 	if (ret != KNOT_EOK) {
 		dbg_ddns("Failed to add RRSIG RR to the covered RRSet.\n");
 		return ret;
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -1245,18 +1245,18 @@ static int knot_ddns_add_rr_merge_normal(knot_rrset_t *node_rrset_copy,
 	assert(node_rrset_copy != NULL);
 	assert(rr_copy != NULL);
 	assert(*rr_copy != NULL);
-	
+
 	dbg_ddns_verb("Merging normal RR to existing RRSet.\n");
-	
-	/* In case the RRSet is empty (and only remained there because 
-	 * of the RRSIGs) it may happen that the TTL may be different 
-	 * than that of he new RRs. Update the TTL according to the 
+
+	/* In case the RRSet is empty (and only remained there because
+	 * of the RRSIGs) it may happen that the TTL may be different
+	 * than that of he new RRs. Update the TTL according to the
 	 * first RR.
-	 */	
+	 */
 	if (knot_rrset_rdata_rr_count(node_rrset_copy) == 0
-	    && knot_rrset_ttl(node_rrset_copy) 
+	    && knot_rrset_ttl(node_rrset_copy)
 	       != knot_rrset_ttl(*rr_copy)) {
-		knot_rrset_set_ttl(node_rrset_copy, 
+		knot_rrset_set_ttl(node_rrset_copy,
 		                   knot_rrset_ttl(*rr_copy));
 	}
 
@@ -1273,7 +1273,7 @@ static int knot_ddns_add_rr_merge_normal(knot_rrset_t *node_rrset_copy,
 	}
 
 	knot_rrset_deep_free(rr_copy, 1, 0);
-	
+
 
 	if (rdata_in_copy == deleted_rrs) {
 		/* All RDATA have been removed, because they were duplicates
@@ -1282,7 +1282,7 @@ static int knot_ddns_add_rr_merge_normal(knot_rrset_t *node_rrset_copy,
 		 */
 		return 1;
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -1296,12 +1296,12 @@ static int knot_ddns_add_rr_merge_rrsig(knot_rrset_t *node_rrset_copy,
 	assert(rr_copy != NULL);
 	assert(*rr_copy != NULL);
 	assert(changes != NULL);
-	
+
 	dbg_ddns_verb("Adding RRSIG RR to existing RRSet.\n");
-	
+
 	knot_rrset_t *rrsigs_old = knot_rrset_get_rrsigs(node_rrset_copy);
 	int ret = 0;
-	
+
 	if (rrsigs_old != NULL) {
 		/* If there is an RRSIG RRSet already, copy it too. */
 		knot_rrset_t *rrsigs_copy = NULL;
@@ -1312,16 +1312,16 @@ static int knot_ddns_add_rr_merge_rrsig(knot_rrset_t *node_rrset_copy,
 			         "%s\n", knot_strerror(ret));
 			return ret;
 		}
-		
+
 		/* Replace the RRSIGs by the copy. */
 		ret = knot_rrset_set_rrsigs(node_rrset_copy, rrsigs_copy);
 		if (ret != KNOT_EOK) {
 			dbg_ddns("Failed to replace RRSIGs in "
-			         "the RRSet: %s\n", 
+			         "the RRSet: %s\n",
 			         knot_strerror(ret));
 			return ret;
 		}
-		
+
 		/* Merge the UPDATE RR to the copied RRSIG
 		 * RRSet.
 		 */
@@ -1337,7 +1337,7 @@ static int knot_ddns_add_rr_merge_rrsig(knot_rrset_t *node_rrset_copy,
 			return KNOT_ERROR;
 		}
 		knot_rrset_deep_free(rr_copy, 1, 0);
-		
+
 
 		if (rdata_in_copy == deleted_rrs) {
 			/* All RDATA have been removed, because they were
@@ -1357,7 +1357,7 @@ static int knot_ddns_add_rr_merge_rrsig(knot_rrset_t *node_rrset_copy,
 			         knot_strerror(ret));
 			return ret;
 		}
-		
+
 		/* Add the RRSet to the covered RRSet. */
 		ret = knot_rrset_add_rrsigs(node_rrset_copy, *rr_copy,
 		                            KNOT_RRSET_DUPL_SKIP);
@@ -1367,7 +1367,7 @@ static int knot_ddns_add_rr_merge_rrsig(knot_rrset_t *node_rrset_copy,
 			return ret;
 		}
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -1386,7 +1386,7 @@ static int knot_ddns_add_rr(knot_node_t *node, const knot_rrset_t *rr,
 	assert(rr != NULL);
 	assert(changes != NULL);
 	assert(rr_copy != NULL);
-	
+
 	/* Copy the RRSet from the packet. */
 	//knot_rrset_t *rr_copy;
 	int ret = knot_rrset_deep_copy(rr, rr_copy, 1);
@@ -1394,30 +1394,30 @@ static int knot_ddns_add_rr(knot_node_t *node, const knot_rrset_t *rr,
 		dbg_ddns("Failed to copy RR: %s\n", knot_strerror(ret));
 		return ret;
 	}
-	
+
 	uint16_t type = knot_rrset_type(rr);
-	uint16_t type_covered = (type == KNOT_RRTYPE_RRSIG) 
+	uint16_t type_covered = (type == KNOT_RRTYPE_RRSIG)
 	                ? knot_rrset_rdata_rrsig_type_covered(rr)
 	                : type;
-	
+
 	/* If the RR belongs to a RRSet already present in the node, we must
 	 * take this RRSet from the node, copy it, and merge this RR into it.
 	 *
 	 * This code is more or less copied from xfr-in.c.
 	 */
 	knot_rrset_t *node_rrset_copy = NULL;
-	ret = xfrin_copy_rrset(node, type_covered, &node_rrset_copy, changes, 
+	ret = xfrin_copy_rrset(node, type_covered, &node_rrset_copy, changes,
 	                       0);
-	
+
 	if (node_rrset_copy == NULL) {
 		/* No such RRSet in the node. Add the whole UPDATE RRSet. */
 		dbg_ddns_detail("Adding whole UPDATE RR to the zone.\n");
 		if (type_covered != type) {
 			/* Adding RRSIG. */
-			ret = knot_ddns_add_rr_new_rrsig(node, *rr_copy, 
+			ret = knot_ddns_add_rr_new_rrsig(node, *rr_copy,
 			                                 changes, type_covered);
 		} else {
-			ret = knot_ddns_add_rr_new_normal(node, *rr_copy, 
+			ret = knot_ddns_add_rr_new_normal(node, *rr_copy,
 			                                  changes);
 		}
 		if (ret != KNOT_EOK) {
@@ -1433,7 +1433,7 @@ dbg_ddns_exec_detail(
 		dbg_ddns_detail("New RR:\n");
 		knot_rrset_dump(*rr_copy);
 );
-		
+
 		if (type_covered != type) {
 			/* Adding RRSIG. */
 			ret = knot_ddns_add_rr_merge_rrsig(node_rrset_copy,
@@ -1454,7 +1454,7 @@ dbg_ddns_exec_detail(
 			knot_rrset_deep_free(&node_rrset_copy, 1, 1);
 			return ret;
 		}
-		
+
 		// save the new RRSet together with the new RDATA to 'changes'
 		// do not overwrite 'ret', it have to be returned
 		int r = knot_changes_add_new_rrsets(&node_rrset_copy, 1,
@@ -1465,7 +1465,7 @@ dbg_ddns_exec_detail(
 			return r;
 		}
 	}
-	
+
 	assert(ret >= 0);
 	return ret;
 }
@@ -1477,7 +1477,7 @@ static int knot_ddns_final_soa_to_chgset(const knot_rrset_t *soa,
 {
 	assert(soa != NULL);
 	assert(changeset != NULL);
-	
+
 	knot_rrset_t *soa_copy = NULL;
 	int ret = knot_rrset_deep_copy(soa, &soa_copy, 1);
 	if (ret != KNOT_EOK) {
@@ -1485,11 +1485,11 @@ static int knot_ddns_final_soa_to_chgset(const knot_rrset_t *soa,
 			 "%s\n", knot_strerror(ret));
 		return ret;
 	}
-	
+
 	knot_changeset_store_soa(&changeset->soa_to,
 	                         &changeset->serial_to,
 	                         soa_copy);
-	
+
 	return KNOT_EOK;
 }
 
@@ -1500,7 +1500,7 @@ static int knot_ddns_add_rr_to_chgset(const knot_rrset_t *rr,
 {
 	assert(rr != NULL);
 	assert(changeset != NULL);
-	
+
 	int ret = 0;
 	knot_rrset_t *chgset_rr = NULL;
 	knot_ddns_check_add_rr(changeset, rr, &chgset_rr);
@@ -1525,7 +1525,7 @@ static int knot_ddns_add_rr_to_chgset(const knot_rrset_t *rr,
 	} else {
 		knot_rrset_deep_free(&chgset_rr, 1, 1);
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -1543,7 +1543,7 @@ static int knot_ddns_process_add(const knot_rrset_t *rr,
 	assert(changeset != NULL);
 	assert(changes != NULL);
 	assert(rr_copy != NULL);
-	
+
 	dbg_ddns_verb("Adding RR.\n");
 
 	if (node == NULL) {
@@ -1557,11 +1557,11 @@ static int knot_ddns_process_add(const knot_rrset_t *rr,
 			return KNOT_ERROR;
 		}
 	}
-	
+
 	uint16_t type = knot_rrset_type(rr);
 	*rr_copy = NULL;
 	int ret = 0;
-	
+
 	/*
 	 * First, rule out special cases: CNAME, SOA and adding to CNAME node.
 	 */
@@ -1580,7 +1580,7 @@ static int knot_ddns_process_add(const knot_rrset_t *rr,
 		 */
 		return KNOT_EOK;
 	}
-	
+
 	if (ret == 1) {
 		dbg_ddns_detail("Ignoring the added RR.\n");
 		// Ignore
@@ -1589,11 +1589,11 @@ static int knot_ddns_process_add(const knot_rrset_t *rr,
 		dbg_ddns_detail("Adding RR failed.\n");
 		return ret;
 	}
-	
+
 	/*
 	 * In all other cases, the RR should just be added to the node.
 	 */
-	
+
 	/* Add the RRSet to the node (RRSIGs handled in the function). */
 	dbg_ddns_detail("Adding RR to the node.\n");
 	ret = knot_ddns_add_rr(node, rr, changes, rr_copy);
@@ -1601,7 +1601,7 @@ static int knot_ddns_process_add(const knot_rrset_t *rr,
 		dbg_ddns("Failed to add RR to the node.\n");
 		return ret;
 	}
-	
+
 	/*
 	 * If adding SOA, it should not be stored in the changeset.
 	 * (This is done in the calling function, and the SOA is stored in the
@@ -1610,9 +1610,9 @@ static int knot_ddns_process_add(const knot_rrset_t *rr,
 	if (type == KNOT_RRTYPE_SOA) {
 		return KNOT_EOK;
 	}
-	
+
 	/* Add the RR to ADD section of the changeset. */
-	/* If the RR was previously removed, do not add it to the 
+	/* If the RR was previously removed, do not add it to the
 	 * changeset, and remove the entry from the REMOVE section.
 	 *
 	 * If there was no change (i.e. all RDATA were duplicates), do not add
@@ -1671,7 +1671,7 @@ static int knot_ddns_process_rem_rr(const knot_rrset_t *rr,
 
 	assert(type != KNOT_RRTYPE_SOA);
 	int is_apex = knot_node_rrset(node, KNOT_RRTYPE_SOA) != NULL;
-	
+
 	/* If removing NS from an apex and there is only one NS left, ignore
 	 * this removal right away. We do not have to check if the RRs match:
 	 * - if they don't match, the removal will be ignored
@@ -1699,11 +1699,11 @@ static int knot_ddns_process_rem_rr(const knot_rrset_t *rr,
 		dbg_ddns_verb("RRSet not found.\n");
 		return KNOT_EOK;
 	}
-	
+
 	/*
 	 * Set some variables needed, according to the modified RR type.
 	 */
-	
+
 	int rdata_count = 0;
 	knot_rrset_t *to_modify;
 	if (type == KNOT_RRTYPE_RRSIG) {
@@ -1713,7 +1713,7 @@ static int knot_ddns_process_rem_rr(const knot_rrset_t *rr,
 		rdata_count = knot_rrset_rdata_rr_count(rrset_copy);
 		to_modify = rrset_copy;
 	}
-	
+
 	/*
 	 * 1.5) Prepare place for the removed RDATA.
 	 *      We don't know if there are some, but if this fails, at least we
@@ -1721,7 +1721,7 @@ static int knot_ddns_process_rem_rr(const knot_rrset_t *rr,
 	 */
 	ret = knot_changes_rdata_reserve(&changes->old_rdata,
 	                                 changes->old_rdata_count,
-	                                 &changes->old_rdata_allocated, 
+	                                 &changes->old_rdata_allocated,
 	                                 rdata_count);
 	if (ret != KNOT_EOK) {
 		dbg_ddns("Failed to reserve place for RDATA.\n");
@@ -1747,21 +1747,21 @@ static int knot_ddns_process_rem_rr(const knot_rrset_t *rr,
 	}
 
 	/* If we removed NS from apex, there should be at least one more. */
-	assert(!is_apex || type != KNOT_RRTYPE_NS 
+	assert(!is_apex || type != KNOT_RRTYPE_NS
 	       || knot_rrset_rdata_rr_count(rrset_copy));
-	
+
 	/*
 	 * 3) Store the removed RDATA in 'changes'.
 	 */
-	knot_changes_add_rdata(changes->old_rdata, &changes->old_rdata_count, 
+	knot_changes_add_rdata(changes->old_rdata, &changes->old_rdata_count,
 	                       rr_remove);
 
 	/*
 	 * 4) If the RRSet is empty, remove it and store in 'changes'.
-	 *    Do this also if the RRSIGs are empty. 
+	 *    Do this also if the RRSIGs are empty.
 	 *    And if both are empty, remove both.
 	 */
-	if (type == KNOT_RRTYPE_RRSIG 
+	if (type == KNOT_RRTYPE_RRSIG
 	    && knot_rrset_rdata_rr_count(to_modify) == 0) {
 		/* Empty RRSIGs, remove the RRSIG RRSet */
 		ret = knot_changes_rrsets_reserve(&changes->old_rrsets,
@@ -1771,20 +1771,20 @@ static int knot_ddns_process_rem_rr(const knot_rrset_t *rr,
 		if (ret == KNOT_EOK) {
 			knot_rrset_t *rrsig = knot_rrset_get_rrsigs(rrset_copy);
 			dbg_xfrin_detail("Removed RRSIG RRSet (%p).\n", rrsig);
-			
+
 			assert(rrsig && rrsig == to_modify);
 
 			// add the removed RRSet to list of old RRSets
 			changes->old_rrsets[changes->old_rrsets_count++]
 			                = rrsig;
-			
+
 			// remove it from the RRSet
 			knot_rrset_set_rrsigs(rrset_copy, NULL);
 		} else {
 			dbg_ddns("Failed to reserve space for empty RRSet.\n");
 		}
 	}
-	
+
 	/*! \note Copied from xfr-in.c - maybe extract to some function. */
 	/*! \note This is not needed as rrset is already on the old_rrsets */
 //	if (knot_rrset_rdata(rrset_copy) == NULL
@@ -1836,7 +1836,7 @@ static int knot_ddns_process_rem_rr(const knot_rrset_t *rr,
 		free(from_chgset);
 		return KNOT_EOK;
 	}
-	
+
 	free(from_chgset);
 
 	/*
@@ -1877,9 +1877,9 @@ static int knot_ddns_process_rem_rrsig(knot_node_t *node,
 	assert(node != NULL);
 	assert(rrset != NULL);
 	assert(changes != NULL);
-	
+
 	knot_rrset_t *rrset_copy = NULL;
-	
+
 	/* Copy RRSet. */
 	int ret = xfrin_copy_old_rrset(rrset, &rrset_copy, changes, 1);
 	if (ret != KNOT_EOK) {
@@ -1887,13 +1887,13 @@ static int knot_ddns_process_rem_rrsig(knot_node_t *node,
 		         knot_strerror(ret));
 		return ret;
 	}
-	
+
 	/* Remove RRSIGs from the copy. */
 	*rrsig = knot_rrset_get_rrsigs(rrset_copy);
 	if (*rrsig != NULL) {
 		knot_rrset_set_rrsigs(rrset_copy, NULL);
 	}
-	
+
 	/* Put the copy to the node. */
 	ret = knot_node_add_rrset_no_merge(node, rrset_copy);
 	if (ret != KNOT_EOK) {
@@ -1902,14 +1902,14 @@ static int knot_ddns_process_rem_rrsig(knot_node_t *node,
 		knot_rrset_deep_free(&rrset_copy, 1, 1);
 		return ret;
 	}
-	
+
 	return KNOT_EOK;
 }
 
 /*----------------------------------------------------------------------------*/
 
-static int knot_ddns_process_rem_rrsigs(knot_node_t *node, 
-                                        knot_changes_t *changes, 
+static int knot_ddns_process_rem_rrsigs(knot_node_t *node,
+                                        knot_changes_t *changes,
                                         knot_rrset_t ***removed,
                                         size_t *removed_count)
 {
@@ -1917,24 +1917,24 @@ static int knot_ddns_process_rem_rrsigs(knot_node_t *node,
 	assert(removed != NULL);
 	assert(removed_count != NULL);
 	assert(changes != NULL);
-	
-	/* If removing RRSIGs, we must remove them from all RRSets in 
-	 * the node. This means to copy all RRSets and then remove the 
+
+	/* If removing RRSIGs, we must remove them from all RRSets in
+	 * the node. This means to copy all RRSets and then remove the
 	 * RRSIGs from them.
 	 */
 	dbg_ddns_verb("Removing all RRSIGs from node.\n");
-	
+
 	knot_rrset_t **rrsets = knot_node_get_rrsets(node);
 	if (rrsets == NULL) {
 		// No RRSets in the node, nothing to remove
 		return KNOT_EOK;
 	}
-	
+
 	/* Allocate space for the removed RRSIGs. There may be as many as there
 	 * are RRSets.
 	 */
 	short rrset_count = knot_node_rrset_count(node);
-	
+
 	*removed = malloc(rrset_count * sizeof(knot_rrset_t *));
 	if (*removed == NULL) {
 		ERR_ALLOC_FAILED;
@@ -1942,12 +1942,12 @@ static int knot_ddns_process_rem_rrsigs(knot_node_t *node,
 		return KNOT_ENOMEM;
 	}
 	*removed_count = 0;
-	
+
 	/* Remove all the RRSets from the node, so that we may insert the copies
 	 * right away.
 	 */
 	knot_node_remove_all_rrsets(node);
-	
+
 	knot_rrset_t *rrsig = NULL;
 	int ret = 0;
 	for (int i = 0; i < rrset_count; ++i) {
@@ -1963,10 +1963,10 @@ static int knot_ddns_process_rem_rrsigs(knot_node_t *node,
 		/* Store the RRSIGs to the array of removed RRSets. */
 		(*removed)[(*removed_count)++] = rrsig;
 	}
-	
+
 	free(rrsets);
-	
-	
+
+
 	return KNOT_EOK;
 }
 
@@ -1981,21 +1981,21 @@ static int knot_ddns_process_rem_rrset(const knot_rrset_t *rrset,
 	assert(rrset != NULL);
 	assert(changeset != NULL);
 	assert(changes != NULL);
-	
+
 	uint16_t type = knot_rrset_type(rrset);
 
 	/*! \note
 	 * We decided to automatically remove RRSIGs together with the removed
-	 * RRSet as they are no longer valid or required anyway. 
+	 * RRSet as they are no longer valid or required anyway.
 	 *
 	 * Also refer to RFC3007, section 4.3:
-	 *   'When the contents of an RRset are updated, the server MAY delete 
+	 *   'When the contents of an RRset are updated, the server MAY delete
 	 *    all associated SIG records, since they will no longer be valid.'
 	 *
 	 * (Although we are compliant with this RFC only selectively. The next
-	 * section says: 'If any changes are made, the server MUST, if 
-	 * necessary, generate a new SOA record and new NXT records, and sign 
-	 * these with the appropriate zone keys.' and we are definitely not 
+	 * section says: 'If any changes are made, the server MUST, if
+	 * necessary, generate a new SOA record and new NXT records, and sign
+	 * these with the appropriate zone keys.' and we are definitely not
 	 * doing this...
 	 *
 	 * \todo Document!!
@@ -2009,11 +2009,11 @@ static int knot_ddns_process_rem_rrset(const knot_rrset_t *rrset,
 		// if removing NS from apex, ignore
 		return KNOT_EOK;
 	}
-	
+
 	knot_rrset_t **removed = NULL;
 	size_t removed_count = 0;
 	int ret = 0;
-	
+
 	if (type == KNOT_RRTYPE_RRSIG) {
 		/* Remove all RRSIGs from the node. */
 		ret = knot_ddns_process_rem_rrsigs(node, changes, &removed,
@@ -2032,7 +2032,7 @@ static int knot_ddns_process_rem_rrset(const knot_rrset_t *rrset,
 		}
 
 		dbg_ddns_detail("Removing RRSet of type: %d\n", type);
-		
+
 		*removed = knot_node_remove_rrset(node, type);
 		removed_count = 1;
 	}
@@ -2049,7 +2049,7 @@ static int knot_ddns_process_rem_rrset(const knot_rrset_t *rrset,
 	}
 
 	/* 2) Store them to 'changes' for later deallocation, together with
-	 *    their RRSIGs. 
+	 *    their RRSIGs.
 	 */
 	ret = knot_changes_add_old_rrsets(removed, removed_count, changes, 1);
 	if (ret != KNOT_EOK) {
@@ -2060,7 +2060,7 @@ static int knot_ddns_process_rem_rrset(const knot_rrset_t *rrset,
 	}
 
 	/* 3) Copy the RRSets, so that they can be stored to the changeset. */
-	knot_rrset_t **to_chgset = malloc(removed_count 
+	knot_rrset_t **to_chgset = malloc(removed_count
 	                                  * sizeof(knot_rrset_t *));
 	if (to_chgset == NULL) {
 		dbg_ddns("Failed to allocate space for RRSets going to "
@@ -2068,7 +2068,7 @@ static int knot_ddns_process_rem_rrset(const knot_rrset_t *rrset,
 		free(removed);
 		return KNOT_ENOMEM;
 	}
-	
+
 	for (int i = 0; i < removed_count; ++i) {
 		ret = knot_rrset_deep_copy(removed[i], &to_chgset[i], 1);
 		if (ret != KNOT_EOK) {
@@ -2082,7 +2082,7 @@ static int knot_ddns_process_rem_rrset(const knot_rrset_t *rrset,
 			return ret;
 		}
 	}
-	
+
 	free(removed);
 
 	/* 4) But we must check if some of the RRs were not previously added
@@ -2124,7 +2124,7 @@ static int knot_ddns_process_rem_rrset(const knot_rrset_t *rrset,
 			/* ...try to remove redundant RDATA. Each RRSet in
 			 * 'from_chgset' contains only one RDATA.
 			 */
-			ret = knot_rrset_remove_rr_using_rrset_del(to_chgset[j], 
+			ret = knot_rrset_remove_rr_using_rrset_del(to_chgset[j],
 			                                  from_chgset[i]);
 			if (ret != KNOT_EOK) {
 				dbg_ddns("Failed to remove RR from RRSet"
@@ -2135,7 +2135,7 @@ static int knot_ddns_process_rem_rrset(const knot_rrset_t *rrset,
 			}
 		}
 	}
-	
+
 	/* The array is cleared, we may delete the redundant RRs. */
 	for (int i = 0; i < from_chgset_count; ++i) {
 		knot_rrset_deep_free(&from_chgset[i], 1, 1);
@@ -2160,7 +2160,7 @@ static int knot_ddns_process_rem_rrset(const knot_rrset_t *rrset,
 			return ret;
 		}
 	}
-	
+
 	free(to_chgset);
 
 	return KNOT_EOK;
@@ -2183,13 +2183,13 @@ static int knot_ddns_process_rem_all(knot_node_t *node,
 	 * In case of SOA and NS in apex, the RRSets should not be removed, but
 	 * what about their RRSIGs??
 	 *
-	 * If the zone has to remain properly signed, the UPDATE will have to 
+	 * If the zone has to remain properly signed, the UPDATE will have to
 	 * contain at least new SOA and RRSIGs for it (as the auto-incremented
-	 * SOA would not be signed). So it should not matter if we leave the 
+	 * SOA would not be signed). So it should not matter if we leave the
 	 * RRSIGs there or not. But in case of the NSs it's not that clear.
 	 *
 	 * For now, we will leave the RRSIGs there. It's easier to implement.
-	 * 
+	 *
 	 * \todo Should document this!!
 	 */
 	int ret = 0;
@@ -2222,7 +2222,7 @@ static int knot_ddns_process_rem_all(knot_node_t *node,
 			return ret;
 		}
 	}
-	
+
 	free(rrsets);
 
 	return KNOT_EOK;
@@ -2261,7 +2261,7 @@ static int knot_ddns_process_rr(const knot_rrset_t *rr,
 			return knot_ddns_process_rem_all(node, changeset,
 			                                 changes);
 		} else {
-			return knot_ddns_process_rem_rrset(rr, node, changeset, 
+			return knot_ddns_process_rem_rrset(rr, node, changeset,
 			                                   changes);
 		}
 	} else {
@@ -2397,14 +2397,14 @@ int knot_ddns_process_update2(knot_zone_contents_t *zone,
 
 	/* Ending SOA (not in the UPDATE) */
 	if (soa_end == NULL) {
-		/* If the changeset is empty, do not process anything further 
+		/* If the changeset is empty, do not process anything further
 		 * and indicate this to the caller, so that the changeset is not
 		 * saved and zone is not switched.
 		 */
 		if (knot_changeset_is_empty(changeset)) {
 			return 1;
 		}
-		
+
 		/* If not set, create new SOA. */
 		assert(sn_new == (uint32_t)sn + 1);
 		ret = knot_rrset_deep_copy(soa, &soa_end, 1);
@@ -2415,7 +2415,7 @@ int knot_ddns_process_update2(knot_zone_contents_t *zone,
 			return ret;
 		}
 		knot_rrset_rdata_soa_serial_set(soa_end, sn_new);
-		
+
 		/* And replace it in the zone. */
 		ret = xfrin_replace_rrset_in_node(
 		                        knot_zone_contents_get_apex(zone),
diff --git a/src/libknot/updates/ddns.h b/src/libknot/updates/ddns.h
index d3cb35970ac053e14f73411569a665efcd8e7952..d6164feccf7a5794fe729bdfc744437cc0f964a8 100644
--- a/src/libknot/updates/ddns.h
+++ b/src/libknot/updates/ddns.h
@@ -57,7 +57,7 @@ typedef struct knot_ddns_prereq_t {
 	size_t not_in_use_allocd;
 } knot_ddns_prereq_t;
 
-int knot_ddns_check_zone(const knot_zone_contents_t *zone, 
+int knot_ddns_check_zone(const knot_zone_contents_t *zone,
                          const knot_packet_t *query, knot_rcode_t *rcode);
 
 int knot_ddns_process_prereqs(const knot_packet_t *query,
diff --git a/src/libknot/updates/xfr-in.c b/src/libknot/updates/xfr-in.c
index 14a5f8f2a8c120044ea4a8d6a7ef54069435760b..2843759488d83f68bbae7f76732ce4d0e88bd32e 100644
--- a/src/libknot/updates/xfr-in.c
+++ b/src/libknot/updates/xfr-in.c
@@ -42,7 +42,7 @@ static int xfrin_create_query(knot_dname_t *qname, uint16_t qtype,
 {
 	knot_packet_t *pkt = knot_packet_new(KNOT_PACKET_PREALLOC_QUERY);
 	CHECK_ALLOC_LOG(pkt, KNOT_ENOMEM);
-	
+
 	/*! \todo Get rid of the numeric constant. */
 	int rc = knot_packet_set_max_size(pkt, 512);
 	if (rc != KNOT_EOK) {
@@ -76,7 +76,7 @@ static int xfrin_create_query(knot_dname_t *qname, uint16_t qtype,
 		knot_packet_free(&pkt);
 		return KNOT_ERROR;
 	}
-	
+
 	/* Reserve space for TSIG. */
 	if (use_tsig && xfr->tsig_key) {
 		dbg_xfrin_detail("xfrin: setting packet TSIG size to %zu\n",
@@ -103,30 +103,30 @@ static int xfrin_create_query(knot_dname_t *qname, uint16_t qtype,
 
 	if (wire_size > *size) {
 		dbg_xfrin("Not enough space provided for the wire "
-		          "format of the query.\n");
+			  "format of the query.\n");
 		knot_packet_free(&pkt);
 		return KNOT_ESPACE;
 	}
-	
+
 	// wire format created, sign it with TSIG if required
 	if (use_tsig && xfr->tsig_key) {
 		char *name = knot_dname_to_str(xfr->tsig_key->name);
 		dbg_xfrin_detail("Signing XFR query with key (name %s): \n",
-		                  name);
+				  name);
 		free(name);
-		
+
 		xfr->digest_size = xfr->digest_max_size;
-		rc = knot_tsig_sign(wire, &wire_size, *size, NULL, 0, 
-		               xfr->digest, &xfr->digest_size, xfr->tsig_key,
-		               0, 0);
+		rc = knot_tsig_sign(wire, &wire_size, *size, NULL, 0,
+			       xfr->digest, &xfr->digest_size, xfr->tsig_key,
+			       0, 0);
 		if (rc != KNOT_EOK) {
 			/*! \todo [TSIG] Handle TSIG errors. */
 			knot_packet_free(&pkt);
 			return rc;
 		}
-		
+
 		dbg_xfrin_detail("Signed XFR query, new wire size: %zu, digest:"
-		                 "\n", wire_size);
+				 "\n", wire_size);
 		dbg_xfrin_hex_detail((const char*)xfr->digest, xfr->digest_size);
 	}
 
@@ -164,14 +164,14 @@ int xfrin_transfer_needed(const knot_zone_contents_t *zone,
 	// first, parse the rest of the packet
 	assert(!knot_packet_is_query(soa_response));
 	dbg_xfrin_verb("Response - parsed: %zu, total wire size: %zu\n",
-	               soa_response->parsed, soa_response->size);
+		       soa_response->parsed, soa_response->size);
 	int ret;
 
 	if (soa_response->parsed < soa_response->size) {
 		ret = knot_packet_parse_rest(soa_response, 0);
 		if (ret != KNOT_EOK) {
 			dbg_xfrin_verb("knot_packet_parse_rest() returned %s\n",
-			               knot_strerror(ret));
+				       knot_strerror(ret));
 			return KNOT_EMALF;
 		}
 	}
@@ -181,7 +181,7 @@ int xfrin_transfer_needed(const knot_zone_contents_t *zone,
 	 */
 	const knot_rrset_t *soa_rrset =
 		knot_node_rrset(knot_zone_contents_apex(zone),
-		                KNOT_RRTYPE_SOA);
+				KNOT_RRTYPE_SOA);
 	if (soa_rrset == NULL) {
 		char *name = knot_dname_to_str(knot_node_owner(
 				knot_zone_contents_apex(zone)));
@@ -229,7 +229,7 @@ int xfrin_create_axfr_query(knot_dname_t *owner, knot_ns_xfr_t *xfr,
 
 /*----------------------------------------------------------------------------*/
 
-int xfrin_create_ixfr_query(const knot_zone_contents_t *zone, 
+int xfrin_create_ixfr_query(const knot_zone_contents_t *zone,
                             knot_ns_xfr_t *xfr, size_t *size, int use_tsig)
 {
 	/*!
@@ -239,17 +239,17 @@ int xfrin_create_ixfr_query(const knot_zone_contents_t *zone,
 	const knot_rrset_t *soa = knot_node_rrset(apex, KNOT_RRTYPE_SOA);
 
 	return xfrin_create_query(knot_node_get_owner(apex), KNOT_RRTYPE_IXFR,
-	                          KNOT_CLASS_IN, xfr, size, soa, use_tsig);
+				  KNOT_CLASS_IN, xfr, size, soa, use_tsig);
 }
 
 /*----------------------------------------------------------------------------*/
 
-static int xfrin_add_orphan_rrsig(xfrin_orphan_rrsig_t **rrsigs, 
+static int xfrin_add_orphan_rrsig(xfrin_orphan_rrsig_t **rrsigs,
                                   knot_rrset_t *rr)
 {
 	// try to find similar RRSIGs (check owner and type covered) in the list
 	assert(knot_rrset_type(rr) == KNOT_RRTYPE_RRSIG);
-	
+
 	if (*rrsigs == NULL) {
 		/* First item, nothing to iterate. */
 		*rrsigs = malloc(sizeof(xfrin_orphan_rrsig_t));
@@ -258,20 +258,20 @@ static int xfrin_add_orphan_rrsig(xfrin_orphan_rrsig_t **rrsigs,
 		(*rrsigs)->next = NULL;
 		return KNOT_EOK;
 	}
-	
+
 	int ret = 0;
 	xfrin_orphan_rrsig_t *last = *rrsigs;
 	assert(last);
 	while (last != NULL) {
 		// check if the RRSIG is not similar to the one we want to add
 		assert(last->rrsig != NULL);
-		if (knot_rrset_equal(last->rrsig, rr, 
-		                       KNOT_RRSET_COMPARE_HEADER) == 1
+		if (knot_rrset_equal(last->rrsig, rr,
+				       KNOT_RRSET_COMPARE_HEADER) == 1
 		    && knot_rrset_rdata_rrsig_type_covered(last->rrsig)
 		       == knot_rrset_rdata_rrsig_type_covered(rr)) {
 			int merged, deleted_rrs;
 			ret = knot_rrset_merge_no_dupl(last->rrsig,
-			                               rr, &merged, &deleted_rrs);
+						       rr, &merged, &deleted_rrs);
 			if (ret != KNOT_EOK) {
 				return ret;
 			} else if (merged) {
@@ -282,24 +282,24 @@ static int xfrin_add_orphan_rrsig(xfrin_orphan_rrsig_t **rrsigs,
 		}
 		last = last->next;
 	}
-		
+
 	assert(last == NULL);
 	assert(&last != rrsigs);
-	
+
 	// the RRSIG is not in the list, add to the front
 	xfrin_orphan_rrsig_t *new_item = malloc(sizeof(xfrin_orphan_rrsig_t));
-	CHECK_ALLOC_LOG(new_item, KNOT_ENOMEM);	
+	CHECK_ALLOC_LOG(new_item, KNOT_ENOMEM);
 	new_item->rrsig = rr;
 	new_item->next = *rrsigs;
-	
+
 	*rrsigs = new_item;
-	
+
 	return KNOT_EOK;
 }
 
 /*----------------------------------------------------------------------------*/
 
-static int xfrin_process_orphan_rrsigs(knot_zone_contents_t *zone, 
+static int xfrin_process_orphan_rrsigs(knot_zone_contents_t *zone,
                                        xfrin_orphan_rrsig_t *rrsigs)
 {
 	xfrin_orphan_rrsig_t **last = &rrsigs;
@@ -307,9 +307,9 @@ static int xfrin_process_orphan_rrsigs(knot_zone_contents_t *zone,
 	while (*last != NULL) {
 		knot_rrset_t *rrset = NULL;
 		knot_node_t *node = NULL;
-		ret = knot_zone_contents_add_rrsigs(zone, (*last)->rrsig, 
-		                                    &rrset, &node, 
-		                                    KNOT_RRSET_DUPL_MERGE);
+		ret = knot_zone_contents_add_rrsigs(zone, (*last)->rrsig,
+						    &rrset, &node,
+						    KNOT_RRSET_DUPL_MERGE);
 		if (ret > 0) {
 			knot_rrset_deep_free(&(*last)->rrsig, 1, 0);
 		} else if (ret != KNOT_EOK) {
@@ -318,10 +318,10 @@ static int xfrin_process_orphan_rrsigs(knot_zone_contents_t *zone,
 		} else {
 			(*last)->rrsig = NULL;
 		}
-		
+
 		last = &((*last)->next);
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -350,7 +350,7 @@ void xfrin_free_orphan_rrsigs(xfrin_orphan_rrsig_t **rrsigs)
 		r = r->next;
 		free(prev);
 	}
-	
+
 	*rrsigs = NULL;
 }
 
@@ -361,16 +361,16 @@ static int xfrin_check_tsig(knot_packet_t *packet, knot_ns_xfr_t *xfr,
 {
 	assert(packet != NULL);
 	assert(xfr != NULL);
-	
-	dbg_xfrin_verb("xfrin_check_tsig(): packet nr: %d, required: %d\n", 
-	               xfr->packet_nr, tsig_req);
-	
+
+	dbg_xfrin_verb("xfrin_check_tsig(): packet nr: %d, required: %d\n",
+		       xfr->packet_nr, tsig_req);
+
 	/*
 	 * If we are expecting it (i.e. xfr->prev_digest_size > 0)
 	 *   a) it should be there (first, last or each 100th packet) and it
 	 *      is not
 	 *        Then we should discard the changes and close the connection.
-	 *   b) it should be there and it is or it may not be there (other 
+	 *   b) it should be there and it is or it may not be there (other
 	 *      packets) and it is
 	 *        We validate the TSIG and reset packet number counting and
 	 *        data aggregation.
@@ -383,7 +383,7 @@ static int xfrin_check_tsig(knot_packet_t *packet, knot_ns_xfr_t *xfr,
 	if (ret != KNOT_EOK) {
 		return ret;
 	}
-	
+
 	if (xfr->tsig_key) {
 		// just append the wireformat to the TSIG data
 		assert(KNOT_NS_TSIG_DATA_MAX_SIZE - xfr->tsig_data_size
@@ -392,7 +392,7 @@ static int xfrin_check_tsig(knot_packet_t *packet, knot_ns_xfr_t *xfr,
 		       xfr->wire, xfr->wire_size);
 		xfr->tsig_data_size += xfr->wire_size;
 	}
-	
+
 	if (xfr->tsig_key) {
 		if (tsig_req && tsig == NULL) {
 			// TSIG missing!!
@@ -400,26 +400,26 @@ static int xfrin_check_tsig(knot_packet_t *packet, knot_ns_xfr_t *xfr,
 		} else if (tsig != NULL) {
 			// TSIG there, either required or not, process
 			if (xfr->packet_nr == 0) {
-				ret = knot_tsig_client_check(tsig, 
-					xfr->wire, xfr->wire_size, 
+				ret = knot_tsig_client_check(tsig,
+					xfr->wire, xfr->wire_size,
 					xfr->digest, xfr->digest_size,
 					xfr->tsig_key,
 					xfr->tsig_prev_time_signed);
 			} else {
-				ret = knot_tsig_client_check_next(tsig, 
-					xfr->tsig_data, xfr->tsig_data_size, 
+				ret = knot_tsig_client_check_next(tsig,
+					xfr->tsig_data, xfr->tsig_data_size,
 					xfr->digest, xfr->digest_size,
 					xfr->tsig_key,
 					xfr->tsig_prev_time_signed);
 			}
-			
+
 			if (ret != KNOT_EOK) {
 				/* No need to check TSIG error
 				 * here, propagate and check elsewhere.*/
 				knot_rrset_deep_free(&tsig, 1, 1);
 				return ret;
 			}
-			
+
 			// and reset the data storage
 			//xfr->packet_nr = 1;
 			xfr->tsig_data_size = 0;
@@ -429,25 +429,25 @@ static int xfrin_check_tsig(knot_packet_t *packet, knot_ns_xfr_t *xfr,
 				knot_rrset_deep_free(&tsig, 1, 1);
 				return KNOT_ESPACE;
 			}
-			memcpy(xfr->digest, tsig_rdata_mac(tsig), 
+			memcpy(xfr->digest, tsig_rdata_mac(tsig),
 			       tsig_rdata_mac_length(tsig));
 			xfr->digest_size = tsig_rdata_mac_length(tsig);
 
 			// Extract the time signed from the TSIG and store it
 			// We may rewrite the tsig_req_time_signed field
 			xfr->tsig_prev_time_signed =
-			                tsig_rdata_time_signed(tsig);
+					tsig_rdata_time_signed(tsig);
+
 
-			
 		}
 	} else if (tsig != NULL) {
 		// TSIG where it should not be
 		knot_rrset_deep_free(&tsig, 1, 1);
 		return KNOT_EMALF;
 	}
-	
+
 	knot_rrset_deep_free(&tsig, 1, 1);
-	
+
 	return KNOT_EOK;
 }
 
@@ -457,20 +457,20 @@ int xfrin_process_axfr_packet(knot_ns_xfr_t *xfr)
 {
 	const uint8_t *pkt = xfr->wire;
 	size_t size = xfr->wire_size;
-	xfrin_constructed_zone_t **constr = 
+	xfrin_constructed_zone_t **constr =
 			(xfrin_constructed_zone_t **)(&xfr->data);
-	
+
 	if (pkt == NULL || constr == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	dbg_xfrin_verb("Processing AXFR packet of size %zu.\n", size);
-	
+
 	// check if the response is OK
 	if (knot_wire_get_rcode(pkt) != KNOT_RCODE_NOERROR) {
 		return KNOT_EXFRREFUSED;
 	}
-	
+
 	/*! \todo Should TC bit be checked? */
 
 	knot_packet_t *packet =
@@ -487,7 +487,7 @@ int xfrin_process_axfr_packet(knot_ns_xfr_t *xfr)
 		/*! \todo Cleanup. */
 		return KNOT_EMALF;
 	}
-	
+
 	/*! \todo [TSIG] If packet RCODE is NOTAUTH(9), process as TSIG error. */
 
 	knot_rrset_t *rr = NULL;
@@ -495,7 +495,7 @@ int xfrin_process_axfr_packet(knot_ns_xfr_t *xfr)
 
 	if (ret != KNOT_EOK) {
 		dbg_xfrin("Could not parse first Answer RR: %s.\n",
-		               knot_strerror(ret));
+			       knot_strerror(ret));
 		knot_packet_free(&packet);
 		/*! \todo Cleanup. */
 		return KNOT_EMALF;
@@ -523,12 +523,12 @@ int xfrin_process_axfr_packet(knot_ns_xfr_t *xfr)
 		// this should be the first packet
 		/*! Packet number for checking TSIG validation. */
 		xfr->packet_nr = 0;
-		
+
 		// create new zone
 		/*! \todo Ensure that the packet is the first one. */
 		if (knot_rrset_type(rr) != KNOT_RRTYPE_SOA) {
 			dbg_xfrin("No zone created, but the first RR in "
-			          "Answer is not a SOA RR.\n");
+				  "Answer is not a SOA RR.\n");
 			knot_packet_free(&packet);
 			knot_node_free(&node);
 			knot_rrset_deep_free(&rr, 1, 1);
@@ -537,7 +537,7 @@ int xfrin_process_axfr_packet(knot_ns_xfr_t *xfr)
 		}
 
 		if (knot_dname_compare(knot_rrset_owner(rr),
-		                       knot_packet_qname(packet)) != 0) {
+				       knot_packet_qname(packet)) != 0) {
 dbg_xfrin_exec(
 			char *rr_owner =
 				knot_dname_to_str(knot_rrset_owner(rr));
@@ -545,7 +545,7 @@ dbg_xfrin_exec(
 				knot_packet_qname(packet));
 
 			dbg_xfrin("Owner of the first SOA RR (%s) does not"
-			          " match QNAME (%s).\n", rr_owner, qname);
+				  " match QNAME (%s).\n", rr_owner, qname);
 
 			free(rr_owner);
 			free(qname);
@@ -567,7 +567,7 @@ dbg_xfrin_exec(
 
 		// the first RR is SOA and its owner and QNAME are the same
 		// create the zone
-		
+
 		*constr = (xfrin_constructed_zone_t *)malloc(
 				sizeof(xfrin_constructed_zone_t));
 		if (*constr == NULL) {
@@ -577,9 +577,9 @@ dbg_xfrin_exec(
 			knot_rrset_deep_free(&rr, 1, 1);
 			return KNOT_ENOMEM;
 		}
-		
+
 		memset(*constr, 0, sizeof(xfrin_constructed_zone_t));
-		
+
 		dbg_xfrin_verb("Creating new zone contents.\n");
 		(*constr)->contents = knot_zone_contents_new(node, xfr->zone);
 		if ((*constr)->contents== NULL) {
@@ -598,10 +598,10 @@ dbg_xfrin_exec(
 		assert(zone->apex->owner == rr->owner);
 		// add the RRSet to the node
 		ret = knot_zone_contents_add_rrset(zone, rr, &node,
-		                                    KNOT_RRSET_DUPL_MERGE);
+						    KNOT_RRSET_DUPL_MERGE);
 		if (ret < 0) {
 			dbg_xfrin("Failed to add RRSet to zone node: %s.\n",
-			          knot_strerror(ret));
+				  knot_strerror(ret));
 			knot_packet_free(&packet);
 			knot_node_free(&node);
 			knot_rrset_deep_free(&rr, 1, 1);
@@ -619,7 +619,7 @@ dbg_xfrin_exec(
 		zone = (*constr)->contents;
 		++xfr->packet_nr;
 	}
-	
+
 	assert(zone != NULL);
 
 	while (ret == KNOT_EOK && rr != NULL) {
@@ -653,36 +653,36 @@ dbg_xfrin_exec_detail(
 			// discard the RR
 			assert(knot_zone_contents_apex((zone)) != NULL);
 			assert(knot_node_rrset(knot_zone_contents_apex((zone)),
-			                       KNOT_RRTYPE_SOA) != NULL);
+					       KNOT_RRTYPE_SOA) != NULL);
 			dbg_xfrin_verb("Found last SOA, transfer finished.\n");
-			
+
 			dbg_xfrin_verb("Verifying TSIG...\n");
 			/*! \note [TSIG] Now check if there is not a TSIG record
-			 *               at the end of the packet. 
+			 *               at the end of the packet.
 			 */
 			ret = xfrin_check_tsig(packet, xfr, 1);
-			
+
 			dbg_xfrin_verb("xfrin_check_tsig() returned %d\n", ret);
-			
+
 			knot_packet_free(&packet);
 			knot_rrset_deep_free(&rr, 1, 1);
-			
+
 			if (ret != KNOT_EOK) {
 				/*! \todo [TSIG] Handle TSIG errors. */
 				return ret;
 			}
-			
+
 			// we must now find place for all orphan RRSIGs
-			ret = xfrin_process_orphan_rrsigs(zone, 
-			                                  (*constr)->rrsigs);
+			ret = xfrin_process_orphan_rrsigs(zone,
+							  (*constr)->rrsigs);
 			if (ret != KNOT_EOK) {
 				dbg_xfrin("Failed to process orphan RRSIGs\n");
 				/*! \todo Cleanup?? */
 				return ret;
 			}
-			
+
 			xfrin_free_orphan_rrsigs(&(*constr)->rrsigs);
-			
+
 			return 1;
 		}
 
@@ -691,7 +691,7 @@ dbg_xfrin_exec_detail(
 			// nodes for them
 			knot_rrset_t *tmp_rrset = NULL;
 			ret = knot_zone_contents_add_rrsigs(zone, rr,
-			         &tmp_rrset, &node, KNOT_RRSET_DUPL_MERGE);
+				 &tmp_rrset, &node, KNOT_RRSET_DUPL_MERGE);
 			if (ret == KNOT_ENONODE || ret == KNOT_ENORRSET) {
 				dbg_xfrin_verb("No node or RRSet for RRSIGs\n");
 				dbg_xfrin_verb("Saving for later insertion.\n");
@@ -700,22 +700,22 @@ dbg_xfrin_exec_detail(
 					in_zone = 1;
 				}
 
-				ret = xfrin_add_orphan_rrsig(&(*constr)->rrsigs, 
-				                             rr);
+				ret = xfrin_add_orphan_rrsig(&(*constr)->rrsigs,
+							     rr);
 
 				if (ret > 0) {
 					dbg_xfrin_detail("Merged RRSIGs.\n");
 					knot_rrset_deep_free(&rr, 1, 0);
 				} else if (ret != KNOT_EOK) {
 					dbg_xfrin("Failed to save orphan"
-					          " RRSIGs.\n");
+						  " RRSIGs.\n");
 					knot_packet_free(&packet);
 					knot_rrset_deep_free(&rr, 1, 1);
 					return ret;
 				}
 			} else if (ret < 0) {
 				dbg_xfrin("Failed to add RRSIGs (%s).\n",
-				               knot_strerror(ret));
+					       knot_strerror(ret));
 				knot_packet_free(&packet);
 				knot_rrset_deep_free(&rr, 1, 1);
 				return KNOT_ERROR;  /*! \todo Other error code. */
@@ -724,7 +724,7 @@ dbg_xfrin_exec_detail(
 dbg_xfrin_exec_verb(
 				char *name = knot_dname_to_str(node->owner);
 				dbg_xfrin_detail("Found node for the record in "
-				                 "zone: %s. Merged.\n", name);
+						 "zone: %s. Merged.\n", name);
 				free(name);
 );
 				in_zone = 1;
@@ -737,7 +737,7 @@ dbg_xfrin_exec_verb(
 dbg_xfrin_exec_verb(
 				char *name = knot_dname_to_str(node->owner);
 				dbg_xfrin_detail("Found node for the record in "
-				                 "zone: %s.\n", name);
+						 "zone: %s.\n", name);
 				free(name);
 );
 				in_zone = 1;
@@ -749,7 +749,7 @@ dbg_xfrin_exec_verb(
 
 			continue;
 		}
-		
+
 		/* TSIG where it should not be - in Answer section.*/
 		if (knot_rrset_type(rr) == KNOT_RRTYPE_TSIG) {
 			// not allowed here
@@ -761,9 +761,9 @@ dbg_xfrin_exec_verb(
 		}
 
 		knot_node_t *(*get_node)(const knot_zone_contents_t *,
-		                         const knot_dname_t *) = NULL;
+					 const knot_dname_t *) = NULL;
 		int (*add_node)(knot_zone_contents_t *, knot_node_t *, int,
-		                uint8_t) = NULL;
+				uint8_t) = NULL;
 
 		if (knot_rrset_type(rr) == KNOT_RRTYPE_NSEC3) {
 			get_node = knot_zone_contents_get_nsec3_node;
@@ -774,7 +774,7 @@ dbg_xfrin_exec_verb(
 		}
 
 		if (node == NULL && (node = get_node(zone,
-		                               knot_rrset_owner(rr))) != NULL) {
+					       knot_rrset_owner(rr))) != NULL) {
 			// the node for this RR was found in the zone
 			dbg_xfrin_detail("Found node for the record in zone\n");
 			in_zone = 1;
@@ -796,7 +796,7 @@ dbg_xfrin_exec_verb(
 			ret = knot_node_add_rrset(node, rr);
 			if (ret < 0) {
 				dbg_xfrin("Failed to add RRSet to node (%s)\n",
-				          knot_strerror(ret));
+					  knot_strerror(ret));
 				knot_packet_free(&packet);
 				knot_node_free(&node); // ???
 				knot_rrset_deep_free(&rr, 1, 1);
@@ -811,7 +811,7 @@ dbg_xfrin_exec_verb(
 			assert(node != NULL);
 			if (ret != KNOT_EOK) {
 				dbg_xfrin("Failed to add node to zone (%s).\n",
-				          knot_strerror(ret));
+					  knot_strerror(ret));
 				knot_packet_free(&packet);
 				knot_node_free(&node); // ???
 				knot_rrset_deep_free(&rr, 1, 1);
@@ -823,11 +823,11 @@ dbg_xfrin_exec_verb(
 			assert(in_zone);
 
 			ret = knot_zone_contents_add_rrset(zone, rr, &node,
-			                            KNOT_RRSET_DUPL_MERGE);
+						    KNOT_RRSET_DUPL_MERGE);
 			if (ret < 0) {
 				knot_packet_free(&packet);
 				dbg_xfrin("Failed to add RRSet to zone :%s.\n",
-				          knot_strerror(ret));
+					  knot_strerror(ret));
 				return KNOT_ERROR;
 			} else if (ret > 0) {
 				// merged, free the RRSet
@@ -866,24 +866,24 @@ dbg_xfrin_exec_verb(
 		ret = knot_zone_contents_add_node(zone, node, 1, 0);
 		if (ret != KNOT_EOK) {
 			dbg_xfrin("Failed to add last node into zone (%s).\n",
-			          knot_strerror(ret));
+				  knot_strerror(ret));
 			knot_packet_free(&packet);
 			knot_node_free(&node);
 			return KNOT_ERROR;	/*! \todo Other error */
 		}
 	}
-	
+
 	/* Now check if there is not a TSIG record at the end of the packet. */
-	ret = xfrin_check_tsig(packet, xfr, 
-	                       knot_ns_tsig_required(xfr->packet_nr));
+	ret = xfrin_check_tsig(packet, xfr,
+			       knot_ns_tsig_required(xfr->packet_nr));
 	++xfr->packet_nr;
-	
+
 	knot_packet_free(&packet);
 	dbg_xfrin_verb("Processed one AXFR packet successfully.\n");
-	
+
 	/* TSIG errors are propagated and reported in a standard
-	 * manner, as we're in response processing, no further error response 
-	 * should be sent. 
+	 * manner, as we're in response processing, no further error response
+	 * should be sent.
 	 */
 
 	return ret;
@@ -909,7 +909,7 @@ static int xfrin_parse_first_rr(knot_packet_t **packet, const uint8_t *pkt,
 		knot_packet_free(packet);
 		return KNOT_EMALF;
 	}
-	
+
 	// check if the TC bit is set (it must not be)
 	if (knot_wire_get_tc(pkt)) {
 		dbg_xfrin("IXFR response has TC bit set.\n");
@@ -921,7 +921,7 @@ static int xfrin_parse_first_rr(knot_packet_t **packet, const uint8_t *pkt,
 
 	if (ret != KNOT_EOK) {
 		dbg_xfrin("Could not parse first Answer RR: %s.\n",
-		          knot_strerror(ret));
+			  knot_strerror(ret));
 		knot_packet_free(packet);
 		return KNOT_EMALF;
 	}
@@ -936,12 +936,12 @@ int xfrin_process_ixfr_packet(knot_ns_xfr_t *xfr)
 	size_t size = xfr->wire_size;
 	const uint8_t *pkt = xfr->wire;
 	knot_changesets_t **chs = (knot_changesets_t **)(&xfr->data);
-	
+
 	if (pkt == NULL || chs == NULL) {
 		dbg_xfrin("Wrong parameters supported.\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	// check if the response is OK
 	if (knot_wire_get_rcode(pkt) != KNOT_RCODE_NOERROR) {
 		return KNOT_EXFRREFUSED;
@@ -951,13 +951,13 @@ int xfrin_process_ixfr_packet(knot_ns_xfr_t *xfr)
 	knot_rrset_t *rr = NULL;
 
 	int ret;
-	
+
 	if ((ret = xfrin_parse_first_rr(&packet, pkt, size, &rr)) != KNOT_EOK) {
 		return ret;
 	}
 
 	assert(packet != NULL);
-	
+
 	// state of the transfer
 	// -1 .. a SOA is expected to create a new changeset
 	int state = 0;
@@ -968,12 +968,12 @@ int xfrin_process_ixfr_packet(knot_ns_xfr_t *xfr)
 		/*! \todo Some other action??? */
 		return KNOT_EMALF;
 	}
-	
+
 	xfrin_insert_rrset_dnames_to_table(rr, xfr->lookup_tree);
-	
+
 	if (*chs == NULL) {
 		dbg_xfrin_verb("Changesets empty, creating new.\n");
-		
+
 		ret = knot_changeset_allocate(chs, KNOT_CHANGESET_TYPE_IXFR);
 		if (ret != KNOT_EOK) {
 			knot_rrset_deep_free(&rr, 1, 1);
@@ -988,20 +988,20 @@ int xfrin_process_ixfr_packet(knot_ns_xfr_t *xfr)
 			ret = KNOT_EMALF;
 			goto cleanup;
 		}
-		
+
 		// just store the first SOA for later use
 		(*chs)->first_soa = rr;
 		state = -1;
-		
+
 		dbg_xfrin_verb("First SOA of IXFR saved, state set to -1.\n");
-		
+
 		// parse the next one
 		ret = knot_packet_parse_next_rr_answer(packet, &rr);
 		if (ret != KNOT_EOK) {
 			knot_packet_free(&packet);
 			return ret;
 		}
-		
+
 		/*
 		 * If there is no other records in the response than the SOA, it
 		 * means one of these three cases:
@@ -1009,7 +1009,7 @@ int xfrin_process_ixfr_packet(knot_ns_xfr_t *xfr)
 		 * 1) The server does not have newer zone than ours.
 		 *    This is indicated by serial equal to the one of our zone.
 		 * 2) The server wants to send the transfer but is unable to fit
-		 *    it in the packet. This is indicated by serial different 
+		 *    it in the packet. This is indicated by serial different
 		 *    (newer) from the one of our zone, but applies only for
 		 *    IXFR/UDP.
 		 * 3) The master is weird and sends only SOA in the first packet
@@ -1040,7 +1040,7 @@ int xfrin_process_ixfr_packet(knot_ns_xfr_t *xfr)
 	}
 
 	/*
-	 * Process the next RR. Different requirements are in place in 
+	 * Process the next RR. Different requirements are in place in
 	 * different cases:
 	 *
 	 * 1) Last changeset has both soa_from and soa_to.
@@ -1050,28 +1050,28 @@ int xfrin_process_ixfr_packet(knot_ns_xfr_t *xfr)
 	 *         the end should be signalised by returning positive value.
 	 *
 	 *      ii) The next RR is some other SOA.
-	 *          This means a start of new changeset - create it and add it 
+	 *          This means a start of new changeset - create it and add it
 	 *          to the list.
 	 *
 	 *    b) The next RR is not a SOA.
 	 *       Put the RR into the ADD part of the last changeset as this is
 	 *       not finished yet. Continue while SOA is not encountered. Then
 	 *       jump to 1-a.
-	 * 
+	 *
 	 * 2) Last changeset has only the soa_from and does not have soa_to.
 	 *    a) The next RR is a SOA.
-	 *       This means start of the ADD section. Put the SOA to the 
+	 *       This means start of the ADD section. Put the SOA to the
 	 *       changeset. Continue adding RRs to the ADD section while SOA
 	 *       is not encountered. This is identical to 1-b.
 	 *
 	 *    b) The next RR is not a SOA.
 	 *       This means the REMOVE part is not finished yet. Add the RR to
-	 *       the REMOVE part. Continue adding next RRs until a SOA is 
+	 *       the REMOVE part. Continue adding next RRs until a SOA is
 	 *       encountered. Then jump to 2-a.
 	 */
-	
+
 	// first, find out in what state we are
-	/*! \todo It would be more elegant to store the state in the 
+	/*! \todo It would be more elegant to store the state in the
 	 *        changesets structure, or in some place persistent between
 	 *        calls to this function.
 	 */
@@ -1084,27 +1084,27 @@ int xfrin_process_ixfr_packet(knot_ns_xfr_t *xfr)
 			ret = KNOT_EMALF;
 			goto cleanup;
 		}
-		
+
 		// a changeset should be created only when there is a SOA
 		assert(cur->soa_from != NULL);
-		
+
 		if (cur->soa_to == NULL) {
 			state = KNOT_CHANGESET_REMOVE;
 		} else {
 			state = KNOT_CHANGESET_ADD;
 		}
 	}
-	
+
 	dbg_xfrin_detail("State before the loop: %d\n", state);
-	
+
 	/*! \todo This may be implemented with much less IFs! */
-	
+
 	while (ret == KNOT_EOK && rr != NULL) {
 dbg_xfrin_exec_verb(
 		dbg_xfrin_detail("Next loop, state: %d\n", state);
 		char *name = knot_dname_to_str(knot_rrset_owner(rr));
 		dbg_xfrin_detail("Actual RR: %s, type %u.\n", name,
-		                 knot_rrset_type(rr));
+				 knot_rrset_type(rr));
 		free(name);
 );
 		switch (state) {
@@ -1116,30 +1116,30 @@ dbg_xfrin_exec_verb(
 			if (knot_rrset_type(rr) != KNOT_RRTYPE_SOA) {
 				dbg_xfrin("First RR is not a SOA RR!\n");
 				dbg_xfrin_verb("RR type: %u\n",
-				               knot_rrset_type(rr));
+					       knot_rrset_type(rr));
 				ret = KNOT_EMALF;
 				knot_rrset_deep_free(&rr, 1, 1);
 				goto cleanup;
 			}
-			
+
 			if (knot_rrset_rdata_soa_serial(rr)
 			    == knot_rrset_rdata_soa_serial((*chs)->first_soa)) {
-				
+
 				/*! \note [TSIG] Check TSIG, we're at the end of
-				 *               transfer. 
+				 *               transfer.
 				 */
 				ret = xfrin_check_tsig(packet, xfr, 1);
-				
+
 				// last SOA, discard and end
 				knot_rrset_deep_free(&rr, 1, 1);
 				knot_packet_free(&packet);
-				
-				/*! \note [TSIG] If TSIG validates, consider 
+
+				/*! \note [TSIG] If TSIG validates, consider
 				 *        transfer complete. */
 				if (ret == KNOT_EOK) {
 					ret = XFRIN_RES_COMPLETE;
 				}
-				
+
 				return ret;
 			} else {
 				// normal SOA, start new changeset
@@ -1152,14 +1152,14 @@ dbg_xfrin_exec_verb(
 					knot_rrset_deep_free(&rr, 1, 1);
 					goto cleanup;
 				}
-						
+
 				ret = knot_changeset_add_soa(cur, rr,
-				                             KNOT_CHANGESET_REMOVE);
+							     KNOT_CHANGESET_REMOVE);
 				if (ret != KNOT_EOK) {
 					knot_rrset_deep_free(&rr, 1, 1);
 					goto cleanup;
 				}
-				
+
 				// change state to REMOVE
 				state = KNOT_CHANGESET_REMOVE;
 			}
@@ -1170,20 +1170,20 @@ dbg_xfrin_exec_verb(
 			if (knot_rrset_type(rr) == KNOT_RRTYPE_SOA) {
 				// we should not be here if soa_from is not set
 				assert(cur->soa_from != NULL);
-				
-				ret = knot_changeset_add_soa(cur, rr, 
-				                             KNOT_CHANGESET_ADD);
+
+				ret = knot_changeset_add_soa(cur, rr,
+							     KNOT_CHANGESET_ADD);
 				if (ret != KNOT_EOK) {
 					knot_rrset_deep_free(&rr, 1, 1);
 					goto cleanup;
 				}
-				
+
 				state = KNOT_CHANGESET_ADD;
 			} else {
 				// just add the RR to the REMOVE part and
 				// continue
 				ret = knot_changeset_add_new_rr(cur, rr,
-				                                KNOT_CHANGESET_REMOVE);
+								KNOT_CHANGESET_REMOVE);
 				if (ret != KNOT_EOK) {
 					knot_rrset_deep_free(&rr, 1, 1);
 					goto cleanup;
@@ -1195,16 +1195,16 @@ dbg_xfrin_exec_verb(
 			// parse next RR
 			if (knot_rrset_type(rr) == KNOT_RRTYPE_SOA) {
 				log_zone_info("%s Serial %u -> %u.\n",
-				              xfr->msg,
-				              knot_rrset_rdata_soa_serial(cur->soa_from),
-				              knot_rrset_rdata_soa_serial(cur->soa_to));
+					      xfr->msg,
+					      knot_rrset_rdata_soa_serial(cur->soa_from),
+					      knot_rrset_rdata_soa_serial(cur->soa_to));
 				state = -1;
 				continue;
 			} else {
-				
+
 				// just add the RR to the ADD part and continue
 				ret = knot_changeset_add_new_rr(cur, rr,
-				                                KNOT_CHANGESET_ADD);
+								KNOT_CHANGESET_ADD);
 				if (ret != KNOT_EOK) {
 					knot_rrset_deep_free(&rr, 1, 1);
 					goto cleanup;
@@ -1212,26 +1212,26 @@ dbg_xfrin_exec_verb(
 			}
 			break;
 		}
-		
+
 		// parse the next RR
 		dbg_xfrin_detail("Parsing next RR..\n");
 		ret = knot_packet_parse_next_rr_answer(packet, &rr);
 		dbg_xfrin_detail("Returned %d, %p.\n", ret, rr);
 	}
-	
-	/*! \note Check TSIG, we're at the end of packet. It may not be 
-	 *        required. 
+
+	/*! \note Check TSIG, we're at the end of packet. It may not be
+	 *        required.
 	 */
-	ret = xfrin_check_tsig(packet, xfr, 
-	                       knot_ns_tsig_required(xfr->packet_nr));
+	ret = xfrin_check_tsig(packet, xfr,
+			       knot_ns_tsig_required(xfr->packet_nr));
 	dbg_xfrin_verb("xfrin_check_tsig() returned %d\n", ret);
 	++xfr->packet_nr;
-	
+
 	/*! \note [TSIG] Cleanup and propagate error if TSIG validation fails.*/
 	if (ret != KNOT_EOK) {
 		goto cleanup;
 	}
-	
+
 	// here no RRs remain in the packet but the transfer is not finished
 	// yet, return EOK
 	knot_packet_free(&packet);
@@ -1240,7 +1240,7 @@ dbg_xfrin_exec_verb(
 cleanup:
 	/* We should go here only if some error occured. */
 	assert(ret < 0);
-	
+
 	dbg_xfrin_detail("Cleanup after processing IXFR/IN packet.\n");
 	knot_free_changesets(chs);
 	knot_packet_free(&packet);
@@ -1255,7 +1255,7 @@ cleanup:
 static void xfrin_zone_contents_free(knot_zone_contents_t **contents)
 {
 	/*! \todo This should be all in some API!! */
-	
+
 	// free the zone tree with nodes
 	dbg_zone("Destroying zone tree.\n");
 	knot_zone_tree_deep_free(&(*contents)->nodes);
@@ -1263,7 +1263,7 @@ static void xfrin_zone_contents_free(knot_zone_contents_t **contents)
 	knot_zone_tree_deep_free(&(*contents)->nsec3_nodes);
 
 	knot_nsec3_params_free(&(*contents)->nsec3_params);
-	
+
 	free(*contents);
 	*contents = NULL;
 }
@@ -1280,7 +1280,7 @@ int xfrin_copy_old_rrset(knot_rrset_t *old, knot_rrset_t **copy,
 		dbg_xfrin("Failed to create RRSet copy.\n");
 		return KNOT_ENOMEM;
 	}
-	
+
 	int count = 0;
 
 	// add the RRSet to the list of new RRSets
@@ -1291,14 +1291,14 @@ int xfrin_copy_old_rrset(knot_rrset_t *old, knot_rrset_t **copy,
 		ret = knot_changes_rrsets_reserve(&changes->new_rrsets,
 						  &changes->new_rrsets_count,
 						  &changes->new_rrsets_allocated,
-		                                  count);
+						  count);
 		if (ret != KNOT_EOK) {
 			dbg_xfrin("Failed to add new RRSet to list.\n");
 			knot_rrset_deep_free(copy, 1, 1);
 			return ret;
 		}
 
-	
+
 		// add the copied RDATA to the list of new RDATA
 		ret = knot_changes_rdata_reserve(&changes->new_rdata,
 						 changes->new_rdata_count,
@@ -1309,9 +1309,9 @@ int xfrin_copy_old_rrset(knot_rrset_t *old, knot_rrset_t **copy,
 			knot_rrset_deep_free(copy, 1, 1);
 			return ret;
 		}
-	
+
 		changes->new_rrsets[changes->new_rrsets_count++] = *copy;
-	
+
 		dbg_xfrin_detail("Adding RDATA from the RRSet copy to new RDATA list."
 				 "\n");
 		knot_changes_add_rdata(changes->new_rdata,
@@ -1322,7 +1322,7 @@ int xfrin_copy_old_rrset(knot_rrset_t *old, knot_rrset_t **copy,
 			assert(old->rrsigs != NULL);
 			changes->new_rrsets[changes->new_rrsets_count++] =
 					(*copy)->rrsigs;
-	
+
 			dbg_xfrin_detail("Adding RDATA from RRSIG of the RRSet copy to "
 					 "new RDATA list.\n");
 			knot_changes_add_rdata(changes->new_rdata,
@@ -1330,14 +1330,14 @@ int xfrin_copy_old_rrset(knot_rrset_t *old, knot_rrset_t **copy,
 						(*copy)->rrsigs);
 		}
 	}
-	
+
 	count = 1;
 	count += old->rrsigs ? 1 : 0;
 
 	// add the old RRSet to the list of old RRSets
 	ret = knot_changes_rrsets_reserve(&changes->old_rrsets,
-	                                 &changes->old_rrsets_count,
-	                                 &changes->old_rrsets_allocated, count);
+					 &changes->old_rrsets_count,
+					 &changes->old_rrsets_allocated, count);
 	if (ret != KNOT_EOK) {
 		dbg_xfrin("Failed to add old RRSet to list.\n");
 		return ret;
@@ -1345,8 +1345,8 @@ int xfrin_copy_old_rrset(knot_rrset_t *old, knot_rrset_t **copy,
 
 	// and old RDATA to the list of old RDATA
 	ret = knot_changes_rdata_reserve(&changes->old_rdata,
-	                                changes->old_rdata_count,
-	                                &changes->old_rdata_allocated, count);
+					changes->old_rdata_count,
+					&changes->old_rdata_allocated, count);
 	if (ret != KNOT_EOK) {
 		dbg_xfrin("Failed to add old RRSet to list.\n");
 		return ret;
@@ -1356,17 +1356,17 @@ int xfrin_copy_old_rrset(knot_rrset_t *old, knot_rrset_t **copy,
 
 	dbg_xfrin_detail("Adding RDATA from old RRSet to old RDATA list.\n");
 	knot_changes_add_rdata(changes->old_rdata, &changes->old_rdata_count,
-	                       old);
+			       old);
 
 	if ((*copy)->rrsigs != NULL) {
 		assert(old->rrsigs != NULL);
 		changes->old_rrsets[changes->old_rrsets_count++] = old->rrsigs;
 
 		dbg_xfrin_detail("Adding RDATA from RRSIG of the old RRSet to "
-		                 "old RDATA list.\n");
+				 "old RDATA list.\n");
 		knot_changes_add_rdata(changes->old_rdata,
-		                        &changes->old_rdata_count,
-		                        old->rrsigs);
+					&changes->old_rdata_count,
+					old->rrsigs);
 	}
 
 	return KNOT_EOK;
@@ -1381,14 +1381,14 @@ int xfrin_copy_rrset(knot_node_t *node, uint16_t type,
 dbg_xfrin_exec_detail(
 	char *name = knot_dname_to_str(knot_node_owner(node));
 	dbg_xfrin_detail("Removing RRSet of type %u from node %s (%p)\n",
-	                 type, name, node);
+			 type, name, node);
 	free(name);
 );
 	knot_rrset_t *old = knot_node_remove_rrset(node, type);
 
 	dbg_xfrin_detail("Removed RRSet: %p\n", old);
 	dbg_xfrin_detail("Other RRSet of the same type in the node: %p\n",
-	                 knot_node_rrset(node, type));
+			 knot_node_rrset(node, type));
 
 	if (old == NULL) {
 		dbg_xfrin_verb("RRSet not found for RR to be removed.\n");
@@ -1399,16 +1399,16 @@ dbg_xfrin_exec_detail(
 	if (ret != KNOT_EOK) {
 		return ret;
 	}
-	
+
 	dbg_xfrin_detail("Copied old rrset %p to new %p.\n", old, *rrset);
-	
+
 	// replace the RRSet in the node copy by the new one
 	ret = knot_node_add_rrset_replace(node, *rrset);
 	if (ret != KNOT_EOK) {
 		dbg_xfrin("Failed to add RRSet copy to node\n");
 		return KNOT_ERROR;
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -1425,20 +1425,20 @@ static int xfrin_apply_remove_rrsigs(knot_changes_t *changes,
 	assert(node != NULL);
 	assert(rrset != NULL);
 	assert(knot_rrset_type(remove) == KNOT_RRTYPE_RRSIG);
-	
+
 	/*! \todo These optimalizations may be useless as there may be only
 	 *        one RRSet of each type and owner in the changeset.
 	 */
-	
+
 	int ret = KNOT_EOK;
 
 	int copied = 0;
 
 	if (*rrset
 	    && knot_dname_compare_non_canon(knot_rrset_owner(*rrset),
-	                                    knot_node_owner(node)) == 0
+					    knot_node_owner(node)) == 0
 	    && knot_rrset_type(*rrset) == knot_rrset_rdata_rrsig_type_covered(
-	                        remove)) {
+				remove)) {
 		// this RRSet should be the already copied RRSet so we may
 		// update it right away
 		/*! \todo Does this case even occur? */
@@ -1447,7 +1447,7 @@ static int xfrin_apply_remove_rrsigs(knot_changes_t *changes,
 		// find RRSet based on the Type Covered
 		uint16_t type =
 			knot_rrset_rdata_rrsig_type_covered(remove);
-		
+
 		// copy the rrset
 		dbg_xfrin_detail("Copying RRSet that carries the RRSIGs.\n");
 		ret = xfrin_copy_rrset(node, type, rrset, changes, 1);
@@ -1466,7 +1466,7 @@ static int xfrin_apply_remove_rrsigs(knot_changes_t *changes,
 	if (old == NULL) {
 		return 1;
 	}
-	
+
 	// copy the RRSIGs
 	knot_rrset_t *rrsigs = NULL;
 	if (!copied) {
@@ -1487,7 +1487,7 @@ static int xfrin_apply_remove_rrsigs(knot_changes_t *changes,
 		rrsigs = old;
 		dbg_xfrin_detail("Using old RRSIGs: %p\n", rrsigs);
 	}
-	
+
 	// set the RRSIGs to the new RRSet copy
 	if (knot_rrset_set_rrsigs(*rrset, rrsigs) != KNOT_EOK) {
 		dbg_xfrin("Failed to set rrsigs.\n");
@@ -1496,14 +1496,14 @@ static int xfrin_apply_remove_rrsigs(knot_changes_t *changes,
 
 	*rrsigs_old = rrsigs;
 
-	// now in '*rrset' we have a copy of the RRSet which holds the RRSIGs 
+	// now in '*rrset' we have a copy of the RRSet which holds the RRSIGs
 	// and in 'rrsigs' we have the copy of the RRSIGs
-	
+
 	knot_rrset_t *rr_removed = NULL;
 	ret = knot_rrset_remove_rr_using_rrset(rrsigs, remove, &rr_removed, 0);
 	if (ret != KNOT_EOK) {
 		dbg_xfrin("Failed to remove RDATA from RRSet: %s.\n",
-		          knot_strerror(ret));
+			  knot_strerror(ret));
 		return 1;
 	}
 	/*!< \todo This RRSet will be created even when nothing was removed. */
@@ -1512,66 +1512,66 @@ static int xfrin_apply_remove_rrsigs(knot_changes_t *changes,
 	int count = 1;
 	// connect the RDATA to the list of old RDATA
 	ret = knot_changes_rdata_reserve(&changes->old_rdata,
-	                                 changes->old_rdata_count,
-	                                 &changes->old_rdata_allocated, count);
+					 changes->old_rdata_count,
+					 &changes->old_rdata_allocated, count);
 	if (ret != KNOT_EOK) {
 		knot_rrset_deep_free(&rr_removed, 1, 1);
 		return ret;
 	}
 
 	knot_changes_add_rdata(changes->old_rdata, &changes->old_rdata_count,
-	                       rr_removed);
-	
+			       rr_removed);
+
 	// if the RRSet is empty, remove from node and add to old RRSets
 	// check if there is no RRSIGs; if there are, leave the RRSet
 	// there; it may be eventually removed when the RRSIGs are removed
 	if (knot_rrset_rdata_rr_count(rrsigs) == 0) {
 		// remove the RRSIGs from the RRSet
 		knot_rrset_set_rrsigs(*rrset, NULL);
-		
+
 		// add RRSet to the list of old RRSets
 		ret = knot_changes_rrsets_reserve(&changes->old_rrsets,
-		                                 &changes->old_rrsets_count,
-		                                 &changes->old_rrsets_allocated,
-		                                 1);
+						 &changes->old_rrsets_count,
+						 &changes->old_rrsets_allocated,
+						 1);
 		if (ret != KNOT_EOK) {
 			dbg_xfrin("Failed to add empty RRSet to the "
-			          "list of old RRSets.");
+				  "list of old RRSets.");
 			// delete the RRSet right away
 			knot_rrset_free(&rrsigs);
 			return ret;
 		}
-	
+
 		changes->old_rrsets[changes->old_rrsets_count++] = rrsigs;
 
 		// saving old RDATA is not necessary as there is none
-		
+
 		// now check if the RRSet is not totally empty
 		if (knot_rrset_rdata_rr_count(*rrset) == 0) {
 			assert(knot_rrset_rrsigs(*rrset) == NULL);
-			
+
 			// remove the whole RRSet from the node
 			knot_rrset_t *tmp = knot_node_remove_rrset(node,
-			                             knot_rrset_type(*rrset));
+						     knot_rrset_type(*rrset));
 			assert(tmp == *rrset);
-			
+
 			ret = knot_changes_rrsets_reserve(&changes->old_rrsets,
-			                        &changes->old_rrsets_count,
-			                        &changes->old_rrsets_allocated,
-			                        1);
+						&changes->old_rrsets_count,
+						&changes->old_rrsets_allocated,
+						1);
 			if (ret != KNOT_EOK) {
 				dbg_xfrin("Failed to add empty RRSet to "
-				          "the list of old RRSets.");
+					  "the list of old RRSets.");
 				// delete the RRSet right away
 				knot_rrset_free(rrset);
 				return ret;
 			}
-		
-			changes->old_rrsets[changes->old_rrsets_count++] = 
+
+			changes->old_rrsets[changes->old_rrsets_count++] =
 				*rrset;
 		}
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -1587,9 +1587,9 @@ static int xfrin_apply_remove_normal(knot_changes_t *changes,
 	assert(remove != NULL);
 	assert(node != NULL);
 	assert(rrset != NULL);
-	
+
 	int ret;
-	
+
 	dbg_xfrin_detail("Removing RRSet: \n");
 	knot_rrset_dump(remove);
 
@@ -1608,15 +1608,15 @@ static int xfrin_apply_remove_normal(knot_changes_t *changes,
 	// check if we do not already have it
 	if (*rrset
 	    && knot_dname_compare(knot_rrset_owner(*rrset),
-	                          knot_node_owner(node)) == 0
+				  knot_node_owner(node)) == 0
 	    && knot_rrset_type(*rrset) == knot_rrset_type(remove)) {
 		/*! \todo Does some other case even occur? */
 		dbg_xfrin_verb("Using RRSet from previous loop.\n");
 	} else {
 		/*!
-		 * \todo This may happen also with already 
+		 * \todo This may happen also with already
 		 *       copied RRSet. In that case it would be
-		 *       an unnecesary overhead but will 
+		 *       an unnecesary overhead but will
 		 *       probably not cause problems. TEST!!
 		 */
 		ret = xfrin_copy_rrset(node,
@@ -1627,29 +1627,29 @@ static int xfrin_apply_remove_normal(knot_changes_t *changes,
 		dbg_xfrin_detail("Copied RRSet:\n");
 		knot_rrset_dump(*rrset);
 	}
-	
+
 	if (*rrset == NULL) {
 		dbg_xfrin_verb("RRSet not found for RR to be removed.\n");
 		return 1;
 	}
-	
+
 dbg_xfrin_exec_detail(
 	char *name = knot_dname_to_str(knot_rrset_owner(*rrset));
 	dbg_xfrin_detail("Updating RRSet with owner %s, type %u\n", name,
-	                 knot_rrset_type(*rrset));
+			 knot_rrset_type(*rrset));
 	free(name);
 );
 
 	// remove the specified RRs from the RRSet (de facto difference of sets)
 	int ddns_remove_ns_from_apex =
-	                ((chflags & KNOT_CHANGESET_TYPE_DDNS) && is_apex
-	                 && knot_rrset_type(*rrset) == KNOT_RRTYPE_NS);
+			((chflags & KNOT_CHANGESET_TYPE_DDNS) && is_apex
+			 && knot_rrset_type(*rrset) == KNOT_RRTYPE_NS);
 	knot_rrset_t *rr_remove = NULL;
 	ret = knot_rrset_remove_rr_using_rrset(*rrset, remove, &rr_remove,
-	                         ddns_remove_ns_from_apex);
+				 ddns_remove_ns_from_apex);
 	if (ret != KNOT_EOK) {
 		dbg_xfrin("xfr: remove_normal: Could not remove RR (%s).\n",
-		          knot_strerror(ret));
+			  knot_strerror(ret));
 		return ret;
 	}
 	/*!< \todo either one of these checks should be enough. */
@@ -1661,26 +1661,26 @@ dbg_xfrin_exec_detail(
 		// In this case, the RDATA was not found in the RRSet
 		return 1;
 	}
-	
+
 	if (rr_remove->rdata_count != 0) {
 		int count = 1;
 		// connect the RDATA to the list of old RDATA
 		ret = knot_changes_rdata_reserve(&changes->old_rdata,
-		                                changes->old_rdata_count,
-		                                &changes->old_rdata_allocated,
-		                                count);
+						changes->old_rdata_count,
+						&changes->old_rdata_allocated,
+						count);
 		if (ret != KNOT_EOK) {
 			knot_rrset_free(&rr_remove);
 			return ret;
 		}
 
 		knot_changes_add_rdata(changes->old_rdata,
-		                        &changes->old_rdata_count, rr_remove);
+					&changes->old_rdata_count, rr_remove);
 	} else {
 		/* Discard empty RRSet. */
 		knot_rrset_free(&rr_remove);
 	}
-	
+
 	// if the RRSet is empty, remove from node and add to old RRSets
 	// check if there is no RRSIGs; if there are, leave the RRSet
 	// there; it may be eventually removed when the RRSIGs are removed
@@ -1689,30 +1689,30 @@ dbg_xfrin_exec_detail(
 		// The RRSet should not be empty if we were removing NSs from
 		// apex in case of DDNS
 		assert(!ddns_remove_ns_from_apex);
-		
+
 		knot_rrset_t *tmp = knot_node_remove_rrset(node,
-		                                     knot_rrset_type(*rrset));
+						     knot_rrset_type(*rrset));
 		dbg_xfrin_detail("Removed whole RRSet (%p). Node rr count=%d\n",
-		                 tmp, knot_node_rrset_count(node));
-		
+				 tmp, knot_node_rrset_count(node));
+
 		// add the removed RRSet to list of old RRSets
-		
+
 		assert(tmp == *rrset);
 		ret = knot_changes_rrsets_reserve(&changes->old_rrsets,
-		                                 &changes->old_rrsets_count,
-		                                 &changes->old_rrsets_allocated,
-		                                 1);
+						 &changes->old_rrsets_count,
+						 &changes->old_rrsets_allocated,
+						 1);
 		if (ret != KNOT_EOK) {
 			dbg_xfrin("Failed to add empty RRSet to the "
-			          "list of old RRSets.");
+				  "list of old RRSets.");
 			// delete the RRSet right away
 			knot_rrset_free(rrset);
 			return ret;
 		}
-	
+
 		changes->old_rrsets[changes->old_rrsets_count++] = *rrset;
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -1737,7 +1737,7 @@ dbg_xfrin_exec_verb(
 
 	/*! \todo ref #937 is it OK to modify nodes at this point?
 	 * shouldn't it be after the zones are switched? */
-	
+
 	/* Assemble RRSets to remove. */
 	if (type == KNOT_RRTYPE_ANY) {
 		/* Remove all RRSets from the node. */
@@ -1765,7 +1765,7 @@ dbg_xfrin_exec_verb(
 		 */
 		if (is_apex && (chflags & KNOT_CHANGESET_TYPE_DDNS)) {
 			dbg_xfrin_detail("DDNS: returning SOA and NS to the "
-			                 "node.\n");
+					 "node.\n");
 			for (unsigned i = 0; i < rrsets_count; ++i) {
 				if (knot_rrset_type(rrsets[i])
 				       == KNOT_RRTYPE_SOA
@@ -1797,7 +1797,7 @@ dbg_xfrin_exec_verb(
 			rrsets_count = 1;
 		}
 	}
-	
+
 	ret = knot_changes_rrsets_reserve(&changes->old_rrsets,
 					 &changes->old_rrsets_count,
 					 &changes->old_rrsets_allocated,
@@ -1807,7 +1807,7 @@ dbg_xfrin_exec_verb(
 		free(rrsets);
 		return ret;
 	}
-	
+
 	/* Mark RRsets and RDATA for removal. */
 	for (unsigned i = 0; i < rrsets_count; ++i) {
 		if (rrsets[i] == NULL) {
@@ -1815,7 +1815,7 @@ dbg_xfrin_exec_verb(
 		}
 
 		changes->old_rrsets[changes->old_rrsets_count++] = rrsets[i];
-	
+
 		/* Remove old RDATA. */
 		int rdata_count = 1;//knot_rrset_rdata_rr_count(rrsets[i]);
 		ret = knot_changes_rdata_reserve(&changes->old_rdata,
@@ -1827,12 +1827,12 @@ dbg_xfrin_exec_verb(
 			free(rrsets);
 			return ret;
 		}
-		
+
 		knot_changes_add_rdata(changes->old_rdata,
 					&changes->old_rdata_count,
 					rrsets[i]);
 	}
-	
+
 	free(rrsets);
 
 	return KNOT_EOK;
@@ -1844,7 +1844,7 @@ static knot_node_t *xfrin_add_new_node(knot_zone_contents_t *contents,
                                        knot_rrset_t *rrset, int is_nsec3)
 {
 	knot_node_t *node = knot_node_new(knot_rrset_get_owner(rrset),
-	                                  NULL, 0);
+					  NULL, 0);
 	if (node == NULL) {
 		dbg_xfrin("Failed to create a new node.\n");
 		return NULL;
@@ -1890,8 +1890,8 @@ int xfrin_replace_rrset_in_node(knot_node_t *node,
 
 	// add the old RRSet to the list of old RRSets
 	int ret = knot_changes_rrsets_reserve(&changes->old_rrsets,
-	                                     &changes->old_rrsets_count,
-	                                     &changes->old_rrsets_allocated, 1);
+					     &changes->old_rrsets_count,
+					     &changes->old_rrsets_allocated, 1);
 	if (ret != KNOT_EOK) {
 		dbg_xfrin("Failed to add old RRSet to list.\n");
 		return ret;
@@ -1901,8 +1901,8 @@ int xfrin_replace_rrset_in_node(knot_node_t *node,
 	// The count should be 1, but just to be sure....
 	int count = 1;//knot_rrset_rdata_rr_count(rrset_old);
 	ret = knot_changes_rdata_reserve(&changes->old_rdata,
-	                                changes->old_rdata_count,
-	                                &changes->old_rdata_allocated, count);
+					changes->old_rdata_count,
+					&changes->old_rdata_allocated, count);
 	if (ret != KNOT_EOK) {
 		dbg_xfrin("Failed to add old RDATA to list.\n");
 		return ret;
@@ -1911,8 +1911,8 @@ int xfrin_replace_rrset_in_node(knot_node_t *node,
 	// save the new RRSet to the new RRSet, so that it is deleted if the
 	// apply fails
 	ret = knot_changes_rrsets_reserve(&changes->new_rrsets,
-	                                 &changes->new_rrsets_count,
-	                                 &changes->new_rrsets_allocated, 1);
+					 &changes->new_rrsets_count,
+					 &changes->new_rrsets_allocated, 1);
 	if (ret != KNOT_EOK) {
 		dbg_xfrin("Failed to add new RRSet to list.\n");
 		return ret;
@@ -1922,8 +1922,8 @@ int xfrin_replace_rrset_in_node(knot_node_t *node,
 	count = 1;//knot_rrset_rdata_rr_count(rrset_new);
 	// save the new RDATA
 	ret = knot_changes_rdata_reserve(&changes->new_rdata,
-	                                changes->new_rdata_count,
-	                                &changes->new_rdata_allocated, count);
+					changes->new_rdata_count,
+					&changes->new_rdata_allocated, count);
 	if (ret != KNOT_EOK) {
 		dbg_xfrin("Failed to add new RDATA to list.\n");
 		return ret;
@@ -1932,9 +1932,9 @@ int xfrin_replace_rrset_in_node(knot_node_t *node,
 	changes->old_rrsets[changes->old_rrsets_count++] = rrset_old;
 
 	dbg_xfrin_verb("Adding RDATA from old RRSet to the list of old RDATA."
-	               "\n");
+		       "\n");
 	knot_changes_add_rdata(changes->old_rdata, &changes->old_rdata_count,
-	                       rrset_old);
+			       rrset_old);
 
 	// store RRSIGs from the old RRSet to the new
 	knot_rrset_set_rrsigs(rrset_new, knot_rrset_get_rrsigs(rrset_old));
@@ -1942,7 +1942,7 @@ int xfrin_replace_rrset_in_node(knot_node_t *node,
 	// insert the new RRSet to the node
 	dbg_xfrin_verb("Adding new RRSet.\n");
 	ret = knot_zone_contents_add_rrset(contents, rrset_new, &node,
-	                                   KNOT_RRSET_DUPL_SKIP);
+					   KNOT_RRSET_DUPL_SKIP);
 
 	if (ret < 0) {
 		dbg_xfrin("Failed to add RRSet to node.\n");
@@ -1953,9 +1953,9 @@ int xfrin_replace_rrset_in_node(knot_node_t *node,
 	changes->new_rrsets[changes->new_rrsets_count++] = rrset_new;
 
 	dbg_xfrin_verb("Adding RDATA from new RRSet to the list of new RDATA."
-	               "\n");
+		       "\n");
 	knot_changes_add_rdata(changes->new_rdata, &changes->new_rdata_count,
-	                       rrset_new);
+			       rrset_new);
 
 	return KNOT_EOK;
 }
@@ -1976,20 +1976,20 @@ static int xfrin_apply_add_normal_ddns(knot_changes_t *changes,
 		if (knot_node_rrset(node, KNOT_RRTYPE_SOA) == NULL
 		    || ns_serial_compare(knot_rrset_rdata_soa_serial(
 		       knot_node_rrset(node, KNOT_RRTYPE_SOA)),
-		           knot_rrset_rdata_soa_serial(add) > 0
+			   knot_rrset_rdata_soa_serial(add) > 0
 		    )) {
 			dbg_ddns_verb("DDNS: Ignoring SOA.\n");
 			return KNOT_EOK;
 		} else {
 			dbg_ddns_verb("DDNS: replacing SOA (old serial: %u,"
-			              " new serial: %u.\n",
-			              knot_rrset_rdata_soa_serial(knot_node_rrset(node,
-			                                  KNOT_RRTYPE_SOA)),
-			              knot_rrset_rdata_soa_serial(add));
+				      " new serial: %u.\n",
+				      knot_rrset_rdata_soa_serial(knot_node_rrset(node,
+							  KNOT_RRTYPE_SOA)),
+				      knot_rrset_rdata_soa_serial(add));
 			/* b) Otherwise, replace the current SOA. */
 			ret = xfrin_replace_rrset_in_node(node, add,
-			                                      changes,
-			                                      contents);
+							      changes,
+							      contents);
 			/* In this case we must however remove the ADD RRSet
 			 * from the changeset, so that it is not deleted
 			 * afterwards.
@@ -2006,7 +2006,7 @@ static int xfrin_apply_add_normal_ddns(knot_changes_t *changes,
 			dbg_ddns_verb("DDNS: replacing CNAME.\n");
 			/* a) ... to a CNAME node => replace. */
 			ret = xfrin_replace_rrset_in_node(node, add, changes,
-			                                  contents);
+							  contents);
 			/* In this case we must however remove the ADD RRSet
 			 * from the changeset, so that it is not deleted
 			 * afterwards.
@@ -2063,7 +2063,7 @@ dbg_xfrin_exec_detail(
 			return ret;
 		}
 	}
-	
+
 	int copied = 0;
 	/*! \note Reusing RRSet from previous function caused it not to be
 	 *        removed from the node.
@@ -2073,7 +2073,7 @@ dbg_xfrin_exec_detail(
 	 */
 	if (*rrset
 	    && knot_dname_compare(knot_rrset_owner(*rrset),
-	                          knot_node_owner(node)) == 0
+				  knot_node_owner(node)) == 0
 	    && knot_rrset_type(*rrset) == knot_rrset_type(add)) {
 		dbg_xfrin_verb("Using RRSet from previous iteration.\n");
 	} else {
@@ -2094,7 +2094,7 @@ dbg_xfrin_exec_detail(
 			copied = 1;
 		}
 	}
-	
+
 dbg_xfrin_exec_detail(
 	dbg_xfrin_detail("Removed RRSet: \n");
 	knot_rrset_dump(*rrset);
@@ -2118,7 +2118,7 @@ dbg_xfrin_exec_detail(
 		 */
 //		ret = knot_node_add_rrset(node, add, 0);
 		ret = knot_zone_contents_add_rrset(contents, add, &node,
-		                                   KNOT_RRSET_DUPL_SKIP);
+						   KNOT_RRSET_DUPL_SKIP);
 
 		if (ret < 0) {
 			dbg_xfrin("Failed to add RRSet to node.\n");
@@ -2133,7 +2133,7 @@ dbg_xfrin_exec_detail(
 dbg_xfrin_exec_detail(
 	char *name = knot_dname_to_str(knot_rrset_owner(*rrset));
 	dbg_xfrin_detail("Found RRSet with owner %s, type %u\n", name,
-	                 knot_rrset_type(*rrset));
+			 knot_rrset_type(*rrset));
 	free(name);
 );
 
@@ -2150,11 +2150,11 @@ dbg_xfrin_exec_detail(
 	 */
 
 	dbg_xfrin_detail("Merging RRSets with owners: %s, %s types: %u, %u\n",
-	                 (*rrset)->owner->name, add->owner->name,
-	                 (*rrset)->type,
-	                 add->type);
+			 (*rrset)->owner->name, add->owner->name,
+			 (*rrset)->type,
+			 add->type);
 	dbg_xfrin_detail("RDATA in RRSet1: %p, RDATA in RRSet2: %p\n",
-	                 (*rrset)->rdata, add->rdata);
+			 (*rrset)->rdata, add->rdata);
 
 	/* In case the RRSet is empty (and only remained there because of the
 	 * RRSIGs) it may happen that the TTL may be different than that of
@@ -2206,15 +2206,15 @@ static int xfrin_apply_add_rrsig(knot_changes_t *changes,
 	assert(rrset != NULL);
 	assert(knot_rrset_type(add) == KNOT_RRTYPE_RRSIG);
 	assert(contents != NULL);
-	
+
 	int ret;
-	
+
 	uint16_t type = knot_rrset_rdata_rrsig_type_covered(add);
-	
+
 dbg_xfrin_exec_verb(
 	char *name = knot_dname_to_str(knot_rrset_owner(add));
 	dbg_xfrin_verb("Adding RRSIG: Owner %s, type covered %u.\n",
-	               name, type);
+		       name, type);
 	free(name);
 );
 
@@ -2225,7 +2225,7 @@ dbg_xfrin_exec_verb(
 	 */
 	if (*rrset
 	    && knot_dname_compare(knot_rrset_owner(*rrset),
-	                          knot_node_owner(node)) == 0
+				  knot_node_owner(node)) == 0
 	    && knot_rrset_type(*rrset) == type) {
 		dbg_xfrin_verb("Using RRSet from previous iteration.\n");
 	} else {
@@ -2243,11 +2243,11 @@ dbg_xfrin_exec_verb(
 
 	if (*rrset == NULL) {
 		dbg_xfrin_detail("RRSet to be added not found in zone.\n");
-		
+
 		// create a new RRSet to add the RRSIGs into
 		*rrset = knot_rrset_new(knot_node_get_owner(node), type,
-		                        knot_rrset_class(add),
-		                        knot_rrset_ttl(add));
+					knot_rrset_class(add),
+					knot_rrset_ttl(add));
 		if (*rrset == NULL) {
 			dbg_xfrin("Failed to create new RRSet for RRSIGs.\n");
 			return KNOT_ENOMEM;
@@ -2281,7 +2281,7 @@ dbg_xfrin_exec_verb(
 dbg_xfrin_exec_detail(
 		char *name = knot_dname_to_str(knot_rrset_owner(*rrset));
 		dbg_xfrin_detail("Found RRSet with owner %s, type %u\n", name,
-		                 knot_rrset_type(*rrset));
+				 knot_rrset_type(*rrset));
 		free(name);
 );
 
@@ -2289,24 +2289,24 @@ dbg_xfrin_exec_detail(
 
 		dbg_xfrin_detail("Adding new RRSIGs to RRSet.\n");
 		ret = knot_zone_contents_add_rrsigs(contents, add, rrset, &node,
-		                                    KNOT_RRSET_DUPL_SKIP);
+						    KNOT_RRSET_DUPL_SKIP);
 
 		if (ret < 0) {
 			dbg_xfrin("Failed to add RRSIGs to the RRSet.\n");
 			return KNOT_ERROR;
 		}
-		
+
 		dbg_xfrin_detail("RRSet after added RRSIG:\n");
 		knot_rrset_dump(*rrset);
 
 		assert(ret == 0);
-		
+
 		return 1;
 	} else {
 		knot_rrset_t *old = knot_rrset_get_rrsigs(*rrset);
 		assert(old != NULL);
 		knot_rrset_t *rrsig;
-		
+
 		if (!copied) {
 			// check if the stored RRSIGs are not the right ones
 			if (*rrsigs_old && *rrsigs_old == old) {
@@ -2314,7 +2314,7 @@ dbg_xfrin_exec_detail(
 				rrsig = *rrsigs_old;
 			} else {
 				ret = xfrin_copy_old_rrset(old, &rrsig, changes,
-				                           1);
+							   1);
 				if (ret != KNOT_EOK) {
 					return ret;
 				}
@@ -2326,23 +2326,23 @@ dbg_xfrin_exec_detail(
 			rrsig = old;
 			dbg_xfrin_verb("Using old RRSIGs: %p\n", rrsig);
 		}
-		
+
 		// replace the old RRSIGs with the new ones
 		knot_rrset_set_rrsigs(*rrset, rrsig);
-	
+
 		// merge the changeset RRSet to the copy
 		dbg_xfrin_detail("Merging RRSIG to the one in the RRSet.\n");
 		int merged, deleted_rrs;
 		ret = knot_rrset_merge_no_dupl(rrsig, add, &merged, &deleted_rrs);
 		if (ret != KNOT_EOK) {
 			dbg_xfrin("Failed to merge changeset RRSIG to copy: %s"
-			          ".\n", knot_strerror(ret));
+				  ".\n", knot_strerror(ret));
 			return KNOT_ERROR;
 		}
-		
+
 		return 2;
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -2350,7 +2350,7 @@ dbg_xfrin_exec_detail(
 
 void xfrin_cleanup_successful_update(knot_changes_t **changes)
 {
-	for (int i = 0; i < (*changes)->old_rrsets_count; ++i) {	
+	for (int i = 0; i < (*changes)->old_rrsets_count; ++i) {
 		//TODO temporary fix!
 		if ((*changes)->old_rrsets[i] == NULL) {
 			log_server_warning("NULL RRSet to be freed in DDNS!\n");
@@ -2360,7 +2360,7 @@ void xfrin_cleanup_successful_update(knot_changes_t **changes)
 dbg_xfrin_exec_detail(
 			char *name = knot_dname_to_str((*changes)->old_rrsets[i]->owner);
 			dbg_xfrin_detail("Deleting old RRSet: %s type %u\n",
-		        	         name, (*changes)->old_rrsets[i]->type);
+					 name, (*changes)->old_rrsets[i]->type);
 			free(name);
 );
 			knot_rrset_free(&(*changes)->old_rrsets[i]);
@@ -2377,9 +2377,9 @@ dbg_xfrin_exec_detail(
 	for (int i = 0; i < (*changes)->old_nodes_count; ++i) {
 dbg_xfrin_exec_detail(
 		char *name = knot_dname_to_str(
-		                   knot_node_owner((*changes)->old_nodes[i]));
+				   knot_node_owner((*changes)->old_nodes[i]));
 		dbg_xfrin_detail("Deleting old empty node: %p, owner: %s\n",
-		                 (*changes)->old_nodes[i], name);
+				 (*changes)->old_nodes[i], name);
 		free(name);
 );
 		knot_node_free(&(*changes)->old_nodes[i]);
@@ -2389,9 +2389,9 @@ dbg_xfrin_exec_detail(
 	for (int i = 0; i < (*changes)->old_nsec3_count; ++i) {
 dbg_xfrin_exec_detail(
 		char *name = knot_dname_to_str(
-		                   knot_node_owner((*changes)->old_nsec3[i]));
+				   knot_node_owner((*changes)->old_nsec3[i]));
 		dbg_xfrin_detail("Deleting old empty node: %p, owner: %s\n",
-		                 (*changes)->old_nsec3[i], name);
+				 (*changes)->old_nsec3[i], name);
 		free(name);
 );
 		knot_node_free(&(*changes)->old_nsec3[i]);
@@ -2432,10 +2432,10 @@ static int xfrin_switch_nodes(knot_zone_contents_t *contents_copy)
 	// Traverse the trees and for each node check every reference
 	// stored in that node. The node itself should be new.
 	knot_zone_contents_tree_apply_inorder(contents_copy,
-	                                      xfrin_switch_nodes_in_node, NULL);
-	
+					      xfrin_switch_nodes_in_node, NULL);
+
 	knot_zone_contents_nsec3_apply_inorder(contents_copy,
-	                                      xfrin_switch_nodes_in_node, NULL);
+					      xfrin_switch_nodes_in_node, NULL);
 	return KNOT_EOK;
 }
 
@@ -2488,11 +2488,11 @@ static void xfrin_cleanup_failed_update(knot_zone_contents_t *old_contents,
 		// also set pointers from dnames to old nodes
 		knot_zone_contents_tree_apply_inorder(old_contents,
 						      xfrin_cleanup_old_nodes,
-		                                      NULL);
+						      NULL);
 
 		knot_zone_contents_nsec3_apply_inorder(old_contents,
 						       xfrin_cleanup_old_nodes,
-		                                       NULL);
+						       NULL);
 	}
 }
 
@@ -2517,7 +2517,7 @@ void xfrin_rollback_update(knot_zone_contents_t *old_contents,
 
 		for (int i = 0; i < (*changes)->new_rdata_count; ++i) {
 			dbg_xfrin_detail("Freeing %d. RDATA: %p\n", i,
-			                 (*changes)->new_rdata[i]);
+					 (*changes)->new_rdata[i]);
 
 			/*
 			 * In some case, the same RDATA may be stored in
@@ -2577,7 +2577,7 @@ dbg_xfrin_exec_verb(
 		char *name = knot_dname_to_str(
 			knot_rrset_owner(chset->remove[i]));
 		dbg_xfrin_verb("Removing RRSet: %s, type %u\n", name,
-		               knot_rrset_type(chset->remove[i]));
+			       knot_rrset_type(chset->remove[i]));
 		free(name);
 );
 dbg_xfrin_exec_detail(
@@ -2589,8 +2589,8 @@ dbg_xfrin_exec_detail(
 		// check if the RRSet belongs to the NSEC3 tree
 		if ((knot_rrset_type(chset->remove[i]) == KNOT_RRTYPE_NSEC3)
 		    || (knot_rrset_type(chset->remove[i]) == KNOT_RRTYPE_RRSIG
-		        && knot_rrset_rdata_rrsig_type_covered(chset->remove[i])
-		            == KNOT_RRTYPE_NSEC3))
+			&& knot_rrset_rdata_rrsig_type_covered(chset->remove[i])
+			    == KNOT_RRTYPE_NSEC3))
 		{
 			dbg_xfrin_verb("Removed RRSet belongs to NSEC3 tree.\n");
 			is_nsec3 = 1;
@@ -2601,18 +2601,18 @@ dbg_xfrin_exec_detail(
 			       node, knot_rrset_owner(chset->remove[i]),
 			       knot_node_owner(node));
 		if (!node || knot_rrset_owner(chset->remove[i])
-		             != knot_node_owner(node)) {
+			     != knot_node_owner(node)) {
 			if (is_nsec3) {
 				node = knot_zone_contents_get_nsec3_node(
-				            contents,
-				            knot_rrset_owner(chset->remove[i]));
+					    contents,
+					    knot_rrset_owner(chset->remove[i]));
 			} else {
 				node = knot_zone_contents_get_node(contents,
-				            knot_rrset_owner(chset->remove[i]));
+					    knot_rrset_owner(chset->remove[i]));
 			}
 			if (node == NULL) {
 				dbg_xfrin_verb("Node not found for RR to be "
-				               "removed!\n");
+					       "removed!\n");
 				continue;
 			}
 		}
@@ -2627,17 +2627,17 @@ dbg_xfrin_exec_detail(
 				changes, node,
 				knot_rrset_type(chset->remove[i]), chset->flags);
 		} else if (knot_rrset_type(chset->remove[i])
-		           == KNOT_RRTYPE_RRSIG) {
+			   == KNOT_RRTYPE_RRSIG) {
 			// this should work also for UPDATE
 			ret = xfrin_apply_remove_rrsigs(changes,
-			                                chset->remove[i],
-			                                node, &rrset, &rrsigs);
+							chset->remove[i],
+							node, &rrset, &rrsigs);
 		} else {
 			// this should work also for UPDATE
 			ret = xfrin_apply_remove_normal(changes,
-			                                chset->remove[i],
-			                                node, &rrset,
-			                                chset->flags);
+							chset->remove[i],
+							node, &rrset,
+							chset->flags);
 		}
 
 		dbg_xfrin_detail("xfrin_apply_remove() ret = %d\n", ret);
@@ -2670,7 +2670,7 @@ dbg_xfrin_exec_verb(
 		char *name = knot_dname_to_str(
 			knot_rrset_owner(chset->add[i]));
 		dbg_xfrin_verb("Adding RRSet: %s, type: %u\n", name,
-		               knot_rrset_type(chset->add[i]));
+			       knot_rrset_type(chset->add[i]));
 		free(name);
 );
 dbg_xfrin_exec_detail(
@@ -2682,8 +2682,8 @@ dbg_xfrin_exec_detail(
 		// check if the RRSet belongs to the NSEC3 tree
 		if ((knot_rrset_type(chset->add[i]) == KNOT_RRTYPE_NSEC3)
 		    || (knot_rrset_type(chset->add[i]) == KNOT_RRTYPE_RRSIG
-		        && knot_rrset_rdata_rrsig_type_covered(chset->add[i])
-		            == KNOT_RRTYPE_NSEC3))
+			&& knot_rrset_rdata_rrsig_type_covered(chset->add[i])
+			    == KNOT_RRTYPE_NSEC3))
 		{
 			dbg_xfrin_detail("This is NSEC3-related RRSet.\n");
 			is_nsec3 = 1;
@@ -2695,23 +2695,23 @@ dbg_xfrin_exec_detail(
 			dbg_xfrin_detail("Searching for node...\n");
 			if (is_nsec3) {
 				node = knot_zone_contents_get_nsec3_node(
-				               contents,
-				               knot_rrset_owner(chset->add[i]));
+					       contents,
+					       knot_rrset_owner(chset->add[i]));
 			} else {
 				node = knot_zone_contents_get_node(contents,
-				               knot_rrset_owner(chset->add[i]));
+					       knot_rrset_owner(chset->add[i]));
 			}
 			if (node == NULL) {
 				// create new node, connect it properly to the
 				// zone nodes
 				dbg_xfrin_detail("Node not found. Creating new."
-				                 "\n");
+						 "\n");
 				node = xfrin_add_new_node(contents,
-				                          chset->add[i],
-				                          is_nsec3);
+							  chset->add[i],
+							  is_nsec3);
 				if (node == NULL) {
 					dbg_xfrin("Failed to create new node "
-					          "in zone.\n");
+						  "in zone.\n");
 					return KNOT_ERROR;
 				}
 			}
@@ -2721,13 +2721,13 @@ dbg_xfrin_exec_detail(
 
 		if (knot_rrset_type(chset->add[i]) == KNOT_RRTYPE_RRSIG) {
 			ret = xfrin_apply_add_rrsig(changes, chset->add[i],
-			                            node, &rrset, &rrsigs,
-			                            contents);
+						    node, &rrset, &rrsigs,
+						    contents);
 			assert(ret != KNOT_EOK);
 		} else {
 			ret = xfrin_apply_add_normal(changes, chset->add[i],
-			                             node, &rrset, contents,
-			                             chset->flags);
+						     node, &rrset, contents,
+						     chset->flags);
 			assert(ret <= 3);
 		}
 
@@ -2736,7 +2736,7 @@ dbg_xfrin_exec_detail(
 		//assert(ret != KNOT_EOK);
 
 		dbg_xfrin_detail("xfrin_apply_..() returned %d, rrset: %p\n",
-		                 ret, rrset);
+				 ret, rrset);
 
 		if (ret > 0) {
 			if (ret == 1) {
@@ -2749,7 +2749,7 @@ dbg_xfrin_exec_detail(
 					&changes->new_rrsets_allocated, 1);
 				if (ret != KNOT_EOK) {
 					dbg_xfrin("Failed to add old RRSet to "
-					          "list.\n");
+						  "list.\n");
 					return ret;
 				}
 
@@ -2769,8 +2769,8 @@ dbg_xfrin_exec_detail(
 				}
 
 				knot_changes_add_rdata(changes->new_rdata,
-				            &changes->new_rdata_count,
-				            chset->add[i]);
+					    &changes->new_rdata_count,
+					    chset->add[i]);
 
 				chset->add[i] = NULL;
 			} else if (ret == 2) {
@@ -2815,7 +2815,7 @@ static int xfrin_apply_replace_soa(knot_zone_contents_t *contents,
 
 
 	int ret = xfrin_replace_rrset_in_node(node, chset->soa_to, changes,
-	                                      contents);
+					      contents);
 	if (ret == KNOT_EOK) {
 		// remove the SOA from the changeset, so it will not be deleted
 		// after successful apply
@@ -2838,14 +2838,14 @@ static int xfrin_apply_changeset(knot_zone_contents_t *contents,
 	 */
 
 	dbg_xfrin("APPLYING CHANGESET: from serial %u to serial %u\n",
-	          chset->serial_from, chset->serial_to);
+		  chset->serial_from, chset->serial_to);
 
 	// check if serial matches
 	/*! \todo Only if SOA is present? */
 	const knot_rrset_t *soa = knot_node_rrset(contents->apex,
-	                                          KNOT_RRTYPE_SOA);
+						  KNOT_RRTYPE_SOA);
 	if (soa == NULL || knot_rrset_rdata_soa_serial(soa)
-	                   != chset->serial_from) {
+			   != chset->serial_from) {
 		dbg_xfrin("SOA serials do not match!!\n");
 		return KNOT_ERROR;
 	}
@@ -2875,8 +2875,8 @@ static void xfrin_mark_empty(knot_node_t *node, void *data)
 	if (knot_node_rrset_count(node) == 0
 	    && knot_node_children(node) == 0) {
 		int ret = knot_changes_nodes_reserve(&changes->old_nodes,
-		                                 &changes->old_nodes_count,
-		                                 &changes->old_nodes_allocated);
+						 &changes->old_nodes_count,
+						 &changes->old_nodes_allocated);
 		if (ret != KNOT_EOK) {
 			/*! \todo Stop on error? */
 			return;
@@ -2896,7 +2896,7 @@ static void xfrin_mark_empty(knot_node_t *node, void *data)
 		}
 	}
 	dbg_xfrin_detail("Space for nodes reserved, old node count = %d\n",
-	                 changes->old_nodes_count);
+			 changes->old_nodes_count);
 }
 
 /*----------------------------------------------------------------------------*/
@@ -2911,8 +2911,8 @@ static void xfrin_mark_empty_nsec3(knot_node_t *node, void *data)
 	if (knot_node_rrset_count(node) == 0
 	    && knot_node_children(node) == 0) {
 		int ret = knot_changes_nodes_reserve(&changes->old_nsec3,
-		                                 &changes->old_nsec3_count,
-		                                 &changes->old_nsec3_allocated);
+						 &changes->old_nsec3_count,
+						 &changes->old_nsec3_allocated);
 		if (ret != KNOT_EOK) {
 			/*! \todo Stop on error? */
 			return;
@@ -2950,14 +2950,14 @@ static int xfrin_remove_empty_nodes(knot_zone_contents_t *contents,
 	 * on the leaves first and then on the their parent.
 	 */
 	ret = knot_zone_contents_tree_apply_inorder_reverse(contents,
-	                                                    xfrin_mark_empty,
-	                                                    (void *)changes);
+							    xfrin_mark_empty,
+							    (void *)changes);
 	assert(ret == KNOT_EOK);
 
 	// Do the same with NSEC3 nodes.
 	ret = knot_zone_contents_nsec3_apply_inorder_reverse(contents,
-	                                                 xfrin_mark_empty_nsec3,
-	                                                 (void *)changes);
+							 xfrin_mark_empty_nsec3,
+							 (void *)changes);
 	assert(ret == KNOT_EOK);
 
 	dbg_xfrin_verb("OLD NODES COUNT: %d\n", changes->old_nodes_count);
@@ -2971,9 +2971,9 @@ static int xfrin_remove_empty_nodes(knot_zone_contents_t *contents,
 
 dbg_xfrin_exec_detail(
 		char *name = knot_dname_to_str(knot_node_owner(
-		                                       changes->old_nodes[i]));
+						       changes->old_nodes[i]));
 		dbg_xfrin_detail("Old node #%d: %p, %s\n", i,
-		                 changes->old_nodes[i], name);
+				 changes->old_nodes[i], name);
 		free(name);
 );
 
@@ -2992,9 +2992,9 @@ dbg_xfrin_exec_detail(
 		zone_node = NULL;
 
 		char *name = knot_dname_to_str(knot_node_owner(
-		                                       changes->old_nsec3[i]));
+						       changes->old_nsec3[i]));
 		dbg_xfrin_detail("Old NSEC3 node #%d: %p, %s\n", i,
-		                 changes->old_nsec3[i], name);
+				 changes->old_nsec3[i], name);
 		free(name);
 
 		ret = knot_zone_contents_remove_nsec3_node(
@@ -3035,15 +3035,15 @@ static int xfrin_check_contents_copy(knot_zone_contents_t *old_contents)
 	int err = KNOT_EOK;
 
 	int ret = knot_zone_contents_tree_apply_inorder(old_contents,
-	                                         xfrin_check_contents_copy_node,
-	                                         &err);
+						 xfrin_check_contents_copy_node,
+						 &err);
 
 	assert(ret == KNOT_EOK);
 
 	if (err == KNOT_EOK) {
 		ret = knot_zone_contents_nsec3_apply_inorder(old_contents,
-		                                 xfrin_check_contents_copy_node,
-		                                 &err);
+						 xfrin_check_contents_copy_node,
+						 &err);
 	}
 
 	assert(ret == KNOT_EOK);
@@ -3074,7 +3074,7 @@ int xfrin_prepare_zone_copy(knot_zone_contents_t *old_contents,
 		// this would mean that a previous update was not completed
 		// abort
 		dbg_zone("Trying to apply changesets to zone that is "
-		                  "being updated. Aborting.\n");
+				  "being updated. Aborting.\n");
 		return KNOT_EAGAIN;
 	}
 
@@ -3090,15 +3090,15 @@ int xfrin_prepare_zone_copy(knot_zone_contents_t *old_contents,
 
 	dbg_xfrin("Copying zone contents.\n");
 	int ret = knot_zone_contents_shallow_copy2(old_contents,
-	                                           &contents_copy);
+						   &contents_copy);
 	if (ret != KNOT_EOK) {
 		dbg_xfrin("Failed to create shallow copy of zone: %s\n",
-		          knot_strerror(ret));
+			  knot_strerror(ret));
 		return ret;
 	}
 
 	knot_changes_t *chgs = (knot_changes_t *)malloc(
-	                        sizeof(knot_changes_t));
+				sizeof(knot_changes_t));
 	if (chgs == NULL) {
 		dbg_xfrin("Failed to allocate structure for changes!\n");
 		xfrin_rollback_update(old_contents, &contents_copy, &chgs);
@@ -3126,10 +3126,10 @@ int xfrin_prepare_zone_copy(knot_zone_contents_t *old_contents,
 	dbg_xfrin("Switching ptrs pointing to old nodes to the new nodes.\n");
 	ret = xfrin_switch_nodes(contents_copy);
 	assert(knot_zone_contents_apex(contents_copy) != NULL);
-	
+
 	*new_contents = contents_copy;
 	*changes = chgs;
-	
+
 	return KNOT_EOK;
 }
 
@@ -3141,7 +3141,7 @@ int xfrin_finalize_updated_zone(knot_zone_contents_t *contents_copy,
 	if (contents_copy == NULL || changes == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/*
 	 * Finalize the new zone contents:
 	 * - delete empty nodes
@@ -3150,7 +3150,7 @@ int xfrin_finalize_updated_zone(knot_zone_contents_t *contents_copy,
 	 * - ???
 	 * - PROFIT
 	 */
-	
+
 	/*
 	 * Select and remove empty nodes from zone trees. Do not free them right
 	 * away as they may be referenced by some domain names.
@@ -3158,7 +3158,7 @@ int xfrin_finalize_updated_zone(knot_zone_contents_t *contents_copy,
 	int ret = xfrin_remove_empty_nodes(contents_copy, changes);
 	if (ret != KNOT_EOK) {
 		dbg_xfrin("Failed to remove empty nodes: %s\n",
-		          knot_strerror(ret));
+			  knot_strerror(ret));
 		return ret;
 	}
 
@@ -3166,7 +3166,7 @@ int xfrin_finalize_updated_zone(knot_zone_contents_t *contents_copy,
 	ret = knot_zone_contents_adjust(contents_copy, NULL, NULL, 1);
 	if (ret != KNOT_EOK) {
 		dbg_xfrin("Failed to finalize zone contents: %s\n",
-		          knot_strerror(ret));
+			  knot_strerror(ret));
 		return ret;
 	}
 	assert(knot_zone_contents_apex(contents_copy) != NULL);
@@ -3178,7 +3178,7 @@ int xfrin_finalize_updated_zone(knot_zone_contents_t *contents_copy,
 		dbg_xfrin("CNAME loop check failed: %s\n", knot_strerror(ret));
 		return ret;
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -3205,10 +3205,10 @@ int xfrin_apply_changesets(knot_zone_t *zone,
 	knot_zone_contents_t *contents_copy = NULL;
 	knot_changes_t *changes = NULL;
 	int ret = xfrin_prepare_zone_copy(old_contents, &contents_copy,
-	                                  &changes);
+					  &changes);
 	if (ret != KNOT_EOK) {
 		dbg_xfrin("Failed to prepare zone copy: %s\n",
-		          knot_strerror(ret));
+			  knot_strerror(ret));
 		return ret;
 	}
 
@@ -3217,15 +3217,15 @@ int xfrin_apply_changesets(knot_zone_t *zone,
 	 */
 	dbg_xfrin("Applying changesets.\n");
 	dbg_xfrin_verb("Old contents apex: %p, new apex: %p\n",
-	               old_contents->apex, contents_copy->apex);
+		       old_contents->apex, contents_copy->apex);
 	for (int i = 0; i < chsets->count; ++i) {
 		if ((ret = xfrin_apply_changeset(contents_copy, changes,
-		                                  &chsets->sets[i]))
-		                                  != KNOT_EOK) {
+						  &chsets->sets[i]))
+						  != KNOT_EOK) {
 			xfrin_rollback_update(old_contents,
-			                       &contents_copy, &changes);
+					       &contents_copy, &changes);
 			dbg_xfrin("Failed to apply changesets to zone: "
-			          "%s\n", knot_strerror(ret));
+				  "%s\n", knot_strerror(ret));
 			return ret;
 		}
 	}
@@ -3239,11 +3239,11 @@ int xfrin_apply_changesets(knot_zone_t *zone,
 	ret = xfrin_finalize_updated_zone(contents_copy, changes);
 	if (ret != KNOT_EOK) {
 		dbg_xfrin("Failed to finalize updated zone: %s\n",
-		          knot_strerror(ret));
+			  knot_strerror(ret));
 		xfrin_rollback_update(old_contents, &contents_copy, &changes);
 		return ret;
 	}
-	
+
 	chsets->changes = changes;
 	*new_contents = contents_copy;
 
@@ -3258,11 +3258,11 @@ static int xfrin_switch_node_in_rdata(knot_dname_t **dname, void *data)
 	if (dname == NULL || *dname == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	if ((*dname)->node != NULL) {
 		knot_dname_update_node(*dname);
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -3271,15 +3271,15 @@ static void xfrin_switch_node_in_rrset(knot_rrset_t *rrset)
 	if (rrset == NULL) {
 		return;
 	}
-	
+
 	if (rrset->rrsigs) {
 		xfrin_switch_node_in_rrset(rrset->rrsigs);
 	}
-	
+
 	if (rrset->owner->node != NULL) {
 		knot_dname_update_node(rrset->owner);
 	}
-	
+
 	rrset_dnames_apply(rrset, xfrin_switch_node_in_rdata, NULL);
 }
 
@@ -3289,7 +3289,7 @@ static void xfrin_switch_node_in_node(knot_node_t **node, void *data)
 	if (node == NULL || *node == NULL) {
 		return;
 	}
-	
+
 	if ((*node)->owner->node != NULL) {
 		knot_dname_update_node((*node)->owner);
 	}
@@ -3312,23 +3312,23 @@ int xfrin_switch_zone(knot_zone_t *zone,
 
 	dbg_xfrin("Switching zone contents.\n");
 	dbg_xfrin_verb("Old contents: %p, apex: %p, new apex: %p\n",
-	               zone->contents, (zone->contents)
-	               ? zone->contents->apex : NULL, new_contents->apex);
+		       zone->contents, (zone->contents)
+		       ? zone->contents->apex : NULL, new_contents->apex);
 
 	knot_zone_contents_t *old =
 		knot_zone_switch_contents(zone, new_contents);
 
 	dbg_xfrin_verb("Old contents: %p, apex: %p, new apex: %p\n",
-	               old, (old) ? old->apex : NULL, new_contents->apex);
+		       old, (old) ? old->apex : NULL, new_contents->apex);
 
 	// switch pointers in domain names, now only the new zone is used
 	if (transfer_type == XFR_TYPE_IIN || transfer_type == XFR_TYPE_UPDATE) {
 		/* Switch node references in owner DNAMEs and RDATA dnames. */
 		int ret = knot_zone_tree_apply(new_contents->nodes,
-		                               xfrin_switch_node_in_node, NULL);
+					       xfrin_switch_node_in_node, NULL);
 		assert(ret == KNOT_EOK);
 		ret = knot_zone_tree_apply(new_contents->nsec3_nodes,
-		                           xfrin_switch_node_in_node, NULL);
+					   xfrin_switch_node_in_node, NULL);
 		assert(ret == KNOT_EOK);
 	}
 
diff --git a/src/libknot/updates/xfr-in.h b/src/libknot/updates/xfr-in.h
index 0f55b365569b10e834cc24bf1a017160fcae3e39..54a22c554d6b20d2bbb473354739e68eb06c999c 100644
--- a/src/libknot/updates/xfr-in.h
+++ b/src/libknot/updates/xfr-in.h
@@ -93,7 +93,7 @@ int xfrin_transfer_needed(const knot_zone_contents_t *zone,
  *            pointer to the buffer for wireformat and TSIG data.
  * \param size In: available space in the buffer. Out: actual size of the
  *             message in bytes.
- * \param use_tsig If TSIG should be used. 
+ * \param use_tsig If TSIG should be used.
  *
  * \todo Parameter use_tsig probably not needed.
  *
@@ -111,7 +111,7 @@ int xfrin_create_axfr_query(knot_dname_t *owner, knot_ns_xfr_t *xfr,
  * \param buffer Buffer to fill the message in.
  * \param size In: available space in the buffer. Out: actual size of the
  *             message in bytes.
- * \param use_tsig If TSIG should be used. 
+ * \param use_tsig If TSIG should be used.
  *
  * \todo Parameter use_tsig probably not needed.
  *
@@ -119,7 +119,7 @@ int xfrin_create_axfr_query(knot_dname_t *owner, knot_ns_xfr_t *xfr,
  * \retval KNOT_ESPACE
  * \retval KNOT_ERROR
  */
-int xfrin_create_ixfr_query(const knot_zone_contents_t *zone, 
+int xfrin_create_ixfr_query(const knot_zone_contents_t *zone,
                             knot_ns_xfr_t *xfr, size_t *size, int use_tsig);
 
 /*!
@@ -178,7 +178,7 @@ void xfrin_free_changesets(knot_changesets_t **changesets);
 int xfrin_process_ixfr_packet(knot_ns_xfr_t *xfr/*const uint8_t *pkt, size_t size,
                               knot_changesets_t **changesets*/);
 
-int xfrin_apply_changesets_to_zone(knot_zone_t *zone, 
+int xfrin_apply_changesets_to_zone(knot_zone_t *zone,
                                    knot_changesets_t *chsets);
 
 int xfrin_apply_changesets(knot_zone_t *zone,
@@ -203,7 +203,7 @@ void xfrin_rollback_update(knot_zone_contents_t *old_contents,
                            knot_changes_t **changes);
 
 int xfrin_copy_rrset(knot_node_t *node, uint16_t type,
-                     knot_rrset_t **rrset, knot_changes_t *changes, 
+                     knot_rrset_t **rrset, knot_changes_t *changes,
                      int save_new);
 
 int xfrin_copy_old_rrset(knot_rrset_t *old, knot_rrset_t **copy,
diff --git a/src/libknot/util/debug.c b/src/libknot/util/debug.c
index fa961217e8510c0cb170943908b2494df157c682..7ae92a9263a2251cf382eaa21fe7f1d8be5d8740 100644
--- a/src/libknot/util/debug.c
+++ b/src/libknot/util/debug.c
@@ -59,7 +59,7 @@ void knot_rdata_dump(const knot_rrset_t *rrset, size_t rdata_pos)
 //		fprintf(stderr, "  ------- RRSET -------\n");
 //		return;
 //	}
-	
+
 //	// TODO dump rdata
 
 //	fprintf(stderr, "  ------- RRSET -------\n");
@@ -141,13 +141,13 @@ void knot_node_dump(knot_node_t *node)
 		/*! \todo This causes segfault when n	sec3_node was free'd,
 		 *        e.g. when applying changesets.
 		 */
-    		name = knot_dname_to_str(node->nsec3_node->owner);
+		name = knot_dname_to_str(node->nsec3_node->owner);
 		dbg_node_detail("%s\n", name);
 		free(name);
 	} else {
 		dbg_node_detail("none\n");
 	}
-	
+
 	dbg_node_detail("Zone: %p\n", node->zone);
 
 	dbg_node_detail("RRSet count: %d\n", node->rrset_count);
@@ -172,14 +172,14 @@ void knot_zone_contents_dump(knot_zone_contents_t *zone)
 	dbg_zone_detail("------- ZONE --------\n");
 
 	knot_zone_contents_tree_apply_inorder(zone, knot_node_dump_from_tree,
-	                                      NULL);
+					      NULL);
 
 	dbg_zone_detail("------- ZONE --------\n");
-	
+
 	dbg_zone_detail("------- NSEC 3 tree -\n");
 
 	knot_zone_contents_nsec3_apply_inorder(zone, knot_node_dump_from_tree,
-	                                       NULL);
+					       NULL);
 
 	dbg_zone_detail("------- NSEC 3 tree -\n");
 #endif
diff --git a/src/libknot/util/tolower.h b/src/libknot/util/tolower.h
index 2e922581ad800811be5f5b1dd2e84756d29a8272..55f3eb7dac737aab0e7fbf3a065762543f8a8a24 100644
--- a/src/libknot/util/tolower.h
+++ b/src/libknot/util/tolower.h
@@ -42,7 +42,7 @@ extern const uint8_t char_table[CHAR_TABLE_SIZE];
 
 /*!
  * \brief Converts ASCII character to lowercase.
- * 
+ *
  * \param c ASCII character code.
  *
  * \return \a c converted to lowercase (or \a c if not applicable).
diff --git a/src/libknot/zone/node.c b/src/libknot/zone/node.c
index 28364ed9b62b8124451b250ea4e9c346f254b7de..20fe294da979db98388b425cce8a11069f911665 100644
--- a/src/libknot/zone/node.c
+++ b/src/libknot/zone/node.c
@@ -144,7 +144,7 @@ knot_node_t *knot_node_new(knot_dname_t *owner, knot_node_t *parent,
 	knot_node_set_parent(ret, parent);
 	ret->rrset_tree = NULL;
 	ret->flags = flags;
-	
+
 	assert(ret->children == 0);
 
 	return ret;
@@ -156,7 +156,7 @@ int knot_node_add_rrset_no_merge(knot_node_t *node, knot_rrset_t *rrset)
 	if (node == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	size_t nlen = (node->rrset_count + 1) * sizeof(knot_rrset_t*);
 	void *p = realloc(node->rrset_tree, nlen);
 	if (p == NULL) {
@@ -188,7 +188,7 @@ int knot_node_add_rrset(knot_node_t *node, knot_rrset_t *rrset)
 	if (node == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	for (uint16_t i = 0; i < node->rrset_count; ++i) {
 		if (node->rrset_tree[i]->type == rrset->type) {
 			int merged, deleted_rrs;
@@ -203,7 +203,7 @@ int knot_node_add_rrset(knot_node_t *node, knot_rrset_t *rrset)
 			}
 		}
 	}
-	
+
 	return knot_node_add_rrset_no_merge(node, rrset);
 }
 
@@ -222,14 +222,14 @@ knot_rrset_t *knot_node_get_rrset(const knot_node_t *node, uint16_t type)
 	if (node == NULL) {
 		return NULL;
 	}
-	
+
 	knot_rrset_t **rrs = node->rrset_tree;
 	for (uint16_t i = 0; i < node->rrset_count; ++i) {
 		if (rrs[i]->type == type) {
 			return rrs[i];
 		}
 	}
-	
+
 	return NULL;
 }
 
@@ -251,13 +251,13 @@ knot_rrset_t *knot_node_remove_rrset(knot_node_t *node, uint16_t type)
 			--node->rrset_count;
 		}
 	}
-	
-	/*!< \todo I've added this to fix a leak, but probably this wasn't the cause. Remove once tests are availabe. */	
+
+	/*!< \todo I've added this to fix a leak, but probably this wasn't the cause. Remove once tests are availabe. */
 	void *tmp = realloc(node->rrset_tree,
 	                    node->rrset_count * sizeof(knot_rrset_t *));
 	assert(tmp || node->rrset_count == 0); //Realloc to smaller memory, if it fails, something is really odd.
 	node->rrset_tree = tmp;
-	
+
 	return ret;
 }
 
@@ -299,13 +299,13 @@ knot_rrset_t **knot_node_get_rrsets(const knot_node_t *node)
 	if (node == NULL || node->rrset_count == 0) {
 		return NULL;
 	}
-	
+
 	size_t rrlen = node->rrset_count * sizeof(knot_rrset_t*);
 	knot_rrset_t **cpy = malloc(rrlen);
 	if (cpy != NULL) {
 		memcpy(cpy, node->rrset_tree, rrlen);
 	}
-	
+
 	return cpy;
 }
 
@@ -321,16 +321,16 @@ const knot_rrset_t **knot_node_rrsets(const knot_node_t *node)
 }
 
 knot_rrset_t **knot_node_get_rrsets_no_copy(const knot_node_t *node)
-{	
+{
 	if (node == NULL) {
 		return NULL;
 	}
-	
+
 	return node->rrset_tree;
 }
 
 const knot_rrset_t **knot_node_rrsets_no_copy(const knot_node_t *node)
-{	
+{
 	return (const knot_rrset_t **)knot_node_get_rrsets_no_copy(node);
 }
 
@@ -371,7 +371,7 @@ void knot_node_set_parent(knot_node_t *node, knot_node_t *parent)
 	}
 	// set the parent
 	node->parent = parent;
-	
+
 	// increase the count of children of the new parent
 	if (parent != NULL) {
 		++parent->children;
@@ -407,7 +407,7 @@ knot_node_t *knot_node_get_previous(const knot_node_t *node)
 	if (node == NULL) {
 		return NULL;
 	}
-	
+
 	return node->prev;
 }
 
@@ -429,7 +429,7 @@ knot_node_t *knot_node_get_nsec3_node(const knot_node_t *node)
 	if (node == NULL) {
 		return NULL;
 	}
-	
+
 	return node->nsec3_node;
 }
 
@@ -701,7 +701,7 @@ void knot_node_free(knot_node_t **node)
 	if (node == NULL || *node == NULL) {
 		return;
 	}
-	
+
 	dbg_node_detail("Freeing node: %p\n", *node);
 
 	if ((*node)->rrset_tree != NULL) {
@@ -750,9 +750,9 @@ int knot_node_shallow_copy(const knot_node_t *from, knot_node_t **to)
 	if (*to == NULL) {
 		return KNOT_ENOMEM;
 	}
-	
-	// copy references	
-	// do not use the API function to set parent, so that children count 
+
+	// copy references
+	// do not use the API function to set parent, so that children count
 	// is not changed
 	memcpy(*to, from, sizeof(knot_node_t));
 
@@ -808,11 +808,11 @@ int knot_node_shallow_copy(const knot_node_t *from, knot_node_t **to)
 //		assert(node->new_node != NULL);
 //		return node->new_node;
 //	}
-	
+
 //	assert((old_gen && knot_node_is_old(node))
 //	       || (new_gen && knot_node_is_new(node))
 //	       || (!old_gen && !new_gen));
-	
+
 //	return node;
 //}
 
@@ -855,4 +855,3 @@ int knot_node_shallow_copy(const knot_node_t *from, knot_node_t **to)
 //{
 //	knot_node_flags_clear_old(&node->flags);
 //}
-
diff --git a/src/libknot/zone/node.h b/src/libknot/zone/node.h
index b3723a63ec58cde2fd100c08f4b5f60c0ea73f18..a2449526d822dbe9b1f92b27854a3e86e5ef8ae0 100644
--- a/src/libknot/zone/node.h
+++ b/src/libknot/zone/node.h
@@ -71,7 +71,7 @@ struct knot_node {
 	const struct knot_zone *zone;
 
 	struct knot_node *new_node;
-	
+
 	unsigned int children;
 
 	uint16_t rrset_count; /*!< Number of RRSets stored in the node. */
diff --git a/src/libknot/zone/zone-contents.c b/src/libknot/zone/zone-contents.c
index e987aa230500550399faf9c0be703778e41478b5..805d4023fe8e0584af598fa4c3a43717b6f95e10 100644
--- a/src/libknot/zone/zone-contents.c
+++ b/src/libknot/zone/zone-contents.c
@@ -90,13 +90,13 @@ static int knot_zone_contents_check_node(
 	assert(contents->apex != NULL);
 
 	if (!knot_dname_is_subdomain(node->owner,
-	                               knot_node_owner(contents->apex))) {
+				       knot_node_owner(contents->apex))) {
 dbg_zone_exec(
 		char *node_owner = knot_dname_to_str(knot_node_owner(node));
 		char *apex_owner = knot_dname_to_str(contents->apex->owner);
 		dbg_zone("zone: Trying to insert foreign node to a "
-		         "zone. Node owner: %s, zone apex: %s\n",
-		         node_owner, apex_owner);
+			 "zone. Node owner: %s, zone apex: %s\n",
+			 node_owner, apex_owner);
 		free(node_owner);
 		free(apex_owner);
 );
@@ -137,7 +137,7 @@ static const knot_node_t *knot_zone_contents_find_wildcard_child(
 	CHECK_ALLOC(tmp, NULL);
 
 	knot_dname_t *wildcard = knot_dname_cat(tmp, knot_node_owner(
-	                                                closest_encloser));
+							closest_encloser));
 	if (wildcard == NULL) {
 		free(tmp);
 		return NULL;
@@ -149,14 +149,14 @@ dbg_zone_exec_detail(
 	char *name = knot_dname_to_str(knot_node_owner(closest_encloser));
 	char *name2 = knot_dname_to_str(wildcard);
 	dbg_zone_detail("Searching for wildcard child of %s (%s)\n", name,
-	                name2);
+			name2);
 	free(name);
 	free(name2);
 );
 
 	const knot_node_t *found = NULL, *ce = NULL, *prev = NULL;
 	int ret = knot_zone_contents_find_dname(zone, wildcard, &found, &ce,
-	                                        &prev);
+						&prev);
 
 	knot_dname_free(&wildcard);
 
@@ -215,7 +215,7 @@ static void knot_zone_contents_adjust_rdata_dname(knot_zone_contents_t *zone,
 //	const knot_node_t *old_dname_node = (*in_dname)->node;
 	knot_zone_contents_insert_dname_into_table(in_dname, lookup_tree);
 //	assert((*in_dname)->node == old_dname_node || old_dname_node == NULL);
-	
+
 	knot_dname_t *dname = *in_dname;
 	/*
 	 * The case when dname.node is already set is handled here.
@@ -223,12 +223,12 @@ static void knot_zone_contents_adjust_rdata_dname(knot_zone_contents_t *zone,
 	 */
 	if (knot_dname_node(dname) != NULL
 	    || !knot_dname_is_subdomain(dname, knot_node_owner(
-	                              knot_zone_contents_apex(zone)))) {
+				      knot_zone_contents_apex(zone)))) {
 		// The name's node is either already set
 		// or the name does not belong to the zone
 		dbg_zone_detail("Name's node either set or the name "
-		                "does not belong to the zone (%p).\n",
-		                knot_dname_node(dname));
+				"does not belong to the zone (%p).\n",
+				knot_dname_node(dname));
 		return;
 	}
 
@@ -237,12 +237,12 @@ static void knot_zone_contents_adjust_rdata_dname(knot_zone_contents_t *zone,
 	const knot_node_t *prev = NULL;
 
 	int ret = knot_zone_contents_find_dname(zone, dname, &n,
-	                                      &closest_encloser, &prev);
+					      &closest_encloser, &prev);
 
 	if (ret == KNOT_EINVAL || ret == KNOT_EBADZONE) {
 		// TODO: do some cleanup if needed
 		dbg_zone_detail("Failed to find the name in zone: %s\n",
-		                knot_strerror(ret));
+				knot_strerror(ret));
 		return;
 	}
 
@@ -261,17 +261,17 @@ static void knot_zone_contents_adjust_rdata_dname(knot_zone_contents_t *zone,
 			dbg_zone_verb("Trying to find wildcard child.\n");
 
 			n = knot_zone_contents_find_wildcard_child(zone,
-			                                      closest_encloser);
+							      closest_encloser);
 
 			if (n != NULL) {
 				knot_dname_set_node(dname, (knot_node_t *)n);
 				dbg_zone_exec_detail(
 					char *name = knot_dname_to_str(
-					                    knot_node_owner(n));
+							    knot_node_owner(n));
 					char *name2 = knot_dname_to_str(dname);
 					dbg_zone_detail("Set wildcard node %s "
-					                "to RDATA dname %s.\n",
-					                name, name2);
+							"to RDATA dname %s.\n",
+							name, name2);
 					free(name);
 					free(name2);
 				);
@@ -299,9 +299,9 @@ static void knot_zone_contents_adjust_rdata_in_rrset(knot_rrset_t *rrset,
 	knot_dname_t **dn = NULL;
 	while((dn = knot_rrset_get_next_dname(rrset, dn))) {
 		knot_zone_contents_adjust_rdata_dname(zone,
-		                                      lookup_tree,
-		                                      node,
-		                                      dn);
+						      lookup_tree,
+						      node,
+						      dn);
 	}
 }
 
@@ -327,7 +327,7 @@ static int knot_zone_contents_adjust_rrsets(knot_node_t *node,
 
 	for (int r = 0; r < count; ++r) {
 		assert(rrsets[r] != NULL);
-		
+
 		/* Make sure that RRSet owner is the same as node's. */
 		if (node->owner != rrsets[r]->owner) {
 			knot_rrset_set_owner(rrsets[r], node->owner);
@@ -336,17 +336,17 @@ static int knot_zone_contents_adjust_rrsets(knot_node_t *node,
 		dbg_zone("Adjusting next RRSet.\n");
 		knot_rrset_dump(rrsets[r]);
 		knot_zone_contents_adjust_rdata_in_rrset(rrsets[r],
-		                                         lookup_tree, zone,
-		                                         node);
+							 lookup_tree, zone,
+							 node);
 		knot_rrset_t *rrsigs = rrsets[r]->rrsigs;
 		if (rrsigs != NULL) {
 			dbg_zone("Adjusting next RRSIGs.\n");
 			knot_rrset_dump(rrsigs);
 			knot_zone_contents_adjust_rdata_in_rrset(rrsigs,
-		                                         lookup_tree, zone,
-			                                         node);
+							 lookup_tree, zone,
+								 node);
 		}
-		
+
 		if (rrsets[r]->type == KNOT_RRTYPE_DS) {
 			int ret = knot_rrset_ds_check(rrsets[r]);
 			if (ret != KNOT_EOK) {
@@ -381,7 +381,7 @@ static int knot_zone_contents_adjust_node(knot_node_t *node,
 {
 	// adjust domain names in RDATA
 	int ret = knot_zone_contents_adjust_rrsets(node, lookup_tree,
-				                   zone);
+						   zone);
 	if (ret != KNOT_EOK) {
 		return ret;
 	}
@@ -389,7 +389,7 @@ static int knot_zone_contents_adjust_node(knot_node_t *node,
 //	const knot_node_t *old_dname_node = node->owner->node;
 	knot_zone_contents_insert_dname_into_table(&node->owner, lookup_tree);
 //	assert(node->owner->node == old_dname_node || old_dname_node == NULL);
-	
+
 	// assure that owner has proper node
 	if (knot_dname_node(knot_node_owner(node)) == NULL) {
 		knot_dname_set_node(knot_node_get_owner(node), node);
@@ -407,7 +407,7 @@ static int knot_zone_contents_adjust_node(knot_node_t *node,
 	knot_node_t *nsec3 = NULL;
 	knot_dname_t *nsec3_name = NULL;
 	ret = knot_zone_contents_nsec3_name(zone, knot_node_owner(node),
- 	                                    &nsec3_name);
+					    &nsec3_name);
 	if (ret == KNOT_EOK) {
 		assert(nsec3_name);
 		knot_zone_tree_get(zone->nsec3_nodes, nsec3_name, &nsec3);
@@ -423,9 +423,9 @@ static int knot_zone_contents_adjust_node(knot_node_t *node,
 
 	dbg_zone_detail("Set flags to the node: \n");
 	dbg_zone_detail("Delegation point: %s\n",
-	                knot_node_is_deleg_point(node) ? "yes" : "no");
+			knot_node_is_deleg_point(node) ? "yes" : "no");
 	dbg_zone_detail("Non-authoritative: %s\n",
-	                knot_node_is_non_auth(node) ? "yes" : "no");
+			knot_node_is_non_auth(node) ? "yes" : "no");
 	return KNOT_EOK;
 }
 
@@ -450,7 +450,7 @@ static void knot_zone_contents_adjust_node_in_tree(
 
 	if (args->err != KNOT_EOK) {
 		dbg_xfrin_detail("Error during adjusting: %s, skipping node.\n",
-		                 knot_strerror(args->err));
+				 knot_strerror(args->err));
 		return;
 	}
 
@@ -461,7 +461,7 @@ dbg_zone_exec_verb(
 );
 
 	knot_zone_contents_t *zone = args->zone;
-	
+
 	/*
 	 *    Do other adjusting (flags, closest enclosers, wildcard children,
 	 *    etc.).
@@ -549,7 +549,7 @@ static void knot_zone_contents_adjust_nsec3_node_in_tree(
 
 	if (args->err != KNOT_EOK) {
 		dbg_xfrin_detail("Error during adjusting: %s, skipping node.\n",
-		                 knot_strerror(args->err));
+				 knot_strerror(args->err));
 		return;
 	}
 
@@ -557,7 +557,7 @@ static void knot_zone_contents_adjust_nsec3_node_in_tree(
 	if (knot_dname_node(knot_node_owner(node)) == NULL) {
 		knot_dname_set_node(knot_node_get_owner(node), node);
 	}
-	
+
 	/*
 	 * We assume, that NSEC3 nodes have none DNAMEs in their RDATA and
 	 * that node owners are all unique. \todo Harmful?
@@ -621,8 +621,8 @@ dbg_zone_exec_verb(
 );
 
 	int res = knot_nsec3_sha1(nsec3_params, knot_dname_name(name),
-	                            knot_dname_size(name), &hashed_name,
-	                            &hash_size);
+				    knot_dname_size(name), &hashed_name,
+				    &hash_size);
 
 	if (res != 0) {
 		char *n = knot_dname_to_str(name);
@@ -637,7 +637,7 @@ dbg_zone_exec_verb(
 
 	uint8_t *name_b32 = NULL;
 	size_t size = base32hex_encode_alloc(hashed_name, hash_size,
-	                                     &name_b32);
+					     &name_b32);
 
 	if (size == 0) {
 		char *n = knot_dname_to_str(name);
@@ -651,7 +651,7 @@ dbg_zone_exec_verb(
 
 	assert(name_b32 != NULL);
 	free(hashed_name);
-	
+
 dbg_zone_exec_verb(
 	/* name_b32 is not 0-terminated. */
 	char b32_string[hash_size + 1];
@@ -676,7 +676,7 @@ dbg_zone_exec_verb(
 
 	if (ret == NULL) {
 		dbg_zone("Error while creating NSEC3 domain name for "
-		         "hashed name.\n");
+			 "hashed name.\n");
 		knot_dname_release(*nsec3_name);
 		return KNOT_ERROR;
 	}
@@ -716,7 +716,7 @@ static int knot_zone_contents_find_in_tree(knot_zone_tree_t *tree,
 	knot_node_t *found = NULL, *prev = NULL;
 
 	int exact_match = knot_zone_tree_get_less_or_equal(tree, name, &found,
-	                                                   &prev);
+							   &prev);
 
 	assert(exact_match >= 0);
 	*node = found;
@@ -762,7 +762,7 @@ static int cname_chain_add(cname_chain_t **last, const knot_node_t *node)
 	assert(last != NULL);
 
 	cname_chain_t *new_cname =
-	                (cname_chain_t *)malloc(sizeof(cname_chain_t));
+			(cname_chain_t *)malloc(sizeof(cname_chain_t));
 	CHECK_ALLOC_LOG(new_cname, KNOT_ENOMEM);
 
 	new_cname->node = node;
@@ -828,7 +828,7 @@ static void knot_zone_contents_check_loops_in_tree(knot_node_t **tnode,
 
 	if (args->err != KNOT_EOK) {
 		dbg_xfrin_detail("Error during CNAME loop checking, skipping "
-		                 "node.\n");
+				 "node.\n");
 		return;
 	}
 
@@ -857,18 +857,18 @@ static void knot_zone_contents_check_loops_in_tree(knot_node_t **tnode,
 			const knot_node_t *ce = NULL;
 			const knot_node_t *prev = NULL;
 			ret = knot_zone_contents_find_dname(
-			                        args->zone, next_name,
-			                        &next_node, &ce, &prev);
+						args->zone, next_name,
+						&next_node, &ce, &prev);
 			if (ret != KNOT_ZONE_NAME_FOUND
 			    && ce != NULL) {
 				// try to find wildcard child
 				assert(knot_dname_is_subdomain(next_name,
-				                          knot_node_owner(ce)));
+							  knot_node_owner(ce)));
 				next_node = knot_node_wildcard_child(ce);
 			}
 
 			assert(next_node == NULL || knot_dname_compare(
-			           knot_node_owner(next_node), next_name) == 0
+				   knot_node_owner(next_node), next_name) == 0
 			 || knot_dname_is_wildcard(knot_node_owner(next_node)));
 		}
 
@@ -896,24 +896,24 @@ static int knot_zc_nsec3_parameters_match(const knot_rrset_t *rrset,
                                           size_t rdata_pos)
 {
 	assert(rrset != NULL && params != NULL);
-	
+
 	dbg_zone_detail("RDATA algo: %u, iterations: %u, salt length: %u, salt:"
-	                " %.*s\n", 
-	                knot_rrset_rdata_nsec3_algorithm(rrset, rdata_pos),
-	                knot_rrset_rdata_nsec3_iterations(rrset, rdata_pos),
-	                knot_rrset_rdata_nsec3_salt_length(rrset, rdata_pos),
-	                knot_rrset_rdata_nsec3_salt_length(rrset, rdata_pos),
-	                knot_rrset_rdata_nsec3_salt(rrset, rdata_pos));
+			" %.*s\n",
+			knot_rrset_rdata_nsec3_algorithm(rrset, rdata_pos),
+			knot_rrset_rdata_nsec3_iterations(rrset, rdata_pos),
+			knot_rrset_rdata_nsec3_salt_length(rrset, rdata_pos),
+			knot_rrset_rdata_nsec3_salt_length(rrset, rdata_pos),
+			knot_rrset_rdata_nsec3_salt(rrset, rdata_pos));
 	dbg_zone_detail("NSEC3PARAM algo: %u, iterations: %u, salt length: %u, "
-	                "salt: %.*s\n",  params->algorithm, params->iterations,
-	                params->salt_length, params->salt_length, params->salt);
+			"salt: %.*s\n",  params->algorithm, params->iterations,
+			params->salt_length, params->salt_length, params->salt);
 
 	return (knot_rrset_rdata_nsec3_algorithm(rrset, rdata_pos) == params->algorithm
-	        && knot_rrset_rdata_nsec3_iterations(rrset, rdata_pos) == params->iterations
-	        && knot_rrset_rdata_nsec3_salt_length(rrset, rdata_pos) == params->salt_length
-	        && strncmp((const char *)knot_rrset_rdata_nsec3_salt(rrset, rdata_pos),
-	                   (const char *)params->salt, params->salt_length)
-	           == 0);
+		&& knot_rrset_rdata_nsec3_iterations(rrset, rdata_pos) == params->iterations
+		&& knot_rrset_rdata_nsec3_salt_length(rrset, rdata_pos) == params->salt_length
+		&& strncmp((const char *)knot_rrset_rdata_nsec3_salt(rrset, rdata_pos),
+			   (const char *)params->salt, params->salt_length)
+		   == 0);
 }
 
 /*----------------------------------------------------------------------------*/
@@ -924,7 +924,7 @@ knot_zone_contents_t *knot_zone_contents_new(knot_node_t *apex,
                                              struct knot_zone *zone)
 {
 	knot_zone_contents_t *contents = (knot_zone_contents_t *)
-	                              calloc(1, sizeof(knot_zone_contents_t));
+				      calloc(1, sizeof(knot_zone_contents_t));
 	if (contents == NULL) {
 		ERR_ALLOC_FAILED;
 		return NULL;
@@ -978,7 +978,7 @@ cleanup:
 int knot_zone_contents_gen_is_old(const knot_zone_contents_t *contents)
 {
 	return ((contents->flags & KNOT_ZONE_FLAGS_GEN_MASK)
-	        == KNOT_ZONE_FLAGS_GEN_OLD);
+		== KNOT_ZONE_FLAGS_GEN_OLD);
 }
 
 /*----------------------------------------------------------------------------*/
@@ -986,7 +986,7 @@ int knot_zone_contents_gen_is_old(const knot_zone_contents_t *contents)
 int knot_zone_contents_gen_is_new(const knot_zone_contents_t *contents)
 {
 	return ((contents->flags & KNOT_ZONE_FLAGS_GEN_MASK)
-	        == KNOT_ZONE_FLAGS_GEN_NEW);
+		== KNOT_ZONE_FLAGS_GEN_NEW);
 }
 
 /*----------------------------------------------------------------------------*/
@@ -994,7 +994,7 @@ int knot_zone_contents_gen_is_new(const knot_zone_contents_t *contents)
 int knot_zone_contents_gen_is_finished(const knot_zone_contents_t *contents)
 {
 	return ((contents->flags & KNOT_ZONE_FLAGS_GEN_MASK)
-	        == KNOT_ZONE_FLAGS_GEN_FIN);
+		== KNOT_ZONE_FLAGS_GEN_FIN);
 }
 
 /*----------------------------------------------------------------------------*/
@@ -1026,7 +1026,7 @@ void knot_zone_contents_set_gen_new_finished(knot_zone_contents_t *contents)
 int knot_zone_contents_any_disabled(const knot_zone_contents_t *contents)
 {
 	return ((contents->flags & KNOT_ZONE_FLAGS_ANY_MASK)
-	        == KNOT_ZONE_FLAGS_ANY);
+		== KNOT_ZONE_FLAGS_ANY);
 }
 
 /*----------------------------------------------------------------------------*/
@@ -1053,7 +1053,7 @@ uint16_t knot_zone_contents_class(const knot_zone_contents_t *contents)
 	}
 
 	return knot_rrset_class(knot_node_rrset(contents->apex,
-	                                        KNOT_RRTYPE_SOA));
+						KNOT_RRTYPE_SOA));
 }
 
 /*----------------------------------------------------------------------------*/
@@ -1098,11 +1098,11 @@ dbg_zone_exec_detail(
 		knot_dname_left_chop(knot_node_owner(node));
 	if(chopped == NULL) {
 		/* Root domain and root domain only. */
-		assert(node->owner && node->owner->labels && 
+		assert(node->owner && node->owner->labels &&
 		       node->owner->labels[0] == 0);
 		return KNOT_EOK;
 	}
-	
+
 	if (knot_dname_compare(knot_node_owner(zone->apex), chopped) == 0) {
 		dbg_zone_detail("Zone apex is the parent.\n");
 		knot_node_set_parent(node, zone->apex);
@@ -1119,7 +1119,7 @@ dbg_zone_exec_detail(
 			chopped != NULL) {
 			/* Adding new dname to zone + add to table. */
 			dbg_zone_detail("Creating new node.\n");
-			
+
 			assert(chopped);
 			next_node = knot_node_new(chopped, NULL, flags);
 			if (next_node == NULL) {
@@ -1129,7 +1129,7 @@ dbg_zone_exec_detail(
 			}
 			//TODO possible leak
 //			ret = knot_zone_contents_solve_node_dnames(zone,
-//			                                           next_node);
+//								   next_node);
 //			if (ret != KNOT_EOK) {
 //				knot_node_free(&next_node);
 //				knot_dname_release(chopped);
@@ -1149,10 +1149,10 @@ dbg_zone_exec_detail(
 			dbg_zone_detail("Inserting new node to zone tree.\n");
 
 			ret = knot_zone_tree_insert(zone->nodes,
-			                              next_node);
+						      next_node);
 			if (ret != KNOT_EOK) {
 				dbg_zone("Failed to insert new node "
-				         "to zone tree.\n");
+					 "to zone tree.\n");
 				/*! \todo Delete the node?? */
 				/* Directly discard. */
 				knot_dname_release(chopped);
@@ -1213,21 +1213,21 @@ int knot_zone_contents_add_rrset(knot_zone_contents_t *zone,
 dbg_zone_exec_detail(
 	char *name = knot_dname_to_str(knot_rrset_owner(rrset));
 	dbg_zone_detail("Adding RRSet to zone contents: %s, type %d\n",
-	                name, knot_rrset_type(rrset));
+			name, knot_rrset_type(rrset));
 	free(name);
 );
 
 	// check if the RRSet belongs to the zone
 	if (knot_dname_compare(knot_rrset_owner(rrset),
-	                         zone->apex->owner) != 0
+				 zone->apex->owner) != 0
 	    && !knot_dname_is_subdomain(knot_rrset_owner(rrset),
-	                                  zone->apex->owner)) {
+					  zone->apex->owner)) {
 		return KNOT_EBADZONE;
 	}
 
 	if ((*node) == NULL
 	    && (*node = knot_zone_contents_get_node(zone,
-	                            knot_rrset_owner(rrset))) == NULL) {
+				    knot_rrset_owner(rrset))) == NULL) {
 		return KNOT_ENONODE;
 	}
 
@@ -1268,11 +1268,11 @@ int knot_zone_contents_add_rrsigs(knot_zone_contents_t *zone,
 	    || zone->apex == NULL || zone->apex->owner == NULL) {
 dbg_zone_exec(
 		dbg_zone("Parameters: zone=%p, rrsigs=%p, rrset=%p, "
-		         "node=%p\n", zone, rrsigs, rrset, node);
+			 "node=%p\n", zone, rrsigs, rrset, node);
 		if (zone != NULL) {
 			dbg_zone("zone->apex=%p\n", zone->apex);
 			if (zone->apex != NULL) {
-				dbg_zone("zone->apex->owner=%p\n", 
+				dbg_zone("zone->apex->owner=%p\n",
 						zone->apex->owner);
 			}
 		}
@@ -1283,16 +1283,16 @@ dbg_zone_exec(
 	// check if the RRSet belongs to the zone
 	if (*rrset != NULL
 	    && knot_dname_compare(knot_rrset_owner(*rrset),
-	                            zone->apex->owner) != 0
+				    zone->apex->owner) != 0
 	    && !knot_dname_is_subdomain(knot_rrset_owner(*rrset),
-	                                  zone->apex->owner)) {
+					  zone->apex->owner)) {
 		return KNOT_EBADZONE;
 	}
 
 	// check if the RRSIGs belong to the RRSet
 	if (*rrset != NULL
 	    && (knot_dname_compare(knot_rrset_owner(rrsigs),
-	                             knot_rrset_owner(*rrset)) != 0)) {
+				     knot_rrset_owner(*rrset)) != 0)) {
 		dbg_zone("RRSIGs do not belong to the given RRSet.\n");
 		return KNOT_EINVAL;
 	}
@@ -1302,14 +1302,14 @@ dbg_zone_exec(
 		// even no node given
 		// find proper node
 		knot_node_t *(*get_node)(const knot_zone_contents_t *,
-		                           const knot_dname_t *)
+					   const knot_dname_t *)
 		    = (knot_rrset_rdata_rrsig_type_covered(rrsigs) == KNOT_RRTYPE_NSEC3)
 		       ? knot_zone_contents_get_nsec3_node
 		       : knot_zone_contents_get_node;
 
 		if (*node == NULL
 		    && (*node = get_node(
-		                   zone, knot_rrset_owner(rrsigs))) == NULL) {
+				   zone, knot_rrset_owner(rrsigs))) == NULL) {
 			dbg_zone("Failed to find node for RRSIGs.\n");
 			return KNOT_ENONODE;
 		}
@@ -1319,9 +1319,9 @@ dbg_zone_exec(
 		// find the RRSet in the node
 		// take only the first RDATA from the RRSIGs
 		dbg_zone_detail("Finding RRSet for type %d\n",
-		                knot_rrset_rdata_rrsig_type_covered(rrsigs));
+				knot_rrset_rdata_rrsig_type_covered(rrsigs));
 		*rrset = knot_node_get_rrset(
-		             *node, knot_rrset_rdata_rrsig_type_covered(rrsigs));
+			     *node, knot_rrset_rdata_rrsig_type_covered(rrsigs));
 		if (*rrset == NULL) {
 			dbg_zone("Failed to find RRSet for RRSIGs.\n");
 			return KNOT_ENORRSET;
@@ -1370,7 +1370,7 @@ int knot_zone_contents_add_nsec3_node(knot_zone_contents_t *zone,
 	ret = knot_zone_tree_insert(zone->nsec3_nodes, node);
 	if (ret != KNOT_EOK) {
 		dbg_zone("Failed to insert node into NSEC3 tree: %s.\n",
-		         knot_strerror(ret));
+			 knot_strerror(ret));
 		return ret;
 	}
 
@@ -1400,15 +1400,15 @@ int knot_zone_contents_add_nsec3_rrset(knot_zone_contents_t *zone,
 
 	// check if the RRSet belongs to the zone
 	if (knot_dname_compare(knot_rrset_owner(rrset),
-	                         zone->apex->owner) != 0
+				 zone->apex->owner) != 0
 	    && !knot_dname_is_subdomain(knot_rrset_owner(rrset),
-	                                  zone->apex->owner)) {
+					  zone->apex->owner)) {
 		return KNOT_EBADZONE;
 	}
 
 	if ((*node) == NULL
 	    && (*node = knot_zone_contents_get_nsec3_node(
-	                      zone, knot_rrset_owner(rrset))) == NULL) {
+			      zone, knot_rrset_owner(rrset))) == NULL) {
 		return KNOT_ENONODE;
 	}
 
@@ -1434,7 +1434,7 @@ int knot_zone_contents_add_nsec3_rrset(knot_zone_contents_t *zone,
 
 /*----------------------------------------------------------------------------*/
 
-int knot_zone_contents_remove_node(knot_zone_contents_t *contents, 
+int knot_zone_contents_remove_node(knot_zone_contents_t *contents,
 	const knot_node_t *node, knot_node_t **removed_tree)
 {
 	if (contents == NULL || node == NULL) {
@@ -1461,7 +1461,7 @@ dbg_zone_exec_verb(
 
 /*----------------------------------------------------------------------------*/
 
-int knot_zone_contents_remove_nsec3_node(knot_zone_contents_t *contents, 
+int knot_zone_contents_remove_nsec3_node(knot_zone_contents_t *contents,
 	const knot_node_t *node, knot_node_t **removed)
 {
 	if (contents == NULL || node == NULL) {
@@ -1476,7 +1476,7 @@ int knot_zone_contents_remove_nsec3_node(knot_zone_contents_t *contents,
 	if (ret != KNOT_EOK) {
 		return KNOT_ENONODE;
 	}
-	
+
 	return KNOT_EOK;
 }
 
@@ -1513,7 +1513,7 @@ knot_node_t *knot_zone_contents_get_nsec3_node(
 
 	if (ret != KNOT_EOK) {
 		dbg_zone("Failed to find NSEC3 name in the zone tree."
-		                  "\n");
+				  "\n");
 		return NULL;
 	}
 
@@ -1546,7 +1546,7 @@ dbg_zone_exec_verb(
 	char *name_str = knot_dname_to_str(name);
 	char *zone_str = knot_dname_to_str(zone->apex->owner);
 	dbg_zone_verb("Searching for name %s in zone %s...\n",
-	              name_str, zone_str);
+		      name_str, zone_str);
 	free(name_str);
 	free(zone_str);
 );
@@ -1566,19 +1566,19 @@ dbg_zone_exec_verb(
 	knot_node_t *found = NULL, *prev = NULL;
 
 	int exact_match = knot_zone_contents_find_in_tree(zone->nodes, name,
-	                                                    &found, &prev);
+							    &found, &prev);
 	assert(exact_match >= 0);
 	*node = found;
 	*previous = prev;
 
 dbg_zone_exec_detail(
 	char *name_str = (*node) ? knot_dname_to_str((*node)->owner)
-	                         : "(nil)";
+				 : "(nil)";
 	char *name_str2 = (*previous != NULL)
-	                  ? knot_dname_to_str((*previous)->owner)
-	                  : "(nil)";
+			  ? knot_dname_to_str((*previous)->owner)
+			  : "(nil)";
 dbg_zone_detail("Search function returned %d, node %s (%p) and prev: %s (%p)\n",
-	                exact_match, name_str, *node, name_str2, *previous);
+			exact_match, name_str, *node, name_str2, *previous);
 
 	if (*node) {
 		free(name_str);
@@ -1638,7 +1638,7 @@ knot_node_t *knot_zone_contents_get_previous(
 	knot_node_t *found = NULL, *prev = NULL;
 
 	int exact_match = knot_zone_contents_find_in_tree(zone->nodes, name,
-	                                                    &found, &prev);
+							    &found, &prev);
 	assert(exact_match >= 0);
 	assert(prev != NULL);
 
@@ -1665,7 +1665,7 @@ knot_node_t *knot_zone_contents_get_previous_nsec3(
 	knot_node_t *found = NULL, *prev = NULL;
 
 	int exact_match = knot_zone_contents_find_in_tree(zone->nsec3_nodes,
-	                                                   name, &found, &prev);
+							   name, &found, &prev);
 	assert(exact_match >= 0);
 	assert(prev != NULL);
 
@@ -1768,40 +1768,40 @@ dbg_zone_exec_detail(
 	}
 
 	dbg_zone_verb("find_nsec3_for_name() returning %d\n", exact_match);
-	
-	/* The previous may be from wrong NSEC3 chain. Search for previous 
-	 * from the right chain. Check iterations, hash algorithm and salt 
+
+	/* The previous may be from wrong NSEC3 chain. Search for previous
+	 * from the right chain. Check iterations, hash algorithm and salt
 	 * values and compare them to the ones from NSEC3PARAM.
 	 */
-	const knot_rrset_t *nsec3_rrset = knot_node_rrset(*nsec3_previous, 
-	                                                  KNOT_RRTYPE_NSEC3);
+	const knot_rrset_t *nsec3_rrset = knot_node_rrset(*nsec3_previous,
+							  KNOT_RRTYPE_NSEC3);
 	assert(nsec3_rrset);
 	const knot_node_t *original_prev = *nsec3_previous;
-	
+
 	int match = 0;
-	
+
 	while (nsec3_rrset && !match) {
 		for (uint16_t i = 0;
 		     i < knot_rrset_rdata_rr_count(nsec3_rrset) && !match;
 		     i++) {
 			if (knot_zc_nsec3_parameters_match(nsec3_rrset,
-			                                    &zone->nsec3_params,
-			                                    i)) {
+							    &zone->nsec3_params,
+							    i)) {
 				/* Matching NSEC3PARAM match at position nr.: i. */
 				match = 1;
 			}
 		}
-		
+
 		if (match) {
 			break;
 		}
-		
+
 		/* This RRSET was not a match, try the one from previous node. */
 		*nsec3_previous = knot_node_previous(*nsec3_previous);
-		nsec3_rrset = knot_node_rrset(*nsec3_previous, 
-		                              KNOT_RRTYPE_NSEC3);
+		nsec3_rrset = knot_node_rrset(*nsec3_previous,
+					      KNOT_RRTYPE_NSEC3);
 		dbg_zone_exec_detail(
-		char *name = (*nsec3_previous) 
+		char *name = (*nsec3_previous)
 				? knot_dname_to_str(
 					  knot_node_owner(*nsec3_previous))
 				: "none";
@@ -1817,7 +1817,7 @@ dbg_zone_exec_detail(
 			break;
 		}
 	}
-	
+
 	return (exact_match)
 	       ? KNOT_ZONE_NAME_FOUND
 	       : KNOT_ZONE_NAME_NOT_FOUND;
@@ -1855,14 +1855,14 @@ int knot_zone_contents_adjust(knot_zone_contents_t *zone,
 	if (zone == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Heal zone indexes. */
 	hattrie_build_index(zone->nodes);
 	hattrie_build_index(zone->nsec3_nodes);
 
 	// load NSEC3PARAM (needed on adjusting function)
 	knot_zone_contents_load_nsec3param(zone);
-	
+
 	hattrie_t *lookup_tree = NULL;
 	if (dupl_check) {
 		lookup_tree = hattrie_create();
@@ -1871,7 +1871,7 @@ int knot_zone_contents_adjust(knot_zone_contents_t *zone,
 			return KNOT_ERROR;
 		}
 	}
-	
+
 	knot_zone_adjust_arg_t adjust_arg;
 	adjust_arg.zone = zone;
 	adjust_arg.first_node = NULL;
@@ -1885,12 +1885,12 @@ int knot_zone_contents_adjust(knot_zone_contents_t *zone,
 	 */
 	dbg_zone("Setting 'prev' pointers to NSEC3 nodes.\n");
 	int ret = knot_zone_tree_apply_inorder(zone->nsec3_nodes,
-	         knot_zone_contents_adjust_nsec3_node_in_tree_ptr, &adjust_arg);
+		 knot_zone_contents_adjust_nsec3_node_in_tree_ptr, &adjust_arg);
 	assert(ret == KNOT_EOK);
 
 	if (adjust_arg.err != KNOT_EOK) {
 		dbg_zone("Failed to set 'prev' pointers to NSEC3 nodes: %s\n",
-		         knot_strerror(adjust_arg.err));
+			 knot_strerror(adjust_arg.err));
 		hattrie_free(lookup_tree);
 		return adjust_arg.err;
 	}
@@ -1898,7 +1898,7 @@ int knot_zone_contents_adjust(knot_zone_contents_t *zone,
 	// set the last node as previous of the first node
 	if (adjust_arg.first_node) {
 		knot_node_set_previous(adjust_arg.first_node,
-		                       adjust_arg.previous_node);
+				       adjust_arg.previous_node);
 	}
 	if (first_nsec3_node) {
 		*first_nsec3_node = adjust_arg.first_node;
@@ -1913,12 +1913,12 @@ int knot_zone_contents_adjust(knot_zone_contents_t *zone,
 
 	dbg_zone("Setting 'prev' pointers to normal nodes.\n");
 	ret = knot_zone_tree_apply_inorder(zone->nodes,
-	         knot_zone_contents_adjust_node_in_tree_ptr, &adjust_arg);
+		 knot_zone_contents_adjust_node_in_tree_ptr, &adjust_arg);
 	assert(ret == KNOT_EOK);
 
 	if (adjust_arg.err != KNOT_EOK) {
 		dbg_zone("Failed to set 'prev' pointers to normal nodes: %s\n",
-		         knot_strerror(adjust_arg.err));
+			 knot_strerror(adjust_arg.err));
 		hattrie_free(lookup_tree);
 		return adjust_arg.err;
 	}
@@ -1936,31 +1936,31 @@ int knot_zone_contents_adjust(knot_zone_contents_t *zone,
 
 	dbg_zone("Adjusting NSEC3 nodes.\n");
 	ret = knot_zone_tree_apply_inorder(zone->nsec3_nodes,
-	             knot_zone_contents_adjust_nsec3_node_in_tree, &adjust_arg);
+		     knot_zone_contents_adjust_nsec3_node_in_tree, &adjust_arg);
 	assert(ret == KNOT_EOK);
 
 	if (adjust_arg.err != KNOT_EOK) {
 		dbg_zone("Failed to adjust NSEC3 nodes: %s\n",
-		         knot_strerror(adjust_arg.err));
+			 knot_strerror(adjust_arg.err));
 		hattrie_free(lookup_tree);
 		return adjust_arg.err;
 	}
 
 	dbg_zone("Adjusting normal nodes.\n");
 	ret = knot_zone_tree_apply_inorder(zone->nodes,
-	                        knot_zone_contents_adjust_node_in_tree,
-	                        &adjust_arg);
+				knot_zone_contents_adjust_node_in_tree,
+				&adjust_arg);
 	assert(ret == KNOT_EOK);
 
 	if (adjust_arg.err != KNOT_EOK) {
 		dbg_zone("Failed to adjust normal nodes: %s\n",
-		         knot_strerror(adjust_arg.err));
+			 knot_strerror(adjust_arg.err));
 		hattrie_free(lookup_tree);
 		return adjust_arg.err;
 	}
 
 	dbg_zone("Done.\n");
-	
+
 	hattrie_free(lookup_tree);
 
 	return ret;
@@ -1982,8 +1982,8 @@ int knot_zone_contents_check_loops(knot_zone_contents_t *zone)
 
 	assert(zone->nodes != NULL);
 	knot_zone_tree_apply_inorder(zone->nodes,
-	                                 knot_zone_contents_check_loops_in_tree,
-	                                 (void *)&data);
+					 knot_zone_contents_check_loops_in_tree,
+					 (void *)&data);
 
 	if (data.err != KNOT_EOK) {
 		dbg_zone("Found CNAME loop in data. Aborting transfer.\n");
@@ -2004,7 +2004,7 @@ int knot_zone_contents_load_nsec3param(knot_zone_contents_t *zone)
 	}
 
 	const knot_rrset_t *rrset = knot_node_rrset(zone->apex,
-	                                            KNOT_RRTYPE_NSEC3PARAM);
+						    KNOT_RRTYPE_NSEC3PARAM);
 
 	if (rrset != NULL) {
 		int r = knot_nsec3_params_from_wire(&zone->nsec3_params, rrset);
@@ -2025,7 +2025,7 @@ int knot_zone_contents_nsec3_enabled(const knot_zone_contents_t *zone)
 	}
 
 	return (zone->nsec3_params.algorithm != 0
-	        && knot_zone_tree_weight(zone->nsec3_nodes) != 0);
+		&& knot_zone_tree_weight(zone->nsec3_nodes) != 0);
 }
 
 /*----------------------------------------------------------------------------*/
@@ -2059,7 +2059,7 @@ int knot_zone_contents_tree_apply_inorder(knot_zone_contents_t *zone,
 	f.data = data;
 
 	return knot_zone_tree_apply_inorder(zone->nodes,
-	                                            tree_apply_cb, &f);
+						    tree_apply_cb, &f);
 }
 
 /*----------------------------------------------------------------------------*/
@@ -2077,7 +2077,7 @@ int knot_zone_contents_tree_apply_inorder_reverse(
 	f.data = data;
 
 	return knot_zone_tree_apply_recursive(zone->nodes,
-	                                          tree_apply_cb, &f);
+						  tree_apply_cb, &f);
 }
 
 /*----------------------------------------------------------------------------*/
@@ -2149,7 +2149,7 @@ int knot_zone_contents_shallow_copy(const knot_zone_contents_t *from,
 	int ret = KNOT_EOK;
 
 	knot_zone_contents_t *contents = (knot_zone_contents_t *)calloc(
-	                                     1, sizeof(knot_zone_contents_t));
+					     1, sizeof(knot_zone_contents_t));
 	if (contents == NULL) {
 		ERR_ALLOC_FAILED;
 		return KNOT_ENOMEM;
@@ -2167,9 +2167,9 @@ int knot_zone_contents_shallow_copy(const knot_zone_contents_t *from,
 	       sizeof(knot_nsec3_params_t));
 
 	if ((ret = knot_zone_tree_shallow_copy(from->nodes,
-	                                 &contents->nodes)) != KNOT_EOK
+					 &contents->nodes)) != KNOT_EOK
 	    || (ret = knot_zone_tree_shallow_copy(from->nsec3_nodes,
-	                                &contents->nsec3_nodes)) != KNOT_EOK) {
+					&contents->nsec3_nodes)) != KNOT_EOK) {
 		goto cleanup;
 	}
 
@@ -2202,7 +2202,7 @@ int knot_zone_contents_shallow_copy2(const knot_zone_contents_t *from,
 	int ret = KNOT_EOK;
 
 	knot_zone_contents_t *contents = (knot_zone_contents_t *)calloc(
-	                                     1, sizeof(knot_zone_contents_t));
+					     1, sizeof(knot_zone_contents_t));
 	if (contents == NULL) {
 		ERR_ALLOC_FAILED;
 		return KNOT_ENOMEM;
@@ -2218,9 +2218,9 @@ int knot_zone_contents_shallow_copy2(const knot_zone_contents_t *from,
 	contents->zone = from->zone;
 
 	if ((ret = knot_zone_tree_deep_copy(from->nodes,
-	                                    &contents->nodes)) != KNOT_EOK
+					    &contents->nodes)) != KNOT_EOK
 	    || (ret = knot_zone_tree_deep_copy(from->nsec3_nodes,
-	                                  &contents->nsec3_nodes)) != KNOT_EOK) {
+					  &contents->nsec3_nodes)) != KNOT_EOK) {
 		goto cleanup;
 	}
 
@@ -2251,7 +2251,7 @@ void knot_zone_contents_free(knot_zone_contents_t **contents)
 	knot_zone_tree_free(&(*contents)->nsec3_nodes);
 
 	knot_nsec3_params_free(&(*contents)->nsec3_params);
-	
+
 	free(*contents);
 	*contents = NULL;
 }
@@ -2316,7 +2316,7 @@ static void knot_zc_integrity_check_previous(const knot_node_t *node,
 	// first, check if the previous and next pointers are set properly
 	if (check_data->previous != NULL) {
 		char *name_prev = knot_dname_to_str(
-		                        knot_node_owner(check_data->previous));
+					knot_node_owner(check_data->previous));
 
 		if (knot_node_previous(node) != check_data->previous) {
 			char *name2 = knot_dname_to_str(knot_node_owner(
@@ -2342,8 +2342,8 @@ static void knot_zc_integrity_check_flags(const knot_node_t *node,
 	if (node == knot_zone_contents_apex(check_data->contents)) {
 		if (!knot_node_is_auth(node)) {
 			fprintf(stderr, "Wrong flags: node %s, flags: %u. "
-			        "Should be non-authoritative.\n", name,
-			        node->flags);
+				"Should be non-authoritative.\n", name,
+				node->flags);
 			++check_data->errors;
 		}
 		return;
@@ -2352,12 +2352,12 @@ static void knot_zc_integrity_check_flags(const knot_node_t *node,
 	// check the flags
 	if (check_data->deleg_point != NULL
 	    && knot_dname_is_subdomain(knot_node_owner(node),
-	                            knot_node_owner(check_data->deleg_point))) {
+				    knot_node_owner(check_data->deleg_point))) {
 		// this is a non-authoritative node
 		if (!knot_node_is_non_auth(node)) {
 			fprintf(stderr, "Wrong flags: node %s, flags: %u. "
-			        "Should be non-authoritative.\n", name,
-			        node->flags);
+				"Should be non-authoritative.\n", name,
+				node->flags);
 			++check_data->errors;
 		}
 	} else {
@@ -2365,8 +2365,8 @@ static void knot_zc_integrity_check_flags(const knot_node_t *node,
 			// this is a delegation point
 			if (!knot_node_is_deleg_point(node)) {
 				fprintf(stderr, "Wrong flags: node %s, flags: "
-				        "%u. Should be deleg. point.\n", name,
-				        node->flags);
+					"%u. Should be deleg. point.\n", name,
+					node->flags);
 				++check_data->errors;
 			}
 			check_data->deleg_point = node;
@@ -2374,8 +2374,8 @@ static void knot_zc_integrity_check_flags(const knot_node_t *node,
 			// this is an authoritative node
 			if (!knot_node_is_auth(node)) {
 				fprintf(stderr, "Wrong flags: node %s, flags: "
-				        "%u. Should be authoritative.\n", name,
-				        node->flags);
+					"%u. Should be authoritative.\n", name,
+					node->flags);
 				++check_data->errors;
 			}
 			check_data->deleg_point = NULL;
@@ -2415,11 +2415,11 @@ static void knot_zc_integrity_check_parent(const knot_node_t *node,
 		const knot_node_t *parent = knot_node_parent(node);
 		if (parent != check_data->parent) {
 			char *name2 = (parent != NULL)
-			                ? knot_dname_to_str(
-			                        knot_node_owner(parent))
-			                : "none";
+					? knot_dname_to_str(
+						knot_node_owner(parent))
+					: "none";
 			fprintf(stderr, "Wrong parent: node %s, parent %s. "
-			        " Should be %s\n", name, name2, pname);
+				" Should be %s\n", name, name2, pname);
 			if (parent != NULL) {
 				free(name2);
 			}
@@ -2433,14 +2433,14 @@ static void knot_zc_integrity_check_parent(const knot_node_t *node,
 			    && knot_node_wildcard_child(check_data->parent)
 			       != node) {
 				char *wc = (knot_node_wildcard_child(
-				                 check_data->parent) == NULL)
+						 check_data->parent) == NULL)
 				   ? strdup("none")
 				   : knot_dname_to_str(knot_node_owner(
-				           knot_node_wildcard_child(
-				                   check_data->parent)));
+					   knot_node_wildcard_child(
+						   check_data->parent)));
 				fprintf(stderr, "Wrong wildcard child: node %s,"
-				        " wildcard child: %s. Should be %s\n",
-				        pname, wc, name);
+					" wildcard child: %s. Should be %s\n",
+					pname, wc, name);
 				if (knot_node_wildcard_child(
 				       check_data->parent) != NULL) {
 				}
@@ -2470,13 +2470,13 @@ static void knot_zc_integrity_check_owner(const knot_node_t *node,
 {
 	// check node stored in owner
 	const knot_node_t *owner_node =
-	                knot_dname_node(knot_node_owner(node));
+			knot_dname_node(knot_node_owner(node));
 	if (owner_node != node) {
 		char *name2 = (owner_node != NULL)
-		                ? knot_dname_to_str(knot_node_owner(owner_node))
-		                : "none";
+				? knot_dname_to_str(knot_node_owner(owner_node))
+				: "none";
 		fprintf(stderr, "Wrong owner's node: node %s, owner's node %s"
-		        "\n", name, name2);
+			"\n", name, name2);
 		if (owner_node != NULL) {
 			free(name2);
 		}
@@ -2535,7 +2535,7 @@ static void knot_zc_integrity_check_nsec3(knot_node_t *node, void *data)
 	// check if the node is child of the zone apex
 	if (node->parent != check_data->parent) {
 		fprintf(stderr, "NSEC3 node's parent is not apex. Node: %s.\n",
-		        name);
+			name);
 		++check_data->errors;
 	}
 
@@ -2590,15 +2590,15 @@ void check_child_count(knot_node_t **tnode, void *data)
 	// find corresponding node in the given contents
 	const knot_node_t *found = NULL;
 	found = knot_zone_contents_find_node(check_data->contents,
-	                                     knot_node_owner(node));
+					     knot_node_owner(node));
 	assert(found != NULL);
 
 	if (knot_node_children(node) != knot_node_children(found)) {
 		char *name = knot_dname_to_str(knot_node_owner(node));
 		fprintf(stderr, "Wrong children count: node (%p) %s, count %u. "
-		        "Should be %u (%p)\n", found, name,
-		        knot_node_children(found),
-		        knot_node_children(node), node);
+			"Should be %u (%p)\n", found, name,
+			knot_node_children(found),
+			knot_node_children(node), node);
 		free(name);
 
 		++check_data->errors;
@@ -2625,7 +2625,7 @@ static void count_nsec3_nodes(knot_node_t **tnode, void *data)
 
 	knot_node_t *apex = (knot_node_t *)data;
 	assert(apex != NULL);
-	
+
 	apex->children += 1;
 }
 
@@ -2648,7 +2648,7 @@ int knot_zc_integrity_check_child_count(check_data_t *data)
 	// in the same walkthrough find the apex
 	knot_node_t *apex_copy = NULL;
 	knot_zone_tree_apply_inorder(nodes_copy, reset_child_count,
-	                                     (void *)&apex_copy);
+					     (void *)&apex_copy);
 	assert(apex_copy != NULL);
 
 	// now count children of all nodes, presuming the parent pointers are ok
@@ -2656,20 +2656,20 @@ int knot_zc_integrity_check_child_count(check_data_t *data)
 
 	// add count of NSEC3 nodes to the apex' children count
 	fprintf(stderr, "Children count of new apex before NSEC3: %d\n",
-	        data->contents->apex->new_node->children);
+		data->contents->apex->new_node->children);
 	knot_zone_tree_apply_inorder(data->contents->nsec3_nodes,
-	                                     count_nsec3_nodes,
-	                                     (void *)apex_copy);
+					     count_nsec3_nodes,
+					     (void *)apex_copy);
 
 
 	// now compare the children counts
 	// iterate over the old zone and search for nodes in the copy
 	knot_zone_tree_apply_inorder(nodes_copy, check_child_count,
-	                                     (void *)data);
+					     (void *)data);
 
 	// cleanup old zone tree - reset pointers to new node to NULL
 	knot_zone_tree_apply_inorder(data->contents->nodes,
-	                                     reset_new_nodes, NULL);
+					     reset_new_nodes, NULL);
 
 	// destroy the shallow copy
 	knot_zone_tree_deep_free(&nodes_copy);
@@ -2706,8 +2706,8 @@ int knot_zone_contents_integrity_check(const knot_zone_contents_t *contents)
 	data.contents = contents;
 
 	int ret = knot_zone_contents_tree_apply_inorder(
-	                        (knot_zone_contents_t *)contents,
-	                        knot_zc_integrity_check_node, (void *)&data);
+				(knot_zone_contents_t *)contents,
+				knot_zc_integrity_check_node, (void *)&data);
 	assert(ret == KNOT_EOK);
 
 	// if OK, we can continue with checking children count
@@ -2721,8 +2721,8 @@ int knot_zone_contents_integrity_check(const knot_zone_contents_t *contents)
 	data.children = 0;
 	data.parent = contents->apex;
 	ret = knot_zone_contents_nsec3_apply_inorder(
-	                        (knot_zone_contents_t *)contents,
-	                        knot_zc_integrity_check_nsec3, (void *)&data);
+				(knot_zone_contents_t *)contents,
+				knot_zc_integrity_check_nsec3, (void *)&data);
 	assert(ret == KNOT_EOK);
 
 	return data.errors;
@@ -2740,7 +2740,7 @@ static void find_dname_in_rdata(knot_node_t **tnode, void *data)
 	if (in_data->stopped) {
 		return;
 	}
-	
+
 	/* For all RRSets in node. */
 	const knot_rrset_t **rrsets = knot_node_rrsets_no_copy(*tnode);
 	if (rrsets == NULL) {
@@ -2755,14 +2755,14 @@ static void find_dname_in_rdata(knot_node_t **tnode, void *data)
 				in_data->stopped = 1;
 				return;
 			} else if (knot_dname_compare(*dname,
-			                              in_data->dname) == 0) {
+						      in_data->dname) == 0) {
 				in_data->found_dname = *dname;
 				in_data->stopped = 1;
 				return;
 			}
 		}
 	}
-	
+
 	assert(in_data->stopped == 0);
 }
 
@@ -2775,7 +2775,7 @@ const knot_dname_t *knot_zone_contents_find_dname_in_rdata(
 	data.dname = dname;
 	data.found_dname = NULL;
 	knot_zone_tree_apply_inorder(zone->nodes,
-	                                     find_dname_in_rdata, &data);
+					     find_dname_in_rdata, &data);
 	if (data.stopped) {
 		/* Dname found. */
 		return data.found_dname;
@@ -2792,4 +2792,3 @@ unsigned knot_zone_serial(const knot_zone_contents_t *zone)
 	soa = knot_node_rrset(knot_zone_contents_apex(zone), KNOT_RRTYPE_SOA);
 	return knot_rrset_rdata_soa_serial(soa);
 }
-
diff --git a/src/libknot/zone/zone-contents.h b/src/libknot/zone/zone-contents.h
index d856b6bf0312d351bffbfa70f3fc539f0ae67401..f81437dfd327dd2777c0406b46a482b417aacda3 100644
--- a/src/libknot/zone/zone-contents.h
+++ b/src/libknot/zone/zone-contents.h
@@ -46,14 +46,14 @@ typedef struct knot_zone_contents_t {
 	struct knot_zone *zone;
 
 	knot_nsec3_params_t nsec3_params;
-	
+
 	/*!
 	 * \todo Unify the use of this field - authoritative nodes vs. all.
 	 */
 	size_t node_count;
 
 	/*! \brief Various flags
-	 * 
+	 *
 	 * Two rightmost bits denote zone contents generation.
 	 *
 	 * Possible values:
@@ -167,10 +167,10 @@ int knot_zone_contents_add_nsec3_rrset(knot_zone_contents_t *contents,
                                          knot_node_t **node,
                                          knot_rrset_dupl_handling_t dupl);
 
-int knot_zone_contents_remove_node(knot_zone_contents_t *contents, 
+int knot_zone_contents_remove_node(knot_zone_contents_t *contents,
 	const knot_node_t *node, knot_node_t **removed_tree);
 
-int knot_zone_contents_remove_nsec3_node(knot_zone_contents_t *contents, 
+int knot_zone_contents_remove_nsec3_node(knot_zone_contents_t *contents,
 	const knot_node_t *node, knot_node_t **removed);
 
 /*!
@@ -509,9 +509,9 @@ void knot_zone_contents_insert_dname_into_table(knot_dname_t **in_dname,
 
 /*!
  * \brief Fetch zone serial.
- * 
+ *
  * \param zone Zone.
- * 
+ *
  * \return serial or 0
  */
 unsigned knot_zone_serial(const knot_zone_contents_t *zone);
diff --git a/src/libknot/zone/zone-diff.c b/src/libknot/zone/zone-diff.c
index adef1ce66495d8931bc2540f98e9c0868abfa2f6..f86b726b1b48d87723830b2b8b942523eba41cd1 100644
--- a/src/libknot/zone/zone-diff.c
+++ b/src/libknot/zone/zone-diff.c
@@ -77,10 +77,10 @@ static int knot_zone_diff_load_soas(const knot_zone_contents_t *zone1,
 
 	int64_t soa_serial2 =
 		knot_rrset_rdata_soa_serial(soa_rrset2);
-	
+
 	if (soa_serial2 == -1) {
 		dbg_zonediff("zone_diff: load_soas: Got bad SOA.\n");
-	}	
+	}
 
 	if (ns_serial_compare(soa_serial1, soa_serial2) == 0) {
 		dbg_zonediff("zone_diff: "
@@ -89,7 +89,7 @@ static int knot_zone_diff_load_soas(const knot_zone_contents_t *zone1,
 		             soa_serial1, soa_serial2);
 		return KNOT_ENODIFF;
 	}
-	
+
 	if (ns_serial_compare(soa_serial1, soa_serial2) > 0) {
 		dbg_zonediff("zone_diff: "
 		             "second zone must have higher serial than the "
@@ -97,7 +97,7 @@ static int knot_zone_diff_load_soas(const knot_zone_contents_t *zone1,
 		             soa_serial1, soa_serial2);
 		return KNOT_ERANGE;
 	}
-	
+
 	/* We will not touch SOA later, now is the time to handle RRSIGs. */
 	int ret = knot_zone_diff_rdata(knot_rrset_rrsigs(soa_rrset1),
 	                               knot_rrset_rrsigs(soa_rrset2),
@@ -115,7 +115,7 @@ static int knot_zone_diff_load_soas(const knot_zone_contents_t *zone1,
 		dbg_zonediff("zone_diff: load_soas: Cannot copy RRSet.\n");
 		return ret;
 	}
-	
+
 	/* We MUST NOT save this RRSIG. */
 	knot_rrset_deep_free(&changeset->soa_from->rrsigs, 1, 1);
 	assert(changeset->soa_from->rrsigs == NULL);
@@ -125,13 +125,13 @@ static int knot_zone_diff_load_soas(const knot_zone_contents_t *zone1,
 		dbg_zonediff("zone_diff: load_soas: Cannot copy RRSet.\n");
 		return ret;
 	}
-	
+
 	knot_rrset_deep_free(&changeset->soa_to->rrsigs, 1, 1);
 	assert(changeset->soa_to->rrsigs == NULL);
-	
+
 	changeset->serial_from = soa_serial1;
 	changeset->serial_to = soa_serial2;
-	
+
 	dbg_zonediff_verb("zone_diff: load_soas: SOAs diffed. (%"PRId64" -> %"PRId64")\n",
 	            soa_serial1, soa_serial2);
 
@@ -148,16 +148,16 @@ static int knot_zone_diff_changeset_add_rrset(knot_changeset_t *changeset,
 		dbg_zonediff("zone_diff: add_rrset: NULL parameters.\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	if (knot_rrset_rdata_rr_count(rrset) == 0) {
 		dbg_zonediff_detail("zone_diff: Nothing to add.\n");
 		return KNOT_EOK;
 	}
-	
+
 	dbg_zonediff_detail("zone_diff: add_rrset: Adding RRSet (%d RRs):\n",
 	              knot_rrset_rdata_rr_count(rrset));
 	knot_rrset_dump(rrset);
-	
+
 	knot_rrset_t *rrset_copy = NULL;
 	int ret = knot_rrset_deep_copy(rrset, &rrset_copy, 1);
 	if (ret != KNOT_EOK) {
@@ -166,9 +166,9 @@ static int knot_zone_diff_changeset_add_rrset(knot_changeset_t *changeset,
 	}
 	if (rrset_copy->rrsigs != NULL) {
 		knot_rrset_deep_free(&rrset_copy->rrsigs, 1, 1);
-	}	
+	}
 	assert(knot_rrset_rrsigs(rrset_copy) == NULL);
-	
+
 	ret = knot_changeset_add_new_rr(changeset, rrset_copy,
 	                                    KNOT_CHANGESET_ADD);
 	if (ret != KNOT_EOK) {
@@ -190,21 +190,21 @@ static int knot_zone_diff_changeset_remove_rrset(knot_changeset_t *changeset,
 		dbg_zonediff("zone_diff: remove_rrset: NULL parameters.\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	if (rrset == NULL) {
 		return KNOT_EOK;
 	}
-	
+
 	if (knot_rrset_rdata_rr_count(rrset) == 0) {
 		/* RDATA are the same, however*/
 		dbg_zonediff_detail("zone_diff: Nothing to remove.\n");
 		return KNOT_EOK;
 	}
-	
+
 	dbg_zonediff_detail("zone_diff: remove_rrset: Removing RRSet (%d RRs):\n",
 	              knot_rrset_rdata_rr_count(rrset));
 	knot_rrset_dump(rrset);
-	
+
 	knot_rrset_t *rrset_copy = NULL;
 	int ret = knot_rrset_deep_copy(rrset, &rrset_copy, 1);
 	if (ret != KNOT_EOK) {
@@ -213,9 +213,9 @@ static int knot_zone_diff_changeset_remove_rrset(knot_changeset_t *changeset,
 	}
 	if (rrset_copy->rrsigs != NULL) {
 		knot_rrset_deep_free(&rrset_copy->rrsigs, 1, 1);
-	}	
+	}
 	assert(knot_rrset_rrsigs(rrset_copy) == NULL);
-	
+
 	ret = knot_changeset_add_new_rr(changeset, rrset_copy,
 	                                    KNOT_CHANGESET_REMOVE);
 	if (ret != KNOT_EOK) {
@@ -236,7 +236,7 @@ static int knot_zone_diff_add_node(const knot_node_t *node,
 		dbg_zonediff("zone_diff: add_node: NULL arguments.\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	/* Add all rrsets from node. */
 	const knot_rrset_t **rrsets = knot_node_rrsets(node);
 	if (rrsets == NULL) {
@@ -255,7 +255,7 @@ static int knot_zone_diff_add_node(const knot_node_t *node,
 			free(rrsets);
 			return ret;
 		}
-		
+
 		if (knot_rrset_rrsigs(rrsets[i])) {
 			/* Add RRSIGs of the new node. */
 			ret = knot_zone_diff_changeset_add_rrset(changeset,
@@ -269,9 +269,9 @@ static int knot_zone_diff_add_node(const knot_node_t *node,
 			}
 		}
 	}
-	
+
 	free(rrsets);
-	
+
 	return KNOT_EOK;
 }
 
@@ -282,7 +282,7 @@ static int knot_zone_diff_remove_node(knot_changeset_t *changeset,
 		dbg_zonediff("zone_diff: remove_node: NULL parameters.\n");
 		return KNOT_EINVAL;
 	}
-	
+
 	dbg_zonediff("zone_diff: remove_node: Removing node:\n");
 dbg_zonediff_exec_detail(
 	knot_node_dump((knot_node_t *)node);
@@ -294,7 +294,7 @@ dbg_zonediff_exec_detail(
 		                  "Nothing to remove.\n");
 		return KNOT_EOK;
 	}
-	
+
 	dbg_zonediff_detail("zone_diff: remove_node: Will be removing %d RRSets.\n",
 	              knot_node_rrset_count(node));
 
@@ -322,7 +322,7 @@ dbg_zonediff_exec_detail(
 			}
 		}
 	}
-	
+
 	free(rrsets);
 
 	return KNOT_EOK;
@@ -337,7 +337,7 @@ static int knot_zone_diff_rdata_return_changes(const knot_rrset_t *rrset1,
 		       rrset1, rrset2);
 		return KNOT_EINVAL;
 	}
-	
+
 	/*
 	* Take one rdata from first list and search through the second list
 	* looking for an exact match. If no match occurs, it means that this
@@ -365,7 +365,7 @@ static int knot_zone_diff_rdata_return_changes(const knot_rrset_t *rrset1,
 	const rdata_descriptor_t *desc =
 		get_rdata_descriptor(knot_rrset_type(rrset1));
 	assert(desc);
-	
+
 	for (uint16_t i = 0; i < knot_rrset_rdata_rr_count(rrset1); ++i) {
 		size_t rr_pos = 0;
 		int ret = knot_rrset_find_rr_pos(rrset2, rrset1, i, &rr_pos);
@@ -378,7 +378,7 @@ static int knot_zone_diff_rdata_return_changes(const knot_rrset_t *rrset1,
 			/* We'll copy index 'i' into 'changes' RRSet. */
 			ret = knot_rrset_add_rr_from_rrset(*changes, rrset1, i);
 			if (ret != KNOT_EOK) {
-				dbg_zonediff("zone_diff: diff_rdata: Could not" 
+				dbg_zonediff("zone_diff: diff_rdata: Could not"
 				             " add RR to RRSet (%s).\n",
 				             knot_strerror(ret));
 				knot_rrset_free(changes);
@@ -436,15 +436,15 @@ static int knot_zone_diff_rdata(const knot_rrset_t *rrset1,
 		dbg_zonediff("zone_diff: diff_rdata: These are not the diffs you "
 		       "are looking for.\n");
 	}
-	
+
 	dbg_zonediff_detail("zone_diff: diff_rdata: To remove:\n");
 	knot_rrset_dump(to_remove);
-	
+
 	/*
 	 * to_remove RRSet might be empty, meaning that
 	 * there are no differences in RDATA, but TTLs can differ.
 	 */
-	if (rrset1 && rrset2 && 
+	if (rrset1 && rrset2 &&
 	    (knot_rrset_ttl(rrset1) != knot_rrset_ttl(rrset2)) &&
 	    knot_rrset_rdata_rr_count(to_remove) == 0) {
 		dbg_zonediff_detail("zone_diff: diff_rdata: Remove RR: Old TTL=%"PRIu32", New=%"PRIu32"\n",
@@ -463,7 +463,7 @@ static int knot_zone_diff_rdata(const knot_rrset_t *rrset1,
 			return ret;
 		}
 	}
-	
+
 	int ret = knot_zone_diff_changeset_remove_rrset(changeset,
 	                                            to_remove);
 	if (ret != KNOT_EOK) {
@@ -472,7 +472,7 @@ static int knot_zone_diff_rdata(const knot_rrset_t *rrset1,
 		             "Error: %s.\n", knot_strerror(ret));
 		return ret;
 	}
-	
+
 	/* Copy was made in add_rrset function, we can free now. */
 	knot_rrset_deep_free(&to_remove, 1, 1);
 
@@ -500,10 +500,10 @@ static int knot_zone_diff_rdata(const knot_rrset_t *rrset1,
 		dbg_zonediff("zone_diff: diff_rdata: These are not the diffs you "
 		       "are looking for.\n");
 	}
-	
+
 	dbg_zonediff_detail("zone_diff: diff_rdata: To add:\n");
 	knot_rrset_dump(to_add);
-	
+
 	/*
 	 * to_remove RRSet might be empty, meaning that
 	 * there are no differences in RDATA, but TTLs can differ.
@@ -534,13 +534,13 @@ static int knot_zone_diff_rdata(const knot_rrset_t *rrset1,
 	if (ret != KNOT_EOK) {
 		knot_rrset_deep_free(&to_add, 1, 1);
 		dbg_zonediff("zone_diff: diff_rdata: Could not remove RRs. "
-		             "Error: %s.\n", knot_strerror(ret));	
+		             "Error: %s.\n", knot_strerror(ret));
 		return ret;
 	}
-	
+
 	/* Copy was made in add_rrset function, we can free now. */
 	knot_rrset_deep_free(&to_add, 1, 1);
-	
+
 	return KNOT_EOK;
 }
 
@@ -582,7 +582,7 @@ static int knot_zone_diff_rrsets(const knot_rrset_t *rrset1,
 	assert(knot_dname_compare(knot_rrset_owner(rrset1),
 	                          knot_rrset_owner(rrset2)) == 0);
 	assert(knot_rrset_type(rrset1) == knot_rrset_type(rrset2));
-	
+
 	int ret = knot_zone_diff_rdata(knot_rrset_rrsigs(rrset1),
 	                               knot_rrset_rrsigs(rrset2), changeset);
 	if (ret != KNOT_EOK) {
@@ -652,7 +652,7 @@ static void knot_zone_diff_node(knot_node_t *node, void *data)
 		param->ret = KNOT_EOK;
 		return;
 	}
-	
+
 	assert(node_in_second_tree != node);
 
 	dbg_zonediff_detail("zone_diff: diff_node: Node %s is present in "
@@ -662,7 +662,7 @@ static void knot_zone_diff_node(knot_node_t *node, void *data)
 	if (rrsets == NULL) {
 		dbg_zonediff("zone_diff: Node in first tree has no RRSets.\n");
 		/*
-		 * If there are no RRs in the first tree, all of the RRs 
+		 * If there are no RRs in the first tree, all of the RRs
 		 * in the second tree will have to be inserted to ADD section.
 		 */
 		int ret = knot_zone_diff_add_node(node_in_second_tree,
@@ -680,12 +680,12 @@ static void knot_zone_diff_node(knot_node_t *node, void *data)
 		/* Search for the RRSet in the node from the second tree. */
 		const knot_rrset_t *rrset = rrsets[i];
 		assert(rrset);
-		
+
 		/* SOAs are handled explicitly. */
 		if (knot_rrset_type(rrset) == KNOT_RRTYPE_SOA) {
 			continue;
 		}
-		
+
 		const knot_rrset_t *rrset_from_second_node =
 			knot_node_rrset(node_in_second_tree,
 			                knot_rrset_type(rrset));
@@ -705,7 +705,7 @@ static void knot_zone_diff_node(knot_node_t *node, void *data)
 				free(rrsets);
 				return;
 			}
-			
+
 			/* Remove RRSet's RRSIGs as well. */
 			if (knot_rrset_rrsigs(rrset)) {
 				ret = knot_zone_diff_changeset_remove_rrset(
@@ -734,7 +734,7 @@ static void knot_zone_diff_node(knot_node_t *node, void *data)
 				free(rrsets);
 				return;
 			}
-			
+
 //			dbg_zonediff_verb("zone_diff: diff_node: Changes in "
 //			            "RRSIGs.\n");
 //			/*! \todo There is ad-hoc solution in the function, maybe handle here. */
@@ -749,15 +749,15 @@ static void knot_zone_diff_node(knot_node_t *node, void *data)
 //			}
 		}
 	}
-	
+
 	free(rrsets);
-	
+
 	/*! \todo move to one function with the code above. */
 	rrsets = knot_node_rrsets(node_in_second_tree);
 	if (rrsets == NULL) {
 		dbg_zonediff("zone_diff: Node in second tree has no RRSets.\n");
 		/*
-		 * This can happen when node in second 
+		 * This can happen when node in second
 		 * tree is empty non-terminal and as such has no RRs.
 		 * Whole node from the first tree has to be removed.
 		 */
@@ -778,12 +778,12 @@ static void knot_zone_diff_node(knot_node_t *node, void *data)
 		/* Search for the RRSet in the node from the second tree. */
 		const knot_rrset_t *rrset = rrsets[i];
 		assert(rrset);
-		
+
 		/* SOAs are handled explicitly. */
 		if (knot_rrset_type(rrset) == KNOT_RRTYPE_SOA) {
 			continue;
 		}
-		
+
 		const knot_rrset_t *rrset_from_first_node =
 			knot_node_rrset(node,
 			                knot_rrset_type(rrset));
@@ -812,7 +812,7 @@ static void knot_zone_diff_node(knot_node_t *node, void *data)
 			            "Failed to add RRSIGs.\n");
 			    param->ret = ret;
 					free(rrsets);
-				return;	
+				return;
 			 }
 			}
 		} else {
@@ -820,7 +820,7 @@ static void knot_zone_diff_node(knot_node_t *node, void *data)
 			;
 		}
 	}
-	
+
 	free(rrsets);
 
 	assert(param->ret == KNOT_EOK);
@@ -848,7 +848,7 @@ static void knot_zone_diff_add_new_nodes(knot_node_t *node, void *data)
 		                    knot_strerror(param->ret));
 		return;
 	}
-	
+
 	/*
 	* If a node is not present in the second zone, it is a new node
 	* and has to be added to changeset. Differencies on the RRSet level are
@@ -856,14 +856,14 @@ static void knot_zone_diff_add_new_nodes(knot_node_t *node, void *data)
 	*/
 	const knot_zone_contents_t *other_zone = param->contents;
 	assert(other_zone);
-	
+
 	const knot_dname_t *node_owner = knot_node_owner(node);
 	/*
 	 * Node should definitely have an owner, otherwise it would not be in
 	 * the tree.
 	 */
 	assert(node_owner);
-	
+
 	knot_node_t *new_node = NULL;
 	if (!param->nsec3) {
 		new_node = knot_zone_contents_get_node(other_zone, node_owner);
@@ -871,7 +871,7 @@ static void knot_zone_diff_add_new_nodes(knot_node_t *node, void *data)
 		new_node = knot_zone_contents_get_nsec3_node(other_zone,
 		                                             node_owner);
 	}
-	
+
 	if (!new_node) {
 		assert(node);
 		int ret = knot_zone_diff_add_node(node, param->changeset);
@@ -882,7 +882,7 @@ static void knot_zone_diff_add_new_nodes(knot_node_t *node, void *data)
 			             knot_strerror(ret));
 		}
 	}
-	
+
 	assert(param->ret == KNOT_EOK);
 }
 
@@ -910,9 +910,9 @@ int knot_zone_contents_diff(const knot_zone_contents_t *zone1,
 		             knot_strerror(ret));
 		return ret;
 	}
-	
+
 	dbg_zonediff("zone_diff: SOAs loaded.\n");
-	
+
 	/* Traverse one tree, compare every node, each RRSet with its rdata. */
 	struct zone_diff_param param;
 	param.contents = zone2;
@@ -988,7 +988,7 @@ static void knot_zone_diff_dump_changeset(knot_changeset_t *ch)
 	dbg_zonediff_detail("\n");
 	dbg_zonediff_detail("Adding %zu RRs.\n", ch->add_count);
 	dbg_zonediff_detail("Removing %zu RRs.\n", ch->remove_count);
-	
+
 	dbg_zonediff_detail("ADD section:\n");
 	dbg_zonediff_detail("**********************************************\n");
 	for (int i = 0; i < ch->add_count; i++) {
@@ -1024,9 +1024,9 @@ int knot_zone_diff_create_changesets(const knot_zone_contents_t *z1,
 		             "Reason: %s.\n", knot_strerror(ret));
 		return ret;
 	}
-	
+
 	memset((*changesets)->sets, 0, sizeof(knot_changeset_t));
-	
+
 	ret = knot_zone_contents_diff(z1, z2, (*changesets)->sets);
 	if (ret != KNOT_EOK) {
 		dbg_zonediff("zone_diff: create_changesets: "
@@ -1034,15 +1034,14 @@ int knot_zone_diff_create_changesets(const knot_zone_contents_t *z1,
 		             "Reason: %s.\n", knot_strerror(ret));
 		return ret;
 	}
-	
+
 	(*changesets)->count = 1;
-	
+
 	dbg_zonediff("Changesets created successfully!\n");
 	dbg_zonediff_detail("Changeset dump:\n");
 dbg_zonediff_exec_detail(
 	knot_zone_diff_dump_changeset((*changesets)->sets);
 );
-	
+
 	return KNOT_EOK;
 }
-
diff --git a/src/libknot/zone/zone-tree.c b/src/libknot/zone/zone-tree.c
index 3f6c18281a064b4ff7fbbfd0421e4ac71ed7c93e..5d40449591af78ba73bc87b51287bd01e20e9da0 100644
--- a/src/libknot/zone/zone-tree.c
+++ b/src/libknot/zone/zone-tree.c
@@ -120,7 +120,7 @@ int knot_zone_tree_find(knot_zone_tree_t *tree, const knot_dname_t *owner,
 	if (tree == NULL || owner == NULL || found == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	return knot_zone_tree_get(tree, owner, (knot_node_t **)found);
 }
 
@@ -132,7 +132,7 @@ int knot_zone_tree_get(knot_zone_tree_t *tree, const knot_dname_t *owner,
 	if (tree == NULL || owner == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	char lf[DNAME_LFT_MAXLEN];
 	dname_lf(lf, owner, sizeof(lf));
 
@@ -156,7 +156,7 @@ int knot_zone_tree_find_less_or_equal(knot_zone_tree_t *tree,
 	if (tree == NULL || owner == NULL || found == NULL || previous == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	knot_node_t *f = NULL, *p = NULL;
 	int ret = knot_zone_tree_get_less_or_equal(tree, owner, &f, &p);
 
@@ -177,7 +177,7 @@ int knot_zone_tree_get_less_or_equal(knot_zone_tree_t *tree,
 	    || previous == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	char lf[DNAME_LFT_MAXLEN];
 	dname_lf(lf, owner, sizeof(lf));
 
@@ -195,7 +195,7 @@ int knot_zone_tree_get_less_or_equal(knot_zone_tree_t *tree,
 		/* node is before first node in the trie */
 		assert(0);
 	}
-	
+
 	/* Check if previous node is not an empty non-terminal. */
 	if (knot_node_rrset_count(*previous) == 0) {
 		*previous = knot_node_get_previous(*previous);
@@ -231,7 +231,7 @@ int knot_zone_tree_remove(knot_zone_tree_t *tree,
 	if (tree == NULL || owner == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	char lf[DNAME_LFT_MAXLEN];
 	dname_lf(lf, owner, sizeof(lf));
 
@@ -241,8 +241,8 @@ int knot_zone_tree_remove(knot_zone_tree_t *tree,
 	} else {
 		*removed = (knot_node_t *)(*rval);
 	}
-	
-	
+
+
 	hattrie_del(tree, lf+1, *lf);
 	return KNOT_EOK;
 }
@@ -279,7 +279,7 @@ int knot_zone_tree_apply_recursive(knot_zone_tree_t *tree,
 	if (tree == NULL || function == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	hattrie_apply_rev(tree, (void (*)(value_t*,void*))function, data);
 
 	return KNOT_EOK;
@@ -309,7 +309,7 @@ int knot_zone_tree_shallow_copy(knot_zone_tree_t *from,
 	if (to == NULL || from == NULL) {
 		return KNOT_EINVAL;
 	}
-	
+
 	*to = hattrie_dup(from, knot_zone_node_copy);
 
 	return KNOT_EOK;
@@ -355,7 +355,7 @@ void knot_zone_tree_deep_free(knot_zone_tree_t **tree)
 	if (tree == NULL || *tree == NULL) {
 		return;
 	}
-	
+
 	knot_zone_tree_apply_recursive(*tree, knot_zone_tree_free_node, NULL);
 	knot_zone_tree_free(tree);
 }
@@ -374,7 +374,7 @@ knot_dname_t *hattrie_get_dname(hattrie_t *tr, knot_dname_t *dname)
 	if (tr == NULL || dname == NULL) {
 		return NULL;
 	}
-	
+
 	value_t *val = hattrie_tryget(tr, (char *)dname->name, dname->size);
 	if (val == NULL) {
 		return NULL;
diff --git a/src/libknot/zone/zone-tree.h b/src/libknot/zone/zone-tree.h
index f7e6a0d93272ecb7c25216f3d77de38a034c3a81..d9172ce4c6e9c4c8aae705294300daad0eeae4c0 100644
--- a/src/libknot/zone/zone-tree.h
+++ b/src/libknot/zone/zone-tree.h
@@ -256,4 +256,3 @@ knot_dname_t *hattrie_get_dname(hattrie_t *tr, knot_dname_t *dname);
 #endif // _KNOT_ZONE_TREE_H_
 
 /*! @} */
-
diff --git a/src/libknot/zone/zone.c b/src/libknot/zone/zone.c
index 160efff6bbe32d51921e3931c935e818c4b691fa..fe597779ddfd50aae96127d0e79d626b0c37a0d5 100644
--- a/src/libknot/zone/zone.c
+++ b/src/libknot/zone/zone.c
@@ -57,13 +57,13 @@ knot_zone_t *knot_zone_new_empty(knot_dname_t *name)
 	// save the zone name
 	dbg_zone("Setting zone name.\n");
 	zone->name = name;
-	
+
 	/* Initialize reference counting. */
 	ref_init(&zone->ref, knot_zone_dtor);
-	
+
 	/* Set reference counter to 1, caller should release it after use. */
 	knot_zone_retain(zone);
-	
+
 	return zone;
 }
 
@@ -200,7 +200,7 @@ void knot_zone_free(knot_zone_t **zone)
 
 	dbg_zone("zone_free().\n");
 
-	if ((*zone)->contents 
+	if ((*zone)->contents
 	    && !knot_zone_contents_gen_is_old((*zone)->contents)) {
 		// zone is in the middle of an update, report
 		dbg_zone("Destroying zone that is in the middle of an "
@@ -228,7 +228,7 @@ void knot_zone_deep_free(knot_zone_t **zone)
 	if (zone == NULL || *zone == NULL) {
 		return;
 	}
-	
+
 	if ((*zone)->contents
 	    && !knot_zone_contents_gen_is_old((*zone)->contents)) {
 		// zone is in the middle of an update, report
@@ -271,4 +271,3 @@ void knot_zone_set_flag(knot_zone_t *zone, knot_zone_flag_t flag, unsigned on)
 		}
 	}
 }
-
diff --git a/src/libknot/zone/zonedb.c b/src/libknot/zone/zonedb.c
index 9ab9c85427a07b338f3ee129ed245f5ca580dcb1..447e6c9eb9414c7090bce911d87495a4232aab99 100644
--- a/src/libknot/zone/zonedb.c
+++ b/src/libknot/zone/zonedb.c
@@ -46,7 +46,7 @@ knot_zonedb_t *knot_zonedb_new()
 		free(db);
 		return NULL;
 	}
-	
+
 	db->zone_count = 0;
 
 	return db;
@@ -91,7 +91,7 @@ knot_zone_t *knot_zonedb_remove_zone(knot_zonedb_t *db,
 	/* Fetch if exists. */
 	knot_zone_t *oldzone = knot_zonedb_find_zone(db, zone_name);
 	if (oldzone == NULL) return NULL;
-	
+
 	/* Remove from db. */
 	const char *key = (const char*)knot_dname_name(zone_name);
 	size_t klen = knot_dname_size(zone_name);
@@ -99,7 +99,7 @@ knot_zone_t *knot_zonedb_remove_zone(knot_zonedb_t *db,
 	if (ret < 0) {
 		return NULL;
 	}
-	
+
 	--db->zone_count;
 	return oldzone;
 }
@@ -135,7 +135,7 @@ const knot_zone_t *knot_zonedb_find_zone_for_name(knot_zonedb_t *db,
 	}
 
 	knot_zone_t *zone = (found) ? (knot_zone_t *)*found : NULL;
-	
+
 dbg_zonedb_exec(
 	char *name = knot_dname_to_str(dname);
 	dbg_zonedb("Found zone for name %s: %p\n", name, zone);
@@ -228,7 +228,7 @@ const knot_zone_t **knot_zonedb_zones(const knot_zonedb_t *db)
 		hattrie_iter_next(i);
 	}
 	hattrie_iter_free(i);
-	
+
 	assert(db->zone_count == args.count);
 
 	return args.zones;
@@ -250,7 +250,7 @@ static void delete_zone_from_db(value_t *node, void *data)
 	UNUSED(data);
 	assert(node);
 	if (*node == NULL) return;
-	
+
 	knot_zone_t *zone = (knot_zone_t *)(*node);
 	synchronize_rcu();
 	knot_zone_set_flag(zone, KNOT_ZONE_DISCARDED, 1);
diff --git a/src/libknot/zone/zonedb.h b/src/libknot/zone/zonedb.h
index eb83f8bd7645fefb236bcd91d1927ae623c876da..186c7185597feea8cc819765f7aa5d299c5e72ae 100644
--- a/src/libknot/zone/zonedb.h
+++ b/src/libknot/zone/zonedb.h
@@ -82,7 +82,7 @@ int knot_zonedb_add_zone(knot_zonedb_t *db, knot_zone_t *zone);
  * \retval KNOT_EOK
  * \retval KNOT_ENOZONE
  */
-knot_zone_t * knot_zonedb_remove_zone(knot_zonedb_t *db, 
+knot_zone_t * knot_zonedb_remove_zone(knot_zonedb_t *db,
                                       const knot_dname_t *zone_name);
 
 /*!
diff --git a/src/tests/README b/src/tests/README
index ff56ed062f87b6ff40ebd0ec1f0fdbd12c5652d5..1d9748b1542b4f701680cb261c11fe4e0f651eae 100644
--- a/src/tests/README
+++ b/src/tests/README
@@ -2,4 +2,3 @@ Unit testing
 ------------
 
 Make assembles "unittest" binary with all of the planned tests included.
-
diff --git a/src/tests/common/acl_tests.c b/src/tests/common/acl_tests.c
index c1884cd65211949af5519a9da7d6d72ba0aa4bc5..dc490fc80a2de10d064835ab1ff46ad0a013b4d0 100644
--- a/src/tests/common/acl_tests.c
+++ b/src/tests/common/acl_tests.c
@@ -117,12 +117,12 @@ static int acl_tests_run(int argc, char *argv[])
 	sockaddr_set(&test_pf4, AF_INET, "192.168.1.20", 0);
 	ret = acl_match(acl, &test_pf4, 0);
 	ok(ret == ACL_ACCEPT, "acl: searching address in matching prefix /24");
-	
+
 	// 15. Attempt to search non-matching subnet
 	sockaddr_set(&test_pf4, AF_INET, "192.168.2.20", 0);
 	ret = acl_match(acl, &test_pf4, 0);
 	ok(ret == ACL_DENY, "acl: searching address in non-matching prefix /24");
-	
+
 	// 16. Attempt to match v6 subnet
 	sockaddr_t match_pf6, test_pf6;
 	sockaddr_set(&match_pf6, AF_INET6, "2001:0DB8:0400:000e:0:0:0:AB00", 0);
@@ -131,12 +131,12 @@ static int acl_tests_run(int argc, char *argv[])
 	sockaddr_set(&test_pf6, AF_INET6, "2001:0DB8:0400:000e:0:0:0:AB03", 0);
 	ret = acl_match(acl, &test_pf6, 0);
 	ok(ret == ACL_ACCEPT, "acl: searching v6 address in matching prefix /120");
-	
+
 	// 17. Attempt to search non-matching subnet
 	sockaddr_set(&test_pf6, AF_INET6, "2001:0DB8:0400:000e:0:0:0:CCCC", 0);
 	ret = acl_match(acl, &test_pf6, 0);
 	ok(ret == ACL_DENY, "acl: searching v6 address in non-matching prefix /120");
-	
+
 	// 18. Add preferred node
 	sockaddr_set(&test_pf4, AF_INET, "192.168.1.20", 0);
 	void *sval = (void*)0x1234;
@@ -158,7 +158,7 @@ static int acl_tests_run(int argc, char *argv[])
 	ret = acl_match(acl, &match_pf4, 0);
 	ok(ret == ACL_ACCEPT, "acl: scenario after truncating");
 	acl_delete(&acl);
-	
+
 	// Return
 	return 0;
 }
diff --git a/src/tests/common/descriptor_tests.c b/src/tests/common/descriptor_tests.c
index 8a2cb36f891f5adf08b5340523b5c5261e311f0d..f294d7a46a8563d1a35a9115eef996f658bb2e67 100644
--- a/src/tests/common/descriptor_tests.c
+++ b/src/tests/common/descriptor_tests.c
@@ -231,4 +231,3 @@ static int descriptor_tests_run(int argc, char *argv[])
 
 	return 0;
 }
-
diff --git a/src/tests/knot/conf_tests.c b/src/tests/knot/conf_tests.c
index 022e40631b9afc58a5b3bdfe876311e126b1fdbb..67d390dbb9c818b7a9de819e5afb91f801ea4912 100644
--- a/src/tests/knot/conf_tests.c
+++ b/src/tests/knot/conf_tests.c
@@ -123,7 +123,7 @@ static int conf_tests_run(int argc, char *argv[])
 	{
 	  is(log->file, "/var/log/knot/server.err", "log file matches");
 	} endskip;
-	
+
 	// Test 21: Load key dname
 	const char *sample_str = "key0.example.net";
 	knot_dname_t *sample = knot_dname_new_from_str(sample_str,
@@ -136,7 +136,7 @@ static int conf_tests_run(int argc, char *argv[])
 		ok(0, "TSIG key dname check - NO KEY FOUND");
 	}
 	knot_dname_free(&sample);
-	
+
 	} endskip;
 
 	// Deallocating config
diff --git a/src/tests/knot/journal_tests.c b/src/tests/knot/journal_tests.c
index 73dd64ed5976fdc5992e7a9c6b1b28cdf06a79a8..658b4a14d1f2f03ec40300e6b7a6625630b498b7 100644
--- a/src/tests/knot/journal_tests.c
+++ b/src/tests/knot/journal_tests.c
@@ -58,7 +58,7 @@ static int walkchars(journal_t *j, journal_node_t *n) {
 	journal_read(j, n->id, walkchars_cmp, _walkbuf + _wbi);
 	++_wbi;
 	return 0;
-} 
+}
 
 /*! API: return number of tests. */
 static int journal_tests_count(int argc, char *argv[])
@@ -86,7 +86,7 @@ static int journal_tests_run(int argc, char *argv[])
 	/* Test 3: Open journal. */
 	journal_t *journal = journal_open(jfilename, fsize, JOURNAL_LAZY, 0);
 	ok(journal != 0, "journal: open");
-	
+
 	/* Retain journal. */
 	journal_t *j = journal_retain(journal);
 
@@ -103,7 +103,7 @@ static int journal_tests_run(int argc, char *argv[])
 	/* Test 6: Compare read data. */
 	ret = strncmp(sample, tmpbuf, strlen(sample));
 	ok(ret == 0, "journal: read data integrity check");
-	
+
 	/* Append several characters. */
 	journal_write(j, 0, "X", 1); /* Dummy */
 	char word[7] =  { 'w', 'o', 'r', 'd', '0', '\0', '\0' };
@@ -118,7 +118,7 @@ static int journal_tests_run(int argc, char *argv[])
 	ret = strcmp(word, _walkbuf);
 	ok(ret == 0, "journal: read data integrity check 2 '%s'", _walkbuf);
 	_wbi = 0;
-	
+
 	/* Test 8: Change single letter and compare. */
 	word[5] = 'X';
 	journal_write(j, 5, word+5, 1); /* append 'X', shifts out 'w' */
@@ -127,18 +127,18 @@ static int journal_tests_run(int argc, char *argv[])
 	ret = strcmp(word + 1, _walkbuf);
 	ok(ret == 0, "journal: read data integrity check 3 '%s'", _walkbuf);
 	_wbi = 0;
-	
+
 	/* Test 9: Attempt to retain and release. */
 	journal_t *tmp = journal_retain(j);
 	ok(tmp == j, "journal: tested journal retaining");
 	journal_release(tmp);
-	
+
 	/* Release journal. */
 	journal_release(j);
-	
+
 	/* Close journal. */
 	journal_close(journal);
-	
+
 	/* Recreate journal = NORMAL mode. */
 	if (remove(jfilename) < 0) {
 		diag("journal: couldn't remove filename");
@@ -147,7 +147,7 @@ static int journal_tests_run(int argc, char *argv[])
 	jsize = 512;
 	ret = journal_create(jfilename, jsize);
 	j = journal_open(jfilename, fsize, 0, 0);
-	
+
 	/* Test 10: Write random data. */
 	int chk_key = 0;
 	char chk_buf[64] = {'\0'};
@@ -182,26 +182,26 @@ static int journal_tests_run(int argc, char *argv[])
 	journal_read(j, chk_key, 0, tmpbuf);
 	ret = strncmp(chk_buf, tmpbuf, sizeof(chk_buf));
 	ok(j && ret == 0, "journal: read data integrity check after close/open");
-	
+
 	/* Test 13: Map journal entry. */
 	char *mptr = NULL;
 	memset(chk_buf, 0xde, sizeof(chk_buf));
 	ret = journal_map(j, 0x12345, &mptr, sizeof(chk_buf));
 	ok(j && mptr && ret == 0, "journal: mapped journal entry");
 	skip(ret != 0, 2);
-	
+
 	/* Test 14: Write to mmaped entry and unmap. */
 	memcpy(mptr, chk_buf, sizeof(chk_buf));
 	ret = journal_unmap(j, 0x12345, mptr, 1);
 	ok(j && mptr && ret == 0, "journal: written to mapped entry and finished");
-	
+
 	/* Test 15: Compare mmaped entry. */
 	memset(tmpbuf, 0, sizeof(tmpbuf));
 	journal_read(j, 0x12345, NULL, tmpbuf);
 	ret = strncmp(chk_buf, tmpbuf, sizeof(chk_buf));
 	ok(j && ret == 0, "journal: mapped entry data integrity check");
 	endskip;
-	
+
 	/* Test 16: Make a transaction. */
 	uint64_t tskey = 0x75750000;
 	ret = journal_trans_begin(j);
@@ -210,16 +210,16 @@ static int journal_tests_run(int argc, char *argv[])
 		memset(tmpbuf, i, sizeof(tmpbuf));
 		journal_write(j, tskey + i, tmpbuf, sizeof(tmpbuf));
 	}
-	
+
 	/* Test 17: Check if uncommited node exists. */
 	ret = journal_read(j, tskey + rand() % 16, NULL, chk_buf);
 	ok(j && ret != 0, "journal: check for uncommited node");
-	
+
 	/* Test 18: Commit transaction. */
 	ret = journal_trans_commit(j);
 	int read_ret = journal_read(j, tskey + rand() % 16, NULL, chk_buf);
 	ok(j && ret == 0 && read_ret == 0, "journal: transaction commit");
-	
+
 	/* Test 19: Rollback transaction. */
 	tskey = 0x6B6B0000;
 	journal_trans_begin(j);
@@ -268,7 +268,7 @@ static int journal_tests_run(int argc, char *argv[])
 	remove(jfilename);
 	j = journal_open(jfilename, fsize, 0, 0);
 	ok(j != NULL, "journal: open+create from scratch");
-	
+
 	/* Close journal. */
 	journal_close(j);
 
diff --git a/src/tests/knot/rrl_tests.c b/src/tests/knot/rrl_tests.c
index 2295189adb7e2469020709b39d9dcac3cd3bb04a..9cb46f88d5f7d8fa7d2c591e076d5eacaf16356f 100644
--- a/src/tests/knot/rrl_tests.c
+++ b/src/tests/knot/rrl_tests.c
@@ -29,7 +29,7 @@
 /* Enable time-dependent tests. */
 //#define ENABLE_TIMED_TESTS
 #define RRL_SIZE 196613
-#define RRL_THREADS 8 
+#define RRL_THREADS 8
 #define RRL_INSERTS (RRL_SIZE/(5*RRL_THREADS)) /* lf = 1/5 */
 #define RRL_LOCKS 64
 
@@ -136,29 +136,29 @@ static int rrl_tests_run(int argc, char *argv[])
 		knot_packet_free(&query);
 		return KNOT_ERROR; /* Fatal */
 	}
-	
+
 	/* Prepare response */
 	knot_nameserver_t *ns = knot_ns_create();
 	uint8_t rbuf[65535];
 	size_t rlen = sizeof(rbuf);
 	memset(rbuf, 0, sizeof(rbuf));
 	knot_ns_error_response_from_query(ns, query, KNOT_RCODE_NOERROR, rbuf, &rlen);
-	
+
 	rrl_req_t rq;
 	rq.w = rbuf;
 	rq.len = rlen;
 	rq.qst = &qst;
 	rq.flags = 0;
-	
+
 	/* 1. create rrl table */
 	rrl_table_t *rrl = rrl_create(RRL_SIZE);
 	ok(rrl != NULL, "rrl: create");
-	
+
 	/* 2. set rate limit */
 	uint32_t rate = 10;
 	rrl_setrate(rrl, rate);
 	ok(rate == rrl_rate(rrl), "rrl: setrate");
-	
+
 	/* 3. setlocks */
 	ret = rrl_setlocks(rrl, RRL_LOCKS);
 	ok(ret == KNOT_EOK, "rrl: setlocks");
@@ -189,7 +189,7 @@ static int rrl_tests_run(int argc, char *argv[])
 	ret = rrl_query(rrl, &addr6, &rq, zone);
 	ok(ret != 0, "rrl: throttled IPv6 request");
 #endif
-	
+
 	/* 7. invalid values. */
 	ret = 0;
 	lives_ok( {
@@ -202,7 +202,7 @@ static int rrl_tests_run(int argc, char *argv[])
 	                  ret += rrl_query(rrl, (void*)0x1, 0, 0); // -1
 	                  ret += rrl_destroy(0); // -1
 	}, "rrl: not crashed while executing functions on NULL context");
-	
+
 #ifdef ENABLE_TIMED_TESTS
 	/* 8. hopscotch test */
 	struct runnable_data rd = {
@@ -210,15 +210,15 @@ static int rrl_tests_run(int argc, char *argv[])
 	};
 	rrl_hopscotch(&rd);
 	ok(rd.passed, "rrl: hashtable is ~ consistent");
-	
+
 	/* 9. reseed */
 	ok(rrl_reseed(rrl) == 0, "rrl: reseed");
-	
+
 	/* 10. hopscotch after reseed. */
 	rrl_hopscotch(&rd);
 	ok(rd.passed, "rrl: hashtable is ~ consistent");
 #endif
-	
+
 	knot_dname_release(qst.qname);
 	knot_dname_release(apex);
 	knot_zone_deep_free(&zone);
diff --git a/src/tests/libknot/dname_tests.c b/src/tests/libknot/dname_tests.c
index 5f669d79098edeb701c43103f98ba2869164b18f..64fd836341a699de32ae07ebcdb86f9e524d254f 100644
--- a/src/tests/libknot/dname_tests.c
+++ b/src/tests/libknot/dname_tests.c
@@ -50,31 +50,31 @@ static int dname_tests_count(int argc, char *argv[])
 static int dname_tests_run(int argc, char *argv[])
 {
 	const char *w = NULL;
-	
+
 	/* 1. NULL wire */
 	ok(!test_fw(0, NULL), "parsing NULL dname");
-	
+
 	/* 2. empty label */
 	ok(test_fw(1, ""), "parsing empty dname");
-	
+
 	/* 3. incomplete dname */
 	ok(!test_fw(5, "\x08""dddd"), "parsing incomplete wire");
 
 	/* 4. non-fqdn */
 	ok(!test_fw(3, "\x02""ab"), "parsing non-fqdn name");
-	
+
 	/* 5. label > 63b */
 	w = "\x40""dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd";
 	ok(!test_fw(65, w), "parsing label > 63b");
-	
+
 	/* 6. label count > 127 */
 	w = "\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64\x01\x64";
 	ok(!test_fw(257, w), "parsing label count > 127");
-	
+
 	/* 7. dname length > 255 */
 	w = "\xff""ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd";
 	ok(!test_fw(257, w), "parsing dname len > 255");
-	
+
 	/* 8. special case - invalid label */
 	w = "\x20\x68\x6d\x6e\x63\x62\x67\x61\x61\x61\x61\x65\x72\x6b\x30\x30\x30\x30\x64\x6c\x61\x61\x61\x61\x61\x61\x61\x61\x62\x65\x6a\x61\x6d\x20\x67\x6e\x69\x64\x68\x62\x61\x61\x61\x61\x65\x6c\x64\x30\x30\x30\x30\x64\x6c\x61\x61\x61\x61\x61\x61\x61\x61\x62\x65\x6a\x61\x6d\x20\x61\x63\x6f\x63\x64\x62\x61\x61\x61\x61\x65\x6b\x72\x30\x30\x30\x30\x64\x6c\x61\x61\x61\x61\x61\x61\x61\x61\x62\x65\x6a\x61\x6d\x20\x69\x62\x63\x6d\x6a\x6f\x61\x61\x61\x61\x65\x72\x6a\x30\x30\x30\x30\x64\x6c\x61\x61\x61\x61\x61\x61\x61\x61\x62\x65\x6a\x61\x6d\x20\x6f\x6c\x6e\x6c\x67\x68\x61\x61\x61\x61\x65\x73\x72\x30\x30\x30\x30\x64\x6c\x61\x61\x61\x61\x61\x61\x61\x61\x62\x65\x6a\x61\x6d\x20\x6a\x6b\x64\x66\x66\x67\x61\x61\x61\x61\x65\x6c\x68\x30\x30\x30\x30\x64\x6c\x61\x61\x61\x61\x61\x61\x61\x61\x62\x65\x6a\x61\x6d\x20\x67\x67\x6c\x70\x70\x61\x61\x61\x61\x61\x65\x73\x72\x30\x30\x30\x30\x64\x6c\x61\x61\x61\x61\x61\x61\x61\x61\x62\x65\x6a\x61\x6d\x20\x65\x6b\x6c\x67\x70\x66\x61\x61\x61\x61\x65\x6c\x68\x30\x30\x30\x30\x64\x6c\x61\x61\x61\x61\x61\x0\x21\x42\x63\x84\xa5\xc6\xe7\x8\xa\xd\x11\x73\x3\x6e\x69\x63\x2\x43\x5a";
 	ok(!test_fw(277, w), "parsing invalid label (spec. case 1)");
diff --git a/src/tests/libknot/rrset_tests.c b/src/tests/libknot/rrset_tests.c
index f71e6bfc480b52d0c3e191278ee2886ed204094b..6db8c1a2c4fe6951a9c3d9e93e188b09d9ca402f 100644
--- a/src/tests/libknot/rrset_tests.c
+++ b/src/tests/libknot/rrset_tests.c
@@ -45,7 +45,7 @@ enum rrset_test_const {
 	TEST_RRSET_COUNT = 14,
 	TEST_RDATA_COUNT = 10,
 	TEST_DNAME_COUNT = 11,
-	
+
 	TEST_RDATA_A_LESS = 0,
 	TEST_RDATA_A_GT = 1,
 	TEST_RDATA_NS_LESS = 2,
@@ -56,7 +56,7 @@ enum rrset_test_const {
 	TEST_RDATA_MX_BIN_GT = 7,
 	TEST_RDATA_MINFO1 = 8,
 	TEST_RDATA_MINFO2 = 9,
-	
+
 	TEST_RRSET_A_LESS = 0,
 	TEST_RRSET_A_GT = 1,
 	TEST_RRSET_MERGE_UNIQUE1 = 0,
@@ -73,7 +73,7 @@ enum rrset_test_const {
 	TEST_RRSET_MINFO_MULTIPLE2 = 13,
 	TEST_RRSET_OWNER_LESS = 11,
 	TEST_RRSET_OWNER_GT = 12,
-	
+
 	CHECK_LAST_INDEX = 0,
 	OMMIT_LAST_INDEX = 1,
 	TEST_DNAME_GENERIC = 0,
@@ -191,7 +191,7 @@ static void init_test_rdata_with_dname(uint8_t **rdata, uint16_t *rdata_size,
 	*rdata_size += sizeof(knot_dname_t *);
 	memcpy(*wire + wire_pos, dname->name, dname->size);
 	*wire_size += dname->size;
-	
+
 	knot_dname_retain(dname);
 }
 
@@ -218,7 +218,7 @@ static void init_test_rdata_with_binary(uint8_t **rdata, uint16_t *rdata_size,
 static void create_test_rdata()
 {
 	/* NS, MX and MINFO types need an init. */
-	
+
 	/* NS RDATA DNAME = a.dname.com. */
 	init_test_rdata_with_dname(&test_rdata_array[TEST_RDATA_NS_LESS].rdata,
 	                           &test_rdata_array[TEST_RDATA_NS_LESS].size,
@@ -226,7 +226,7 @@ static void create_test_rdata()
 	                           &test_rdata_array[TEST_RDATA_NS_LESS].wire_size,
 	                           0, 0, sizeof(knot_dname_t *),
 	                           test_dnames[0]->size, test_dnames[0]);
-	
+
 	/* NS RDATA DNAME = b.dname.com. */
 	init_test_rdata_with_dname(&test_rdata_array[TEST_RDATA_NS_GT].rdata,
 	                           &test_rdata_array[TEST_RDATA_NS_GT].size,
@@ -234,7 +234,7 @@ static void create_test_rdata()
 	                           &test_rdata_array[TEST_RDATA_NS_GT].wire_size,
 	                           0, 0, sizeof(knot_dname_t *),
 	                           test_dnames[1]->size, test_dnames[1]);
-	
+
 	/* MX RDATA - short = 10 DNAME = a.dname.com. */
 	uint16_t id = htobe16(10);
 	init_test_rdata_with_binary(&test_rdata_array[TEST_RDATA_MX_DNAME_LESS].rdata,
@@ -243,14 +243,14 @@ static void create_test_rdata()
 	                            &test_rdata_array[TEST_RDATA_MX_DNAME_LESS].wire_size,
 	                            0, 0, sizeof(knot_dname_t *) + 2,
 	                            test_dnames[1]->size + 2, &id, 2);
-	
+
 	init_test_rdata_with_dname(&test_rdata_array[TEST_RDATA_MX_DNAME_LESS].rdata,
 	                           &test_rdata_array[TEST_RDATA_MX_DNAME_LESS].size,
 	                           &test_rdata_array[TEST_RDATA_MX_DNAME_LESS].wire,
 	                           &test_rdata_array[TEST_RDATA_MX_DNAME_LESS].wire_size,
 	                           2, 2, sizeof(knot_dname_t *),
 	                           test_dnames[1]->size, test_dnames[0]);
-	
+
 	/* MX RDATA - short = 10 DNAME = b.dname.com. */
 	init_test_rdata_with_binary(&test_rdata_array[TEST_RDATA_MX_DNAME_GT].rdata,
 	                            &test_rdata_array[TEST_RDATA_MX_DNAME_GT].size,
@@ -258,17 +258,17 @@ static void create_test_rdata()
 	                            &test_rdata_array[TEST_RDATA_MX_DNAME_GT].wire_size,
 	                            0, 0, sizeof(knot_dname_t *) + 2,
 	                            test_dnames[1]->size + 2, &id, 2);
-	
+
 	init_test_rdata_with_dname(&test_rdata_array[TEST_RDATA_MX_DNAME_GT].rdata,
 	                           &test_rdata_array[TEST_RDATA_MX_DNAME_GT].size,
 	                           &test_rdata_array[TEST_RDATA_MX_DNAME_GT].wire,
 	                           &test_rdata_array[TEST_RDATA_MX_DNAME_GT].wire_size,
 	                           2, 2, sizeof(knot_dname_t *),
 	                           test_dnames[1]->size, test_dnames[1]);
-	
+
 	test_rdata_array[TEST_RDATA_MX_BIN_LESS] = test_rdata_array[TEST_RDATA_MX_DNAME_LESS];
 	knot_dname_retain(test_dnames[1]);
-	
+
 	/* MX RDATA - short = 20 DNAME = b.dname.com. */
 	id = htobe16(20);
 	init_test_rdata_with_binary(&test_rdata_array[TEST_RDATA_MX_BIN_GT].rdata,
@@ -277,14 +277,14 @@ static void create_test_rdata()
 	                            &test_rdata_array[TEST_RDATA_MX_BIN_GT].wire_size,
 	                            0, 0, sizeof(knot_dname_t *) + 2,
 	                            test_dnames[1]->size + 2, &id, 2);
-	
+
 	init_test_rdata_with_dname(&test_rdata_array[TEST_RDATA_MX_BIN_GT].rdata,
 	                           &test_rdata_array[TEST_RDATA_MX_BIN_GT].size,
 	                           &test_rdata_array[TEST_RDATA_MX_BIN_GT].wire,
 	                           &test_rdata_array[TEST_RDATA_MX_BIN_GT].wire_size,
 	                           2, 2, sizeof(knot_dname_t *),
 	                           test_dnames[1]->size, test_dnames[1]);
-	
+
 	/* MINFO RRs. */
 	init_test_rdata_with_dname(&test_rdata_array[TEST_RDATA_MINFO1].rdata,
 	                           &test_rdata_array[TEST_RDATA_MINFO1].size,
@@ -293,7 +293,7 @@ static void create_test_rdata()
 	                           0, 0, sizeof(knot_dname_t *) * 2,
 	                           test_dnames[0]->size + test_dnames[1]->size,
 	                           test_dnames[0]);
-	
+
 	init_test_rdata_with_dname(&test_rdata_array[TEST_RDATA_MINFO1].rdata,
 	                           &test_rdata_array[TEST_RDATA_MINFO1].size,
 	                           &test_rdata_array[TEST_RDATA_MINFO1].wire,
@@ -301,7 +301,7 @@ static void create_test_rdata()
 	                           sizeof(knot_dname_t *), test_dnames[0]->size,
 	                           sizeof(knot_dname_t *),
 	                           test_dnames[1]->size, test_dnames[1]);
-	
+
 	init_test_rdata_with_dname(&test_rdata_array[TEST_RDATA_MINFO2].rdata,
 	                           &test_rdata_array[TEST_RDATA_MINFO2].size,
 	                           &test_rdata_array[TEST_RDATA_MINFO2].wire,
@@ -309,7 +309,7 @@ static void create_test_rdata()
 	                           0, 0, sizeof(knot_dname_t *) * 2,
 	                           test_dnames[2]->size + test_dnames[3]->size,
 	                           test_dnames[2]);
-	
+
 	init_test_rdata_with_dname(&test_rdata_array[TEST_RDATA_MINFO2].rdata,
 	                           &test_rdata_array[TEST_RDATA_MINFO2].size,
 	                           &test_rdata_array[TEST_RDATA_MINFO2].wire,
@@ -326,9 +326,9 @@ static void create_test_rrsets()
 		test_rrset_t *test_rrset = &test_rrset_array[i];
 		/* Assign owner. */
 		test_rrset->rrset.owner = test_dnames[test_rrset->owner_id];
-		
+
 		/* Create wire representation. */
-		
+
 		/* Create header wire. */
 		test_rrset->header_wire_size = test_rrset->rrset.owner->size + 8;
 		test_rrset->header_wire =
@@ -348,7 +348,7 @@ static void create_test_rrsets()
 		/* Copy TTL to wire. */
 		knot_wire_write_u32(test_rrset->header_wire + offset,
 		                    test_rrset->rrset.ttl);
-		
+
 		/* Create RDATA. */
 		test_rrset->test_rdata =
 			xmalloc(sizeof(void *) * test_rrset->rr_count);
@@ -371,7 +371,7 @@ static void create_test_rrsets()
 				test_rrset->rrset.rdata_indices[j - 1] =
 					test_rrset->test_rdata[j]->size;
 			}
-			
+
 			memcpy(test_rrset->rrset.rdata + offset,
 			       test_rrset->test_rdata[j]->rdata,
 			       test_rrset->test_rdata[j]->size);
@@ -388,32 +388,32 @@ static int check_rrset_values(const knot_rrset_t *rrset,
                               uint16_t rclass, uint16_t ttl, uint16_t rr_count)
 {
 	int errors = 0;
-	
+
 	if (knot_dname_compare_non_canon(rrset->owner, dname)) {
 		diag("Wrong DNAME in the created RRSet.\n");
 		++errors;
 	}
-	
+
 	if (rrset->type != type) {
 		diag("Wrong type in the created RRSet.\n");
 		++errors;
 	}
-	
+
 	if (rrset->rclass != rclass) {
 		diag("Wrong class in the created RRSet.\n");
 		++errors;
 	}
-	
+
 	if (rrset->ttl != ttl) {
 		diag("Wrong TTL in the created RRSet.\n");
 		++errors;
 	}
-	
+
 	if (rrset->rdata_count!= rr_count) {
 		diag("Wrong RR count in the created RRSet.\n");
 		++errors;
 	}
-	
+
 	return errors;
 }
 
@@ -430,7 +430,7 @@ static int test_rrset_new()
 		diag("Failed to create new RRSet.\n");
 		return 0;
 	}
-	
+
 	int check_errors = check_rrset_values(rrset, dname, type, rclass, ttl,
 	                                      0);
 	free(rrset);
@@ -441,13 +441,13 @@ static int test_rrset_new()
 static int test_rrset_create_rdata()
 {
 	/* Two cases need to be tested - empty RRSet and non-empty RRSet. */
-	
-	
+
+
 	knot_rrset_t *rrset = knot_rrset_new(test_dnames[0], 0, 0, 0);
 	assert(rrset);
-	
+
 	/*
-	* Again, actual data are not crutial, we need to see if indices 
+	* Again, actual data are not crutial, we need to see if indices
 	* are changed accordingly and so on, but the data are not important.
 	*/
 	uint8_t *write_pointer =
@@ -459,25 +459,25 @@ static int test_rrset_create_rdata()
 		knot_rrset_deep_free(&rrset, 1, 1);
 		return 0;
 	}
-	
+
 	/* Write dummy data. */
 	memcpy(write_pointer, test_rdata_array[0].rdata,
 	       test_rdata_array[0].size);
-	
+
 	/* Check that indices are set right. */
 	if (rrset->rdata_indices[0] != test_rdata_array[0].size) {
 		diag("Wrong RDATA index after inserting RDATA to RRSet.\n");
 		knot_rrset_deep_free(&rrset, 1, 1);
 		return 0;
 	}
-	
+
 	/* Rdata count must be equal to one. */
 	if (rrset->rdata_count != 1) {
 		diag("Wrong RDATA count after inserting RDATA to RRSet.\n");
 		knot_rrset_deep_free(&rrset, 1, 1);
 		return 0;
 	}
-	
+
 	/* Make sure that the data in the RRSet are the same. */
 	int ret = memcmp(rrset->rdata, test_rdata_array[0].rdata,
 	                 test_rdata_array[0].size);
@@ -486,7 +486,7 @@ static int test_rrset_create_rdata()
 		knot_rrset_deep_free(&rrset, 1, 1);
 		return 0;
 	}
-	
+
 	/* Insert second item - all other inserts will do the same thing. */
 	write_pointer = knot_rrset_create_rdata(rrset,
 	                                        test_rdata_array[1].size);
@@ -496,11 +496,11 @@ static int test_rrset_create_rdata()
 		knot_rrset_deep_free(&rrset, 1, 1);
 		return 0;
 	}
-	
+
 	/* Write dummy data. */
 	memcpy(write_pointer, test_rdata_array[1].rdata,
 	       test_rdata_array[1].size);
-	
+
 	/* Check that indices are set right. */
 	if (rrset->rdata_indices[0] != test_rdata_array[1].size) {
 		diag("Wrong RDATA first index after "
@@ -508,7 +508,7 @@ static int test_rrset_create_rdata()
 		knot_rrset_deep_free(&rrset, 1, 1);
 		return 0;
 	}
-	
+
 	if (rrset->rdata_indices[1] !=
 	    test_rdata_array[0].size + test_rdata_array[1].size) {
 		diag("Wrong RDATA last index after "
@@ -516,7 +516,7 @@ static int test_rrset_create_rdata()
 		knot_rrset_deep_free(&rrset, 1, 1);
 		return 0;
 	}
-	
+
 	/* Rdata count must be equal to two. */
 	if (rrset->rdata_count != 2) {
 		diag("Wrong RDATA count after inserting second "
@@ -524,7 +524,7 @@ static int test_rrset_create_rdata()
 		knot_rrset_deep_free(&rrset, 1, 1);
 		return 0;
 	}
-	
+
 	/* Make sure that the data in the RRSet are the same. */
 	ret = memcmp(rrset->rdata + test_rdata_array[0].size,
 	             test_rdata_array[1].rdata, test_rdata_array[1].size);
@@ -533,7 +533,7 @@ static int test_rrset_create_rdata()
 		knot_rrset_deep_free(&rrset, 1, 1);
 		return 0;
 	}
-	
+
 	/* Test that data of length 0 are not inserted. */
 	void *ret_ptr = knot_rrset_create_rdata(rrset, 0);
 	if (ret_ptr != NULL) {
@@ -541,7 +541,7 @@ static int test_rrset_create_rdata()
 		knot_rrset_deep_free(&rrset, 1, 1);
 		return 0;
 	}
-	
+
 	knot_rrset_deep_free(&rrset, 1, 1);
 	return 1;
 }
@@ -555,56 +555,56 @@ static int test_rrset_rdata_item_size()
 		diag("Wrong item length read from RRSet (first item).\n");
 		return 0;
 	}
-	
+
 	if (rrset_rdata_item_size(rrset, 1) != sizeof(knot_dname_t *) * 2) {
 		diag("Wrong item length read from RRSet (last item).\n");
 		return 0;
 	}
-	
+
 	if (rrset_rdata_size_total(rrset) != sizeof(knot_dname_t *) * 4) {
 		diag("Wrong total size returned (MINFO RRSet)\n");
 		return 0;
 	}
-	
+
 	rrset = &test_rrset_array[TEST_RRSET_A_GT].rrset;
 	if (rrset_rdata_item_size(rrset, 0) != 4) {
 		diag("Wrong item length read from A RRSet.\n");
 		return 0;
 	}
-	
+
 	rrset = &test_rrset_array[TEST_RRSET_MX_BIN_GT].rrset;
 	if (rrset_rdata_item_size(rrset, 0) != 2 + sizeof(knot_dname_t *)) {
 		diag("Wrong item length read from A RRSet.\n");
 		return 0;
 	}
-	
+
 	knot_rrset_t *rrset1 = knot_rrset_new(rrset->owner,
 	                                      KNOT_RRTYPE_TXT, KNOT_CLASS_IN,
 	                                      3600);
-	
+
 	knot_rrset_create_rdata(rrset1, 16);
 	knot_rrset_add_rdata(rrset1,
 	                     (uint8_t *)"thesearesomedatathatdonotmatter", 25);
 	knot_rrset_create_rdata(rrset1, 38);
-	
+
 	if (rrset_rdata_item_size(rrset1, 0) != 16) {
 		diag("Wrong item lenght in read (first).\n");
 		knot_rrset_deep_free(&rrset1, 1, 1);
 		return 0;
 	}
-	
+
 	if (rrset_rdata_item_size(rrset1, 1) != 25) {
 		diag("Wrong item lenght in read (middle).\n");
 		knot_rrset_deep_free(&rrset1, 1, 1);
 		return 0;
 	}
-	
+
 	if (rrset_rdata_item_size(rrset1, 2) != 38) {
 		diag("Wrong item lenght in read (last).\n");
 		knot_rrset_deep_free(&rrset1, 1, 1);
 		return 0;
 	}
-	
+
 	knot_rrset_deep_free(&rrset1, 1, 1);
 	return 1;
 }
@@ -623,14 +623,14 @@ static int test_rrset_get_rdata()
 		knot_rrset_deep_free(&rrset, 1, 1);
 		return 0;
 	}
-	
+
 	int ret = memcmp(pointer, ref_pointer, 16);
 	if (ret) {
 		diag("Got bad RDATA from RRSet (comparison failed).\n");
 		knot_rrset_deep_free(&rrset, 1, 1);
 		return 0;
 	}
-	
+
 	uint8_t *ref_pointer2 = knot_rrset_create_rdata(rrset, 16);
 	memcpy(ref_pointer2, "foobarfoobarfoob", 16);
 	pointer = knot_rrset_get_rdata(rrset, 1);
@@ -640,14 +640,14 @@ static int test_rrset_get_rdata()
 		knot_rrset_deep_free(&rrset, 1, 1);
 		return 0;
 	}
-	
+
 	ret = memcmp(pointer, ref_pointer2, 16);
 	if (ret) {
 		diag("Got bad RDATA from RRSet (comparison failed).\n");
 		knot_rrset_deep_free(&rrset, 1, 1);
 		return 0;
 	}
-	
+
 	knot_rrset_deep_free(&rrset, 1, 1);
 	return 1;
 }
@@ -664,7 +664,7 @@ static int test_rrset_shallow_copy()
 			diag("Could not copy RRSet.\n");
 			return 0;
 		}
-	
+
 		/* Check that created RRSet has the same as the old one. */
 		int errors = check_rrset_values(rrset_copy, rrset->owner, rrset->type,
 		                                rrset->rclass, rrset->ttl,
@@ -673,24 +673,24 @@ static int test_rrset_shallow_copy()
 			knot_rrset_free(&rrset_copy);
 			return 0;
 		}
-	
+
 		/* Check that created RRSet has the same RDATA. */
 		if (rrset->rdata != rrset_copy->rdata) {
 			diag("RDATA in the new RRSet do not match.\n");
 			knot_rrset_free(&rrset_copy);
 			return 0;
 		}
-	
+
 		/* Check that RDATA indices are the same. */
 		if (rrset->rdata_indices != rrset_copy->rdata_indices) {
 			diag("RDATA indices in the new RRSet do not match.\n");
 			knot_rrset_free(&rrset_copy);
 			return 0;
 		}
-		
+
 		knot_rrset_free(&rrset_copy);
 	}
-	
+
 	return 1;
 }
 
@@ -704,7 +704,7 @@ static int test_rrset_deep_copy()
 			diag("Could not copy RRSet.\n");
 			return 0;
 		}
-	
+
 		/* Check that created RRSet has the same as the old one. */
 		int errors = check_rrset_values(rrset_copy, rrset->owner, rrset->type,
 		                                rrset->rclass, rrset->ttl,
@@ -713,7 +713,7 @@ static int test_rrset_deep_copy()
 			knot_rrset_deep_free(&rrset_copy, 1, 1);
 			return 0;
 		}
-	
+
 		/* Check that RDATA indices contain the same data. */
 		ret = memcmp(rrset->rdata_indices, rrset_copy->rdata_indices,
 		             rrset->rdata_count);
@@ -722,7 +722,7 @@ static int test_rrset_deep_copy()
 			knot_rrset_deep_free(&rrset_copy, 1, 1);
 			return 0;
 		}
-	
+
 		/*
 		 * Go through RDATA and compare blocks. Cannot compare the whole thing
 		 * since DNAMEs are copied as well and will have different address.
@@ -735,7 +735,7 @@ static int test_rrset_deep_copy()
 		}
 		knot_rrset_deep_free(&rrset_copy, 1, 1);
 	}
-	
+
 	return 1;
 }
 
@@ -744,7 +744,7 @@ static int test_rrset_to_wire()
 	size_t wire_size = 65535;
 	uint8_t wire[wire_size];
 	uint16_t rr_count = 0;
-	
+
 	/* Test correct conversions. */
 	for (int i = 0; i < TEST_RRSET_COUNT; i++) {
 		memset(wire, 0, wire_size);
@@ -757,12 +757,12 @@ static int test_rrset_to_wire()
 			     knot_strerror(ret));
 			return 0;
 		}
-		
+
 		if (rr_count != test_rrset_array[i].rrset.rdata_count) {
 			diag("Wrong number of RRs converted.\n");
 			return 0;
 		}
-		
+
 		size_t offset = 0;
 		for (int j = 0; j < rr_count; ++j) {
 			/* Check that header is OK. */
@@ -774,7 +774,7 @@ static int test_rrset_to_wire()
 				     i, j);
 				return 0;
 			}
-		
+
 			offset += test_rrset_array[i].header_wire_size;
 			/* Check RDLENGTH. */
 			uint16_t rdlength = knot_wire_read_u16(wire + offset);
@@ -783,7 +783,7 @@ static int test_rrset_to_wire()
 				return 0;
 			}
 			offset += sizeof(uint16_t);
-				
+
 			/* Check that the RDATA are OK. */
 			ret = memcmp(wire + offset,
 			             test_rrset_array[i].test_rdata[j]->wire,
@@ -796,7 +796,7 @@ static int test_rrset_to_wire()
 			}
 			offset += rdlength;
 		}
-		
+
 		if (offset != wire_size) {
 			diag("Wrong wire size, in RRSet=%d "
 			     "(should be=%d, is=%d).\n", i,
@@ -804,7 +804,7 @@ static int test_rrset_to_wire()
 			return 0;
 		}
 	}
-	
+
 	/* Check that function does not crash if given small wire. */
 	int ret = knot_rrset_to_wire(&test_rrset_array[0].rrset, wire,
 	                         &wire_size, 5, &rr_count, NULL);
@@ -821,7 +821,7 @@ static int test_rrset_to_wire()
 		     " not big enough.\n");
 		return 0;
 	}
-	
+
 	return 1;
 }
 
@@ -842,7 +842,7 @@ static int test_rrset_merge()
 		knot_rrset_deep_free(&merge_from, 1, 1);
 		return 0;
 	}
-	
+
 	//TODO check that merge operation does not change second rr
 	//TODO check that two RRSet that are not mergable will not merge
 	if (!knot_rrset_equal(&test_rrset_array[TEST_RRSET_MERGE_UNIQUE2].rrset,
@@ -851,7 +851,7 @@ static int test_rrset_merge()
 		diag("Merge corrupted second RRSet.\n");
 		return 0;
 	}
-	
+
 	if (merge_to->rdata_count !=
 	    test_rrset_array[TEST_RRSET_MERGE_UNIQUE1].rrset.rdata_count +
 	    merge_from->rdata_count) {
@@ -860,7 +860,7 @@ static int test_rrset_merge()
 		knot_rrset_deep_free(&merge_from, 1, 1);
 		return 0;
 	}
-	
+
 	/* Check that the first RRSet now contains RDATA from the second. */
 	/* Indices first. */
 	ret = memcmp(merge_to->rdata_indices,
@@ -872,7 +872,7 @@ static int test_rrset_merge()
 		knot_rrset_deep_free(&merge_from, 1, 1);
 		return 0;
 	}
-	
+
 	/* Check actual RDATA. */
 	ret = knot_rrset_rdata_equal(merge_to,
 	                             &test_rrset_array[TEST_RRSET_MERGE_RESULT1].rrset);
@@ -882,10 +882,10 @@ static int test_rrset_merge()
 		knot_rrset_deep_free(&merge_from, 1, 1);
 		return 0;
 	}
-	
+
 	knot_rrset_deep_free(&merge_to, 1, 1);
 	knot_rrset_deep_free(&merge_from, 1, 1);
-	
+
 	return 1;
 }
 
@@ -904,22 +904,22 @@ static int test_rrset_merge_no_dupl()
 		diag("Merge of identical RRSets failed.\n");
 		return 0;
 	}
-	
+
 	if (!knot_rrset_equal(&test_rrset_array[TEST_RRSET_MERGE_UNIQUE1].rrset,
 	                      merge_to, KNOT_RRSET_COMPARE_WHOLE)) {
 		diag("Merge corrupted first RRSet.\n");
 		return 0;
 	}
-	
+
 	if (!knot_rrset_equal(&test_rrset_array[TEST_RRSET_MERGE_UNIQUE1].rrset,
 	                       merge_from, KNOT_RRSET_COMPARE_WHOLE)) {
 		diag("Merge corrupted second RRSet.\n");
 		return 0;
 	}
-	
+
 	knot_rrset_deep_free(&merge_to, 1, 1);
 	knot_rrset_deep_free(&merge_from, 1, 1);
-	
+
 	/* Merge normal, non-duplicated RRSets. */
 	knot_rrset_deep_copy(&test_rrset_array[TEST_RRSET_MERGE_UNIQUE1].rrset,
 	                     &merge_to, 1);
@@ -927,31 +927,31 @@ static int test_rrset_merge_no_dupl()
 	                     &merge_from, 1);
 	assert(merge_to);
 	assert(merge_from);
-	
+
 	ret = knot_rrset_merge_no_dupl(merge_to, merge_from, &merged,
 	                               &removed_rrs);
 	if (ret != KNOT_EOK) {
 		diag("Merge of identical RRSets failed.\n");
 		return 0;
 	}
-	
+
 	if (!knot_rrset_equal(&test_rrset_array[TEST_RRSET_MERGE_UNIQUE2].rrset,
 	                      merge_from,
 	                      KNOT_RRSET_COMPARE_WHOLE)) {
 		diag("Merge corrupted second RRSet.\n");
 		return 0;
 	}
-	
+
 	if (!knot_rrset_equal(&test_rrset_array[TEST_RRSET_MERGE_RESULT1].rrset,
 	                      merge_to,
 	                      KNOT_RRSET_COMPARE_WHOLE)) {
 		diag("Merge did not create correct RDATA.\n");
 		return 0;
 	}
-	
+
 	knot_rrset_deep_free(&merge_to, 1, 1);
 	knot_rrset_deep_free(&merge_from, 1, 1);
-	
+
 	/* Merge RRSets with both duplicated and unique RDATAs. */
 	knot_rrset_deep_copy(&test_rrset_array[TEST_RRSET_MERGE_UNIQUE1].rrset,
 	                     &merge_to, 1);
@@ -959,31 +959,31 @@ static int test_rrset_merge_no_dupl()
 	                     &merge_from, 1);
 	assert(merge_to);
 	assert(merge_from);
-	
+
 	ret = knot_rrset_merge_no_dupl(merge_to, merge_from, &merged,
 	                               &removed_rrs);
 	if (ret != KNOT_EOK) {
 		diag("Merge of identical RRSets failed.\n");
 		return 0;
 	}
-	
+
 	if (!knot_rrset_equal(&test_rrset_array[TEST_RRSET_MERGE_RESULT1].rrset,
 	                      merge_from,
 	                      KNOT_RRSET_COMPARE_WHOLE)) {
 		diag("Merge corrupted second RRSet.\n");
 		return 0;
 	}
-	
+
 	if (!knot_rrset_equal(&test_rrset_array[TEST_RRSET_MERGE_RESULT1].rrset,
 	                      merge_to,
 	                      KNOT_RRSET_COMPARE_WHOLE)) {
 		diag("Merge did not create correct RDATA.\n");
 		return 0;
 	}
-	
+
 	knot_rrset_deep_free(&merge_to, 1, 1);
 	knot_rrset_deep_free(&merge_from, 1, 1);
-	
+
 	return 1;
 }
 
@@ -991,21 +991,21 @@ static int test_rrset_equal()
 {
 	/* Test pointer comparison. */
 	int ret = knot_rrset_equal((knot_rrset_t *)0xdeadbeef,
-	                           (knot_rrset_t *)0xdeadbeef, 
+	                           (knot_rrset_t *)0xdeadbeef,
 	                           KNOT_RRSET_COMPARE_PTR);
 	if (!ret) {
 		diag("Pointer comparison failed (1).\n");
 		return 0;
 	}
-	
-	ret = knot_rrset_equal((knot_rrset_t *)0xdeadbeef, 
+
+	ret = knot_rrset_equal((knot_rrset_t *)0xdeadbeef,
 	                       (knot_rrset_t *)0xcafebabe,
 	                        KNOT_RRSET_COMPARE_PTR);
 	if (ret) {
 		diag("Pointer comparison failed (0).\n");
 		return 0;
 	}
-	
+
 	/* Create equal RRSets. */
 	knot_rrset_t *rrs1 = NULL;
 	knot_rrset_deep_copy(&test_rrset_array[TEST_RRSET_A_GT].rrset,
@@ -1043,7 +1043,7 @@ static int test_rrset_equal()
 		return 0;
 	}
 	rrs1->rclass = KNOT_CLASS_IN;
-	
+
 	/* Test whole comparison. */
 	ret = knot_rrset_equal(rrs1, rrs2, KNOT_RRSET_COMPARE_WHOLE);
 	if (!ret) {
@@ -1051,7 +1051,7 @@ static int test_rrset_equal()
 		knot_rrset_deep_free(&rrs1, 1, 1);
 		return 0;
 	}
-	
+
 	rrs2 = &test_rrset_array[TEST_RRSET_A_LESS].rrset;
 	ret = knot_rrset_equal(rrs1, rrs2, KNOT_RRSET_COMPARE_WHOLE);
 	if (ret) {
@@ -1059,9 +1059,9 @@ static int test_rrset_equal()
 		knot_rrset_deep_free(&rrs1, 1, 1);
 		return 0;
 	}
-	
+
 	knot_rrset_deep_free(&rrs1, 1, 1);
-	
+
 	return 1;
 }
 
@@ -1076,7 +1076,7 @@ static int test_rrset_rdata_equal()
 		     rrset1->type, rrset2->type);
 		return 0;
 	}
-	
+
 	/* Equal - DNAME only. */
 	rrset1 = &test_rrset_array[TEST_RRSET_NS_LESS].rrset;
 	rrset2 = &test_rrset_array[TEST_RRSET_NS_LESS].rrset;
@@ -1085,7 +1085,7 @@ static int test_rrset_rdata_equal()
 		     "value, should be 1. (DNAME only)\n");
 		return 0;
 	}
-	
+
 	/* Equal - combination. */
 	rrset1 = &test_rrset_array[TEST_RRSET_MX_BIN_LESS].rrset;
 	rrset2 = &test_rrset_array[TEST_RRSET_MX_BIN_LESS].rrset;
@@ -1094,7 +1094,7 @@ static int test_rrset_rdata_equal()
 		     "value, should be 1. (MX combination)\n");
 		return 0;
 	}
-	
+
 	/* Equal - combination, different order. */
 	rrset1 = &test_rrset_array[TEST_RRSET_MINFO_MULTIPLE1].rrset;
 	rrset2 = &test_rrset_array[TEST_RRSET_MINFO_MULTIPLE2].rrset;
@@ -1103,7 +1103,7 @@ static int test_rrset_rdata_equal()
 		     "value, should be 1. (MINFO - order, combination)\n");
 		return 0;
 	}
-	
+
 	/* Not equal - second item missing. */
 	rrset1 = &test_rrset_array[TEST_RRSET_MINFO_MULTIPLE1].rrset;
 	rrset2 = &test_rrset_array[TEST_RRSET_MINFO].rrset;
@@ -1112,18 +1112,18 @@ static int test_rrset_rdata_equal()
 		     "value, should be 0. (MINFO - combination)\n");
 		return 0;
 	}
-	
+
 	/* Other way around. */
 	if (knot_rrset_rdata_equal(rrset2, rrset1)) {
 		diag("rrset_rdata_equal() returned wrong "
 		     "value, should be 0. (combination)\n");
 		return 0;
 	}
-	
+
 	/* Not equal - second item different. */
-	
+
 	/* Other way around. */
-	
+
 	/* Not equal - raw data only. */
 	rrset1 = &test_rrset_array[TEST_RRSET_A_LESS].rrset;
 	rrset2 = &test_rrset_array[TEST_RRSET_A_GT].rrset;
@@ -1132,14 +1132,14 @@ static int test_rrset_rdata_equal()
 		     "value, should be 0. (raw data only)\n");
 		return 0;
 	}
-	
+
 	/* Not equal - raw data only. */
 	if (knot_rrset_rdata_equal(rrset2, rrset1) == 1) {
 		diag("rrset_rdata_equal() returned wrong "
 		     "value, should be 0. (raw data only)\n");
 		return 0;
 	}
-	
+
 	/* Not equal - DNAME only. */
 	rrset1 = &test_rrset_array[TEST_RRSET_NS_LESS].rrset;
 	rrset2 = &test_rrset_array[TEST_RRSET_NS_GT].rrset;
@@ -1148,14 +1148,14 @@ static int test_rrset_rdata_equal()
 		     "value, should be 0. (DNAME only)\n");
 		return 0;
 	}
-	
+
 	/* Not equal - DNAME only. */
 	if (knot_rrset_rdata_equal(rrset2, rrset1) == 1) {
 		diag("rrset_rdata_equal() returned wrong "
 		     "value, should be 0. (DNAME only)\n");
 		return 0;
 	}
-	
+
 	/* Not equal - combination, difference in binary part. */
 	rrset1 = &test_rrset_array[TEST_RRSET_MX_BIN_LESS].rrset;
 	rrset2 = &test_rrset_array[TEST_RRSET_MX_BIN_GT].rrset;
@@ -1164,14 +1164,14 @@ static int test_rrset_rdata_equal()
 		     "value, should be 0. (combination)\n");
 		return 0;
 	}
-	
+
 	/* Not equal - combination, difference in binary part. */
 	if (knot_rrset_rdata_equal(rrset2, rrset1) == 1) {
 		diag("rrset_rdata_equal() returned wrong "
 		     "value, should be 0. (combination)\n");
 		return 0;
 	}
-	
+
 	/* Not equal - combination, difference in DNAME part. */
 	rrset1 = &test_rrset_array[TEST_RRSET_MX_DNAME_LESS].rrset;
 	rrset2 = &test_rrset_array[TEST_RRSET_MX_DNAME_GT].rrset;
@@ -1180,14 +1180,14 @@ static int test_rrset_rdata_equal()
 		     "value, should be 0. (combination)\n");
 		return 0;
 	}
-	
+
 	/* Not equal - combination, difference in DNAME part. */
 	if (knot_rrset_rdata_equal(rrset2, rrset1) == 1) {
 		diag("rrset_rdata_equal() returned wrong "
 		     "value, should be 0 (combination)\n");
 		return 0;
 	}
-		
+
 	return 1;
 }
 
@@ -1215,13 +1215,13 @@ static int test_rrset_next_dname()
 		}
 		i++;
 	}
-	
+
 	if (i != 4) {
 		diag("Not all DNAMEs were extracted (%d out of 4).\n",
 		     i);
 		return 0;
 	}
-	
+
 	/* Now try NS. */
 	rrset = &test_rrset_array[TEST_RRSET_NS_LESS].rrset;
 	dname = NULL;
@@ -1249,7 +1249,7 @@ static int test_rrset_next_dname()
 		diag("Got DNAME from RRSet even though all had been extracted previously. (MX)\n");
 		return 0;
 	}
-	
+
 	/* Try writes into DNAMEs you've gotten. */
 	rrset = NULL;
 	knot_rrset_deep_copy(&test_rrset_array[TEST_RRSET_MINFO_MULTIPLE1].rrset,
@@ -1261,13 +1261,13 @@ static int test_rrset_next_dname()
 		memcpy(dname, &test_dnames[i], sizeof(knot_dname_t *));
 		i++;
 	}
-	
+
 	if (i != 8) {
 		diag("Not all DNAMEs were traversed (%d).\n", i);
 		knot_rrset_deep_free(&rrset, 1, 1);
 		return 0;
 	}
-	
+
 	knot_dname_t **dname_read = NULL;
 	i = 4;
 	while ((dname_read = knot_rrset_get_next_dname(rrset,
@@ -1280,15 +1280,15 @@ static int test_rrset_next_dname()
 		}
 		i++;
 	}
-	
+
 	if (i != 8) {
 		diag("Not all DNAMEs were traversed (%d).\n", i);
 		knot_rrset_deep_free(&rrset, 1, 1);
 		return 0;
 	}
-	
+
 	knot_rrset_deep_free(&rrset, 1, 1);
-	
+
 	return 1;
 }
 
@@ -1320,7 +1320,7 @@ static int test_rrset_find_pos()
 		diag("Wrong index returned. Should be 0, was %zu", rr_pos);
 		return 0;
 	}
-	
+
 	/* Add second RR. */
 	knot_rrset_deep_free(&rrset_find_in, 1, 1);
 	knot_rrset_shallow_copy(rrset_source, &rrset_find_in);
@@ -1336,17 +1336,17 @@ static int test_rrset_find_pos()
 		diag("Wrong index returned. Should be 1, was %zu", rr_pos);
 		return 0;
 	}
-	
+
 	knot_rrset_deep_free(&rrset_source, 1, 1);
 	knot_rrset_deep_free(&rrset_find_in, 1, 1);
-	
+
 	return 1;
 }
 
 static int test_rrset_remove_rr()
 {
 	/* Remove RR and test that the returned data were OK. */
-	
+
 	/* Create some mockup TXT RRSets. */
 	knot_rrset_t *rrset_source = knot_rrset_new(test_dnames[0], KNOT_RRTYPE_TXT,
 	                                            KNOT_CLASS_IN, 3600);
@@ -1370,14 +1370,14 @@ static int test_rrset_remove_rr()
 		knot_rrset_deep_free(&returned_rr, 1, 1);
 		return 0;
 	}
-	
+
 //	diag("Returned\n");
 //	knot_rrset_dump(returned_rr);
 //	diag("Source\n");
 //	knot_rrset_dump(rrset_source);
 //	diag("Destinantion\n");
 //	knot_rrset_dump(rrset_dest);
-	
+
 	/* Only one RR within RRSet, needs to be the same. */
 	if (!knot_rrset_equal(rrset_source, returned_rr,
 	                     KNOT_RRSET_COMPARE_WHOLE)) {
@@ -1386,11 +1386,11 @@ static int test_rrset_remove_rr()
 		knot_rrset_deep_free(&returned_rr, 1, 1);
 		return 0;
 	}
-	
+
 	knot_rrset_deep_free(&rrset_source, 1, 1);
 	knot_rrset_deep_free(&rrset_dest, 1, 1);
 	knot_rrset_deep_free(&returned_rr, 1, 1);
-	
+
 	return 1;
 }
 
@@ -1407,60 +1407,60 @@ static int knot_rrset_tests_run(int argc, char *argv[])
 	create_test_dnames();
 	create_test_rdata();
 	create_test_rrsets();
-	
+
 	res = test_rrset_new();
 	ok(res, "rrset: create");
 	res_final *= res;
-	
+
 	res = test_rrset_create_rdata();
 	ok(res, "rrset: create_rdata");
 	res_final *= res;
-	
+
 	res = test_rrset_get_rdata();
 	ok(res, "rrset: get rdata");
 	res_final *= res;
-	
+
 	res = test_rrset_equal();
 	ok(res, "rrset: rrset_equal");
 	res_final *= res;
-	
+
 	res = test_rrset_rdata_equal();
 	ok(res, "rrset: rrset_rdata_equal");
 
 	res = test_rrset_shallow_copy();
 	ok(res, "rrset: shallow copy");
 	res_final *= res;
-	
+
 	res = test_rrset_deep_copy();
 	ok(res, "rrset: deep copy");
 	res_final *= res;
-	
+
 	res = test_rrset_to_wire();
 	ok(res, "rrset: to wire");
 	res_final *= res;
-	
+
 	res = test_rrset_rdata_item_size();
 	ok(res, "rrset: rdata_item_size");
 	res_final *= res;
-	
+
 	res = test_rrset_merge();
 	ok(res, "rrset: merge");
 	res_final *= res;
-	
+
 	res = test_rrset_merge_no_dupl();
 	ok(res, "rrset: merge no dupl");
 	res_final *= res;
-	
+
 	res = test_rrset_next_dname();
 	ok(res, "rrset: next dname");
 	res_final *= res;
-	
+
 	res = test_rrset_remove_rr();
 	ok(res, "rrset: remove rr");
-	
+
 	res = test_rrset_find_pos();
 	ok(res, "rrset: find pos");
 	res_final *= res;
-	
+
 	return res_final;
 }
diff --git a/src/tests/libknot/ztree_tests.c b/src/tests/libknot/ztree_tests.c
index 84b80afab53367473690fd8af6f0fef47e66cbc2..e592c6027bac5c8d7e4280f3cbd815e7d65a4bc6 100644
--- a/src/tests/libknot/ztree_tests.c
+++ b/src/tests/libknot/ztree_tests.c
@@ -27,12 +27,12 @@ static void ztree_init_data()
 	NAME[1] = knot_dname_new_from_str("master.ac.", 10, NULL);
 	NAME[2] = knot_dname_new_from_str("ac.", 3, NULL);
 	NAME[3] = knot_dname_new_from_str("ns.", 3, NULL);
-	
+
 	knot_dname_t *order[NCOUNT] = {
 	        NAME[0], NAME[2], NAME[1], NAME[3]
 	};
 	memcpy(ORDER, order, NCOUNT * sizeof(knot_dname_t*));
-	
+
 	for (unsigned i = 0; i < NCOUNT; ++i) {
 		memset(NODE + i, 0, sizeof(knot_node_t));
 		NODE[i].owner = NAME[i];
@@ -89,7 +89,7 @@ static int ztree_tests_run(int argc, char *argv[])
 	/* 1. create test */
 	knot_zone_tree_t* t = knot_zone_tree_create();
 	ok(t != NULL, "ztree: created");
-	
+
 	/* 2. insert test */
 	unsigned passed = 1;
 	for (unsigned i = 0; i < NCOUNT; ++i) {
@@ -99,7 +99,7 @@ static int ztree_tests_run(int argc, char *argv[])
 		}
 	}
 	ok(passed, "ztree: insertion");
-	
+
 	/* 3. check data test */
 	passed = 1;
 	const knot_node_t *node = NULL;
@@ -111,10 +111,10 @@ static int ztree_tests_run(int argc, char *argv[])
 		}
 	}
 	ok(passed, "ztree: lookup");
-	
+
 	/* heal index for ordered lookup */
 	hattrie_build_index(t);
-	
+
 	/* 4. ordered lookup */
 	passed = 1;
 	node = NULL;
@@ -123,12 +123,12 @@ static int ztree_tests_run(int argc, char *argv[])
 	knot_zone_tree_find_less_or_equal(t, tmp_dn, &node, &prev);
 	knot_dname_free(&tmp_dn);
 	ok(prev == NODE + 1, "ztree: ordered lookup");
-	
+
 	/* 5. ordered traversal */
 	struct ztree_iter it = { KNOT_EOK, 0 };
 	knot_zone_tree_apply_inorder(t, ztree_iter_data, &it);
 	ok (it.ret == KNOT_EOK, "ztree: ordered traversal");
-	
+
 	knot_zone_tree_free(&t);
 	ztree_free_data();
 	return 0;
diff --git a/src/tests/unittests_main.c b/src/tests/unittests_main.c
index 36b90dadc6d262f91caf8a1df4c0e5b09624f391..8ce8ec70ab36a9861437808175e3c3c3adbb39bf 100644
--- a/src/tests/unittests_main.c
+++ b/src/tests/unittests_main.c
@@ -106,4 +106,3 @@ int main(int argc, char *argv[])
 	// Evaluate
 	return exit_status();
 }
-
diff --git a/src/tests/xfr_tests.c b/src/tests/xfr_tests.c
index 13a1abaaff46e774fe97ff61f723b523a67483a2..77db11cc48f3bb73134d2b8e9310ee7c17296e19 100644
--- a/src/tests/xfr_tests.c
+++ b/src/tests/xfr_tests.c
@@ -65,7 +65,7 @@ void interrupt_handle(int s)
 			exit(1);
 		}
 	}
-	
+
 	// Start zone integrity check
 	if (s == SIGUSR1) {
 		sig_integrity_check = 1;
@@ -96,7 +96,7 @@ int main(int argc, char **argv)
 	int daemonize = 0;
 	char *config_fn = NULL;
 	char *zone = NULL;
-	
+
 	/* Long options. */
 	struct option opts[] = {
 		{"config",    required_argument, 0, 'c'},
@@ -107,7 +107,7 @@ int main(int argc, char **argv)
 		{"help",      no_argument,       0, 'h'},
 		{0, 0, 0, 0}
 	};
-	
+
 	while ((c = getopt_long(argc, argv, "c:z:dvVh", opts, &li)) != -1) {
 		switch (c)
 		{
@@ -140,7 +140,7 @@ int main(int argc, char **argv)
 
 	// Now check if we want to daemonize
 	if (daemonize) {
-		if (daemon(1, 0) != 0) { 
+		if (daemon(1, 0) != 0) {
 			free(zone);
 			free(config_fn);
 			fprintf(stderr, "Daemonization failed, "
@@ -382,4 +382,3 @@ int main(int argc, char **argv)
 
 	return res;
 }
-
diff --git a/src/tests/zscanner/zscanner_tests.c b/src/tests/zscanner/zscanner_tests.c
index 0fe2e892f5f750560b351f76232b40057cf4bbb7..c1ae23b154375392bf1371c2d29eaa47334ed5ac 100644
--- a/src/tests/zscanner/zscanner_tests.c
+++ b/src/tests/zscanner/zscanner_tests.c
@@ -42,4 +42,3 @@ static int zscanner_tests_run(int argc, char *argv[])
 
 	return 0;
 }
-
diff --git a/src/utils/common/exec.c b/src/utils/common/exec.c
index 745b1fbc716a737189110bee67f4e2503ee37ffe..cbc0071d0bd1c1348770b8ae1d2868d0e7f74f7f 100644
--- a/src/utils/common/exec.c
+++ b/src/utils/common/exec.c
@@ -331,7 +331,7 @@ static void print_error_host(const uint8_t         code,
 
 	if (code == KNOT_RCODE_NOERROR) {
 		printf("Host %s has no %s record\n", owner, type);
-	} else { 
+	} else {
 		printf("Host %s type %s error: %s\n", owner, type, rcode_str);
 	}
 
@@ -549,7 +549,7 @@ void print_packet(const knot_packet_t *packet,
 	default:
 		break;
 	}
-	
+
 	// Print packet statistics.
 	if (style->show_footer) {
 		print_footer(total_len, 0, 0, net, elapsed, incoming);
diff --git a/src/utils/common/msg.c b/src/utils/common/msg.c
index 720077d428499ec8800e6eeb167bd6155b56f95c..a1b61a60e336cc622823bf6d87cb4e893a5e43cb 100644
--- a/src/utils/common/msg.c
+++ b/src/utils/common/msg.c
@@ -38,4 +38,3 @@ int msg_debug(const char *fmt, ...)
 	}
 	return n;
 }
-
diff --git a/src/utils/common/msg.h b/src/utils/common/msg.h
index 9f1c039c9eddf670b9fb848ece9bb9f671c128d4..4f82a53e9953dbf7a4b77bae59d00d5b1fd1c33a 100644
--- a/src/utils/common/msg.h
+++ b/src/utils/common/msg.h
@@ -54,4 +54,3 @@ int msg_debug(const char *fmt, ...);
 #define DBG_NULL	DBG("%s: null parameter\n", __func__)
 
 #endif // _UTILS__MSG_H_
-
diff --git a/src/utils/common/netio.c b/src/utils/common/netio.c
index 64021d0bfe04280d1d456834a505de76410f84ab..bbc8457a5858db48422a2924f8922c138d8928fd 100644
--- a/src/utils/common/netio.c
+++ b/src/utils/common/netio.c
@@ -236,7 +236,7 @@ int net_connect(const server_t *local,
 		close(sockfd);
 		return KNOT_ERROR;
 	}
-	
+
 	// Check if NB socket is writeable.
 	cs = getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &err, &err_len);
 	if (cs < 0 || err != 0) {
@@ -385,4 +385,3 @@ void net_close(net_t *net)
 	close(net->sockfd);
 	net_clean(net);
 }
-
diff --git a/src/utils/common/params.c b/src/utils/common/params.c
index 2a4150b42756724f7508b541efe6980d7aec0e88..b0c1cd245069c7d770cd5f47518cc3799d0e740b 100644
--- a/src/utils/common/params.c
+++ b/src/utils/common/params.c
@@ -25,7 +25,7 @@
 #include "libknot/libknot.h"
 #include "common/errcode.h"		// KNOT_EOK
 #include "common/mempattern.h"		// strcdup
-#include "common/descriptor.h"		// KNOT_RRTYPE_ 
+#include "common/descriptor.h"		// KNOT_RRTYPE_
 #include "utils/common/msg.h"		// WARN
 #include "utils/common/resolv.h"	// parse_nameserver
 #include "utils/common/token.h"		// token
diff --git a/src/utils/common/resolv.c b/src/utils/common/resolv.c
index 760cf47b2a3fcd8746cd9a6c3f602a13b7b5683d..09d4fb1095ac76451d016f4afea191a5f82355ab 100644
--- a/src/utils/common/resolv.c
+++ b/src/utils/common/resolv.c
@@ -36,7 +36,7 @@ server_t* parse_nameserver(const char *nameserver, const char *def_port)
 	// OpenBSD notation: nameserver [address]:port
 	if (nameserver[0] == '[') {
 		char *addr, *port;
-	
+
 		char   *start = (char *)nameserver + 1;
 		char   *end = index(nameserver, ']');
 		size_t addr_len = end - start;
diff --git a/src/utils/common/token.c b/src/utils/common/token.c
index b9150715ebf7d6d20a3554ac75d3fc3e8f072163..00d7c3aea2ab54b61bbd1d9d0a76aec8e78d3933 100644
--- a/src/utils/common/token.c
+++ b/src/utils/common/token.c
@@ -98,7 +98,7 @@ int tok_find(const char *lp, const char **tbl)
 		ERR("syntax error\n");
 		return KNOT_EPARSEFAIL;
 	}
-	
+
 	return bp;
 }
 
@@ -120,7 +120,7 @@ int tok_process_lines(FILE *fp, lparse_f cb, void *arg)
 	}
 
 	int ret = KNOT_EOK;
-	
+
 	/* Parse lines. */
 	char *buf = NULL;
 	size_t buflen = 0;
@@ -133,4 +133,3 @@ int tok_process_lines(FILE *fp, lparse_f cb, void *arg)
 	free(buf);
 	return ret;
 }
-
diff --git a/src/utils/dig/dig_exec.c b/src/utils/dig/dig_exec.c
index 8ea7f6640c2c3fe829c01f2fcd55d8d1f250cdc8..2ce149c42ef84ff9d3a31f477b06b904cfed05b7 100644
--- a/src/utils/dig/dig_exec.c
+++ b/src/utils/dig/dig_exec.c
@@ -440,7 +440,7 @@ void process_query(const query_t *query)
 			                           &query->sign_ctx,
 			                           &query->key_params,
 			                           &query->style);
-	
+
 			if (ret == 0) {
 				knot_packet_free(&out_packet);
 				return;
@@ -523,7 +523,7 @@ static int process_xfr_packet(const knot_packet_t     *query,
 			net_close(&net);
 			return -1;
 		}
-	
+
 		// Parse reply to the packet structure.
 		if (knot_packet_parse_from_wire(reply, in, in_len, 0,
 		                                KNOT_PACKET_DUPL_NO_MERGE)
@@ -533,18 +533,18 @@ static int process_xfr_packet(const knot_packet_t     *query,
 			net_close(&net);
 			return -1;
 		}
-	
+
 		// Compare reply header id.
 		if (check_reply_id(reply, query) == false) {
 			knot_packet_free(&reply);
 			net_close(&net);
 			return -1;
 		}
-	
+
 		// Check for reply error.
 		uint8_t rcode_id = knot_wire_get_rcode(in);
 		if (rcode_id != KNOT_RCODE_NOERROR) {
-			knot_lookup_table_t *rcode = 
+			knot_lookup_table_t *rcode =
 				knot_lookup_by_id(knot_rcode_names, rcode_id);
 			if (rcode != NULL) {
 				ERR("server respond %s\n", rcode->name);
diff --git a/src/utils/host/host_main.c b/src/utils/host/host_main.c
index 5485ef4eafb1d945b0c37d7035ff3b5ae859cf62..0ac92fe32f3b5314a5334d1be558379e92d67b23 100644
--- a/src/utils/host/host_main.c
+++ b/src/utils/host/host_main.c
@@ -36,4 +36,3 @@ int main(int argc, char *argv[])
 	host_clean(&params);
 	return ret;
 }
-
diff --git a/src/utils/host/host_params.c b/src/utils/host/host_params.c
index 3320302bc176977d869c70dc15fad7223a1ad2f7..052171c0e56b3d17486b06e24a278c84b8158b47 100644
--- a/src/utils/host/host_params.c
+++ b/src/utils/host/host_params.c
@@ -305,4 +305,3 @@ int host_parse(dig_params_t *params, int argc, char *argv[])
 
 	return KNOT_EOK;
 }
-
diff --git a/src/utils/nsupdate/KNOWN_ISSUES b/src/utils/nsupdate/KNOWN_ISSUES
index 378016183e65144068ffab8c276befe2ee8905d0..fddd387963ba4fcdd2e61a9173b1a9887c5c8ba0 100644
--- a/src/utils/nsupdate/KNOWN_ISSUES
+++ b/src/utils/nsupdate/KNOWN_ISSUES
@@ -3,5 +3,4 @@ Missing features:
 * GSS-TSIG (Kerberos) support
 * Resolving SOA mname if no server is set
 * Using TSIG key specified by SIG(0) RR
-* '-R randomdev' option 
-
+* '-R randomdev' option
diff --git a/src/utils/nsupdate/nsupdate_exec.c b/src/utils/nsupdate/nsupdate_exec.c
index f07197d22506985be74e35ff5605be2d6d58792b..35fdc100d48ddc2cae8af928c7e756e252aacdf6 100644
--- a/src/utils/nsupdate/nsupdate_exec.c
+++ b/src/utils/nsupdate/nsupdate_exec.c
@@ -142,7 +142,7 @@ static int parse_full_rr(scanner_t *s, const char* lp)
 	if (scanner_process(&nl, &nl+sizeof(char), 1, s) < 0) { /* Terminate */
 		return KNOT_EPARSEFAIL;
 	}
-	
+
 	/* Class must not differ from specified. */
 	if (s->r_class != s->default_class) {
 		char cls_s[16] = {0};
@@ -150,14 +150,14 @@ static int parse_full_rr(scanner_t *s, const char* lp)
 		ERR("class mismatch: '%s'\n", cls_s);
 		return KNOT_EPARSEFAIL;
 	}
-	
+
 	return KNOT_EOK;
 }
 
 static int parse_partial_rr(scanner_t *s, const char *lp, unsigned flags) {
 	int ret = KNOT_EOK;
 	char b1[32], b2[32]; /* Should suffice for both class/type */
-	
+
 	/* Extract owner. */
 	size_t len = strcspn(lp, SEP_CHARS);
 	knot_dname_t *owner = knot_dname_new_from_str(lp, len, NULL);
@@ -177,11 +177,11 @@ static int parse_partial_rr(scanner_t *s, const char *lp, unsigned flags) {
 		knot_dname_cat(owner, suf);
 		knot_dname_free(&suf);
 	}
-	
+
 	s->r_owner_length = knot_dname_size(owner);
 	memcpy(s->r_owner, knot_dname_name(owner), s->r_owner_length);
 	lp = tok_skipspace(lp + len);
-	
+
 	/* Initialize */
 	s->r_type = KNOT_RRTYPE_ANY;
 	s->r_class = s->default_class;
@@ -191,7 +191,7 @@ static int parse_partial_rr(scanner_t *s, const char *lp, unsigned flags) {
 	} else {
 		s->r_ttl = s->default_ttl;
 	}
-	
+
 	/* Parse only name? */
 	if (flags & PARSE_NAMEONLY) {
 		knot_dname_free(&owner);
@@ -207,7 +207,7 @@ static int parse_partial_rr(scanner_t *s, const char *lp, unsigned flags) {
 		DBG("%s: parsed ttl=%lu\n", __func__, ttl);
 		lp = tok_skipspace(np);
 	}
-	
+
 	len = strcspn(lp, SEP_CHARS); /* Try to find class */
 	memset(b1, 0, sizeof(b1));
 	strncpy(b1, lp, len < sizeof(b1) ? len : sizeof(b1));
@@ -218,7 +218,7 @@ static int parse_partial_rr(scanner_t *s, const char *lp, unsigned flags) {
 		DBG("%s: parsed class=%u\n", __func__, s->r_class);
 		lp = tok_skipspace(lp + len);
 	}
-	
+
 	/* Class must not differ from specified. */
 	if (s->r_class != s->default_class) {
 		char cls_s[16] = {0};
@@ -227,7 +227,7 @@ static int parse_partial_rr(scanner_t *s, const char *lp, unsigned flags) {
 		knot_dname_free(&owner);
 		return KNOT_EPARSEFAIL;
 	}
-	
+
 	len = strcspn(lp, SEP_CHARS); /* Type */
 	memset(b2, 0, sizeof(b2));
 	strncpy(b2, lp, len < sizeof(b2) ? len : sizeof(b2));
@@ -236,25 +236,25 @@ static int parse_partial_rr(scanner_t *s, const char *lp, unsigned flags) {
 		DBG("%s: parsed type=%u '%s'\n", __func__, s->r_type, b2);
 		lp = tok_skipspace(lp + len);
 	}
-	
+
 	/* Remainder */
-	if (*lp == '\0') { 
+	if (*lp == '\0') {
 		knot_dname_free(&owner);
 		return ret; /* No RDATA */
 	}
-	
+
 	/* Synthetize full RR line to prevent consistency errors. */
 	char *owner_s = knot_dname_to_str(owner);
 	knot_rrclass_to_string(s->r_class, b1, sizeof(b1));
 	knot_rrtype_to_string(s->r_type,   b2, sizeof(b2));
-	
+
 	/* Need to parse rdata, synthetize input. */
 	char *rr = sprintf_alloc("%s %u %s %s %s\n",
 	                         owner_s, s->r_ttl, b1, b2, lp);
 	if (scanner_process(rr, rr + strlen(rr), 1, s) < 0) {
 		ret = KNOT_EPARSEFAIL;
 	}
-	
+
 	free(owner_s);
 	free(rr);
 	knot_dname_free(&owner);
@@ -269,7 +269,7 @@ static server_t *parse_host(const char *lp, const char* default_port)
 	char *addr = strndup(lp, len);
 	if (!addr) return NULL;
 	DBG("%s: parsed addr: %s\n", __func__, addr);
-	
+
 	/* Store port/service if present. */
 	lp = tok_skipspace(lp + len);
 	if (*lp == '\0') {
@@ -285,7 +285,7 @@ static server_t *parse_host(const char *lp, const char* default_port)
 		return NULL;
 	}
 	DBG("%s: parsed port: %s\n", __func__, port);
-	
+
 	/* Create server struct. */
 	srv = server_create(addr, port);
 	free(addr);
@@ -343,7 +343,7 @@ static int pkt_append(nsupdate_params_t *p, int sect)
 
 	/* Add to correct section.
 	 * ZONES  ... QD section.
-	 * UPDATE ... NS section. 
+	 * UPDATE ... NS section.
 	 * PREREQ ... AN section.
 	 * ADDIT. ... same.
 	 */
@@ -362,7 +362,7 @@ static int pkt_append(nsupdate_params_t *p, int sect)
 		assert(0); /* Should never happen. */
 		break;
 	}
-	
+
 	if (ret != KNOT_EOK) {
 		DBG("%s: failed to append rdata to appropriate section - %s\n",
 		    __func__, knot_strerror(ret));
@@ -371,7 +371,7 @@ static int pkt_append(nsupdate_params_t *p, int sect)
 			    knot_packet_max_size(p->pkt));
 		}
 	}
-	
+
 	return ret;
 }
 
@@ -398,13 +398,13 @@ static int pkt_sendrecv(nsupdate_params_t *params,
 	}
 
 	/* Wait for reception. */
-	int rb = net_receive(&net, rwire, rlen); 
+	int rb = net_receive(&net, rwire, rlen);
 	DBG("%s: receive_msg = %d\n", __func__, rb);
 	if (rb <= 0) {
 		net_close(&net);
 		return -1;
 	}
-	
+
 	net_close(&net);
 
 	return rb;
@@ -418,7 +418,7 @@ static int nsupdate_process_line(char *lp, int len, void *arg)
 	if (lp[0] == '\0' || lp[0] == ';') return KNOT_EOK; /* Empty/comment */
 	int ret = tok_find(lp, cmd_array);
 	if (ret < 0) return ret; /* Syntax error */
-	
+
 	const char *cmd = cmd_array[ret];
 	const char *val = tok_skipspace(lp + TOK_L(cmd));
 	ret = cmd_handle[ret](val, params);
@@ -426,7 +426,7 @@ static int nsupdate_process_line(char *lp, int len, void *arg)
 		ERR("operation '%s' failed\n", TOK_S(cmd));
 		DBG("reason - %s\n", knot_strerror(ret));
 	}
-	
+
 	return ret;
 }
 
@@ -434,7 +434,7 @@ static int nsupdate_process(nsupdate_params_t *params, FILE *fp)
 {
 	/* Process lines. */
 	int ret = tok_process_lines(fp, nsupdate_process_line, params);
-	
+
 	/* Check for longing query. */
 	if (params->pkt && ret == KNOT_EOK) {
 		cmd_send("", params);
@@ -484,11 +484,11 @@ int nsupdate_exec(nsupdate_params_t *params)
 int cmd_update(const char* lp, nsupdate_params_t *params)
 {
 	DBG("%s: lp='%s'\n", __func__, lp);
-	
+
 	/* update is optional token, next add|del|delete */
 	int bp = tok_find(lp, cmd_array);
 	if (bp < 0) return bp; /* Syntax error. */
-	
+
 	/* allow only specific tokens */
 	cmd_handle_f *h = cmd_handle;
 	if (h[bp] != cmd_add && h[bp] != cmd_del) {
@@ -496,7 +496,7 @@ int cmd_update(const char* lp, nsupdate_params_t *params)
 		    lp, "{add|del|delete}");
 		return KNOT_EPARSEFAIL;
 	}
-	
+
 	return h[bp](tok_skipspace(lp + TOK_L(cmd_array[bp])), params);
 }
 
@@ -504,12 +504,12 @@ int cmd_update(const char* lp, nsupdate_params_t *params)
 int cmd_add(const char* lp, nsupdate_params_t *params)
 {
 	DBG("%s: lp='%s'\n", __func__, lp);
-	
+
 	scanner_t *rrp = params->rrp;
 	if (parse_full_rr(rrp, lp) != KNOT_EOK) {
 		return KNOT_EPARSEFAIL;
 	}
-	
+
 	/* Parsed RR */
 	DBG("%s: parsed rr cls=%u, ttl=%u, type=%u (rdata len=%u)\n",
 	    __func__, rrp->r_class, rrp->r_ttl,rrp->r_type, rrp->r_data_length);
@@ -520,38 +520,38 @@ int cmd_add(const char* lp, nsupdate_params_t *params)
 int cmd_del(const char* lp, nsupdate_params_t *params)
 {
 	DBG("%s: lp='%s'\n", __func__, lp);
-	
+
 	scanner_t *rrp = params->rrp;
 	if (parse_partial_rr(rrp, lp, PARSE_NODEFAULT) != KNOT_EOK) {
 		return KNOT_EPARSEFAIL;
 	}
-	
+
 	/* Check owner name. */
 	if (rrp->r_owner_length == 0) {
 		ERR("failed to parse prereq owner name '%s'\n", lp);
 		return KNOT_EPARSEFAIL;
 	}
-	
+
 	rrp->r_ttl = 0; /* Set TTL = 0 when deleting. */
-	
+
 	/* When deleting whole RRSet, use ANY class */
 	if (rrp->r_data_length == 0) {
 		rrp->r_class = KNOT_CLASS_ANY;
 	} else {
 		rrp->r_class = KNOT_CLASS_NONE;
 	}
-	
+
 	/* Parsed RR */
 	DBG("%s: parsed rr cls=%u, ttl=%u, type=%u (rdata len=%u)\n",
 	    __func__, rrp->r_class, rrp->r_ttl,rrp->r_type, rrp->r_data_length);
-	
+
 	return pkt_append(params, UP_DEL); /* Append to packet. */
 }
 
 int cmd_class(const char* lp, nsupdate_params_t *params)
 {
 	DBG("%s: lp='%s'\n", __func__, lp);
-	
+
 	uint16_t cls;
 
 	if (knot_rrclass_from_string(lp, &cls) != 0) {
@@ -562,21 +562,21 @@ int cmd_class(const char* lp, nsupdate_params_t *params)
 		scanner_t *s = params->rrp;
 		s->default_class = params->class_num;
 	}
-	
+
 	return KNOT_EOK;
 }
 
 int cmd_ttl(const char* lp, nsupdate_params_t *params)
 {
 	DBG("%s: lp='%s'\n", __func__, lp);
-	
+
 	uint32_t ttl = 0;
 
 	if (params_parse_num(lp, &ttl) != KNOT_EOK) {
 		return KNOT_EPARSEFAIL;
 	}
 
-	nsupdate_set_ttl(params, ttl);	
+	nsupdate_set_ttl(params, ttl);
 
 	return KNOT_EOK;
 }
@@ -603,12 +603,12 @@ int cmd_prereq_domain(const char *lp, nsupdate_params_t *params, unsigned type)
 int cmd_prereq_rrset(const char *lp, nsupdate_params_t *params, unsigned type)
 {
 	DBG("%s: lp='%s'\n", __func__, lp);
-	
+
 	scanner_t *rrp = params->rrp;
 	if (parse_partial_rr(rrp, lp, 0) != KNOT_EOK) {
 		return KNOT_EPARSEFAIL;
 	}
-	
+
 	/* Check owner name. */
 	if (rrp->r_owner_length == 0) {
 		ERR("failed to parse prereq owner name '%s'\n", lp);
@@ -618,19 +618,19 @@ int cmd_prereq_rrset(const char *lp, nsupdate_params_t *params, unsigned type)
 	/* Parsed RR */
 	DBG("%s: parsed rr cls=%u, ttl=%u, type=%u (rdata len=%u)\n",
 	    __func__, rrp->r_class, rrp->r_ttl,rrp->r_type, rrp->r_data_length);
-	
+
 	return KNOT_EOK;
 }
 
 int cmd_prereq(const char* lp, nsupdate_params_t *params)
 {
 	DBG("%s: lp='%s'\n", __func__, lp);
-	
+
 	/* Scan prereq specifier ([ny]xrrset|[ny]xdomain) */
 	int ret = KNOT_EOK;
 	int bp = tok_find(lp, pq_array);
 	if (bp < 0) return bp; /* Syntax error. */
-	
+
 	const char *tok = pq_array[bp];
 	DBG("%s: type %s\n", __func__, TOK_S(tok));
 	lp = tok_skipspace(lp + TOK_L(tok));
@@ -646,7 +646,7 @@ int cmd_prereq(const char* lp, nsupdate_params_t *params)
 	default:
 		return KNOT_ERROR;
 	}
-	
+
 	/* Append to packet. */
 	if (ret == KNOT_EOK) {
 		scanner_t *s = params->rrp;
@@ -657,10 +657,10 @@ int cmd_prereq(const char* lp, nsupdate_params_t *params)
 		} else { /* NX{RRSET,DOMAIN} - cls NONE */
 			s->r_class = KNOT_CLASS_NONE;
 		}
-		
+
 		ret = pkt_append(params, bp);
 	}
-	
+
 	return ret;
 }
 
@@ -668,7 +668,7 @@ int cmd_send(const char* lp, nsupdate_params_t *params)
 {
 	DBG("%s: lp='%s'\n", __func__, lp);
 	DBG("sending packet\n");
-	
+
 	/* Create wireformat. */
 	int ret = KNOT_EOK;
 	uint8_t *wire = NULL;
@@ -732,7 +732,7 @@ int cmd_send(const char* lp, nsupdate_params_t *params)
 		free_sign_context(&sign_ctx);
 		return ret;
 	}
-	
+
 	/* Check signature if expected. */
 	if (params->key_params.name) {
 		ret = verify_packet(params->resp, &sign_ctx, &params->key_params);
@@ -752,23 +752,23 @@ int cmd_send(const char* lp, nsupdate_params_t *params)
 	if (rcode && rcode->id > KNOT_RCODE_NOERROR) {
 		ERR("update failed: %s\n", rcode->name);
 	}
-	
+
 	/*! \todo Should we check TC bit? */
-	
+
 	return KNOT_EOK;
 }
 
 int cmd_zone(const char* lp, nsupdate_params_t *params)
 {
 	DBG("%s: lp='%s'\n", __func__, lp);
-	
+
 	/* Check zone name. */
 	size_t len = strcspn(lp, SEP_CHARS);
 	if (!dname_isvalid(lp, len)) {
 		ERR("failed to parse zone '%s'\n", lp);
 		return KNOT_EPARSEFAIL;
 	}
-	
+
 	params->zone = strndup(lp, len);
 	return KNOT_EOK;
 }
@@ -776,13 +776,13 @@ int cmd_zone(const char* lp, nsupdate_params_t *params)
 int cmd_server(const char* lp, nsupdate_params_t *params)
 {
 	DBG("%s: lp='%s'\n", __func__, lp);
-	
+
 	/* Parse host. */
 	server_t *srv = parse_host(lp, DEFAULT_DNS_PORT);
-	
+
 	/* Enqueue. */
 	if (!srv) return KNOT_ENOMEM;
-	
+
 	server_free(params->server);
 	params->server = srv;
 
@@ -792,7 +792,7 @@ int cmd_server(const char* lp, nsupdate_params_t *params)
 int cmd_local(const char* lp, nsupdate_params_t *params)
 {
 	DBG("%s: lp='%s'\n", __func__, lp);
-	
+
 	/* Parse host. */
 	server_t *srv = parse_host(lp, "0");
 
@@ -832,8 +832,8 @@ int cmd_key(const char* lp, nsupdate_params_t *params)
 	DBG("%s: lp='%s'\n", __func__, lp);
 	char *kstr = strdup(lp); /* Convert to default format. */
 	if (!kstr) return KNOT_ENOMEM;
-	
-	
+
+
 	int ret = KNOT_EOK;
 	size_t len = strcspn(lp, SEP_CHARS);
 	if(kstr[len] == '\0') {
@@ -846,7 +846,7 @@ int cmd_key(const char* lp, nsupdate_params_t *params)
 		kstr[len] = ':'; /* Replace ' ' with ':' sep */
 		ret = params_parse_tsig(kstr, &params->key_params);
 	}
-	
+
 	free(kstr);
 	return ret;
 }
diff --git a/src/utils/nsupdate/nsupdate_exec.h b/src/utils/nsupdate/nsupdate_exec.h
index 7230a4e7a4946c0c98d0afca9cf34b2a7bf3162c..439a416bc69f03fdbac891fc8b76ee3441a481cf 100644
--- a/src/utils/nsupdate/nsupdate_exec.h
+++ b/src/utils/nsupdate/nsupdate_exec.h
@@ -18,7 +18,7 @@
  *
  * \author Marek Vavrusa <marek.vavrusa@nic.cz>
  *
- * \brief 
+ * \brief
  *
  * \addtogroup knot_utils
  * @{
@@ -34,4 +34,3 @@ int nsupdate_exec(nsupdate_params_t *params);
 #endif // _NSUPDATE__NSUPDATE_EXEC_H_
 
 /*! @} */
-
diff --git a/src/utils/nsupdate/nsupdate_main.c b/src/utils/nsupdate/nsupdate_main.c
index c96db657038aaa8e673c5e7c919214f42cb46cef..8bb56aeb87fc74f049650a77194d663d2b526ea3 100644
--- a/src/utils/nsupdate/nsupdate_main.c
+++ b/src/utils/nsupdate/nsupdate_main.c
@@ -23,7 +23,7 @@
 int main(int argc, char *argv[])
 {
 	int ret = EXIT_SUCCESS;
-	
+
 	nsupdate_params_t params;
 	if (nsupdate_parse(&params, argc, argv) == KNOT_EOK) {
 		if (nsupdate_exec(&params) != KNOT_EOK) {
@@ -36,4 +36,3 @@ int main(int argc, char *argv[])
 	nsupdate_clean(&params);
 	return ret;
 }
-
diff --git a/src/utils/nsupdate/nsupdate_params.c b/src/utils/nsupdate/nsupdate_params.c
index c148427db4fe2cc9f23b47ec73dde6df54c27946..c1e475fcce572a4420cf784cc3fc141b3d8467f7 100644
--- a/src/utils/nsupdate/nsupdate_params.c
+++ b/src/utils/nsupdate/nsupdate_params.c
@@ -246,4 +246,3 @@ int nsupdate_set_origin(nsupdate_params_t *params, const char *origin)
 	}
 	return ret;
 }
-
diff --git a/src/zscanner/file_loader.c b/src/zscanner/file_loader.c
index 88de9a8a2698bf24a336ce6eccc1cc1d0a1700e3..967482ea0ba570cf649f846672f9ef62b5e89c22 100644
--- a/src/zscanner/file_loader.c
+++ b/src/zscanner/file_loader.c
@@ -53,7 +53,7 @@ static int load_settings(file_loader_t *fl)
 	size_t buf_len = strlen(fl->file_name) + 100;
 	settings_name = malloc(buf_len);
 	ret = snprintf(settings_name, buf_len, "ZONE DEFAULTS <%s>",
-	               fl->file_name);
+		       fl->file_name);
 	if (ret < 0 || ret >= buf_len) {
 		free(settings_name);
 		return -1;
@@ -235,7 +235,7 @@ int file_loader_process(file_loader_t *fl)
 		// Artificial last block containing newline char only.
 		if (is_last_block == true && fl->scanner->stop == 0) {
 			ret = scanner_process(zone_termination,
-		  			      zone_termination + 1,
+					      zone_termination + 1,
 					      true,
 					      fl->scanner);
 		}
@@ -253,4 +253,3 @@ int file_loader_process(file_loader_t *fl)
 
 	return KNOT_EOK;
 }
-
diff --git a/src/zscanner/scanner.rl b/src/zscanner/scanner.rl
index f898cdc54975c3e021db9a869d5f443047ea721f..833e0439737e7441564217d473614e931d7922d1 100644
--- a/src/zscanner/scanner.rl
+++ b/src/zscanner/scanner.rl
@@ -184,4 +184,3 @@ int scanner_process(const char *start,
 
 	return 0;
 }
-
diff --git a/src/zscanner/scanner_body.rl b/src/zscanner/scanner_body.rl
index 31fb645eae3efae4e8508412b2570b788315174b..56712c00a503006dd0ca215c747999ae88de56fe 100644
--- a/src/zscanner/scanner_body.rl
+++ b/src/zscanner/scanner_body.rl
@@ -1892,4 +1892,3 @@
 	main := (record | directive | blank)*;
 	# END
 }%%
-
diff --git a/src/zscanner/scanner_functions.c b/src/zscanner/scanner_functions.c
index eae5ce374c75899ace416d06e988d6f08179d141..bd6cab70a22d0afc34426bd2d5534c5b8a23f0d0 100644
--- a/src/zscanner/scanner_functions.c
+++ b/src/zscanner/scanner_functions.c
@@ -981,4 +981,3 @@ int find_rdata_blocks(scanner_t *s)
 		return KNOT_EOK;
 	}
 }
-
diff --git a/src/zscanner/test/processing.c b/src/zscanner/test/processing.c
index 70e419b0ff651d65e348e309082f1115ca202545..e792866885fec4026d987de825d26c94cc1c948f 100644
--- a/src/zscanner/test/processing.c
+++ b/src/zscanner/test/processing.c
@@ -205,4 +205,3 @@ void dump_rdata(const scanner_t *s)
 		}
 	}
 }
-
diff --git a/src/zscanner/test/run_tests.sh b/src/zscanner/test/run_tests.sh
index 1414832c63f5de86a54cc368aa92251ef9c4391c..c85aa98f6279950aa7fa526ee490db3483956a7f 100755
--- a/src/zscanner/test/run_tests.sh
+++ b/src/zscanner/test/run_tests.sh
@@ -47,4 +47,3 @@ if [ $# -eq 0 ]; then
 else
 	rm -rf ${OUTS_DIR}
 fi
-
diff --git a/src/zscanner/test/tests.c b/src/zscanner/test/tests.c
index 53e13362a74ab2ea25ebdc3195b24d9f9a6925b2..887307c64ecc1a38786d1df547b405a3535ddf3e 100644
--- a/src/zscanner/test/tests.c
+++ b/src/zscanner/test/tests.c
@@ -80,4 +80,3 @@ int test__date_to_timestamp()
 
 	return 0;
 }
-
diff --git a/src/zscanner/test/tests/00_general.in b/src/zscanner/test/tests/00_general.in
index 4946599f39ae5b41b484631323348921c5563401..de9c3f079e66815fa455eb2717533e140ab0331d 100644
--- a/src/zscanner/test/tests/00_general.in
+++ b/src/zscanner/test/tests/00_general.in
@@ -17,7 +17,7 @@ t05			NS	@	; Missing CLASS and TTL
 	)	()	(		; Multiline 2/5
 
 				@	; Multiline 4/5
-		)	( 
+		)	(
 )					; Multiline 6/6
 
 ; KO
diff --git a/src/zscanner/test/tests/06-0_INCLUDE.in b/src/zscanner/test/tests/06-0_INCLUDE.in
index 4641ae1654f00e744df3d9c40eacdda50d8f4165..c01d46573223f9987b9bc35ff2d420f2728040b5 100644
--- a/src/zscanner/test/tests/06-0_INCLUDE.in
+++ b/src/zscanner/test/tests/06-0_INCLUDE.in
@@ -27,4 +27,3 @@ $INCLUDE /tmp/zscanner_tests/includes/include2	tld.	; Absolute path with origin
 
 ; KO
 $INCLUDE						; Empty parameters
-
diff --git a/src/zscanner/test/tests/06-1_INCLUDE.in b/src/zscanner/test/tests/06-1_INCLUDE.in
index 699ad7641841914aa7a343a10213c88640e2c00f..0eb3b64932151a59f8071a3c27ef20d3a02d1261 100644
--- a/src/zscanner/test/tests/06-1_INCLUDE.in
+++ b/src/zscanner/test/tests/06-1_INCLUDE.in
@@ -3,4 +3,3 @@ $TTL	1
 
 ; KO
 $INCLUDE ./includes/include1	a	; Origin is not FQD
-
diff --git a/src/zscanner/test/tests/06-2_INCLUDE.in b/src/zscanner/test/tests/06-2_INCLUDE.in
index f32385532075d71bb7e3d6f02db4322d9f32f35b..21bcf05390c2e380af6a389ceff7be1ef4f059ef 100644
--- a/src/zscanner/test/tests/06-2_INCLUDE.in
+++ b/src/zscanner/test/tests/06-2_INCLUDE.in
@@ -3,4 +3,3 @@ $TTL	1
 
 ; KO
 $INCLUDE ./includes/include1	%	; Bad origin
-
diff --git a/src/zscanner/test/tests/06-3_INCLUDE.in b/src/zscanner/test/tests/06-3_INCLUDE.in
index 0e4a5c13ef61c9afa9b42a7476b4e86b56f8557a..5d91f54648e40edd3b36a6bf9702f326405854b3 100644
--- a/src/zscanner/test/tests/06-3_INCLUDE.in
+++ b/src/zscanner/test/tests/06-3_INCLUDE.in
@@ -3,4 +3,3 @@ $TTL	1
 
 ; KO
 $INCLUDE /tmp/zscanner_tests/		; Given file is a directory
-
diff --git a/src/zscanner/test/tests/06-4_INCLUDE.in b/src/zscanner/test/tests/06-4_INCLUDE.in
index 118546e2467e06c41cbc2473a78736a97eb46244..aa50c61128352a8bb3e95549c5b45fb52bf99307 100644
--- a/src/zscanner/test/tests/06-4_INCLUDE.in
+++ b/src/zscanner/test/tests/06-4_INCLUDE.in
@@ -3,4 +3,3 @@ $TTL	1
 
 ; KO
 $INCLUDE /tmp/zscanner_tests/_		; File doesn't exist
-
diff --git a/src/zscanner/test/tests/29_CERT.in b/src/zscanner/test/tests/29_CERT.in
index c1b6e4acd1eca5840d2d394f8abd0c2f3754d991..c08c3f79de1792d727cad92c5eb6e53e5c180a3e 100644
--- a/src/zscanner/test/tests/29_CERT.in
+++ b/src/zscanner/test/tests/29_CERT.in
@@ -30,7 +30,7 @@ $TTL	1
 @	CERT	0	0	PRIVATEOID	AA==		; Algorithm mnemo
 @	CERT	0	0	0	Zm8=		; One char padding
 @	CERT	0	0	0	Zm9v		; Without padding
-@	CERT	0	0	0	Zm9vYg==	; Two base64 blocks 
+@	CERT	0	0	0	Zm9vYg==	; Two base64 blocks
 @	CERT	0	0	0	Zm9v YmE=	; Two base64 blocks with blank space between them
 @	TYPE37	\# 6 000000000000			; TYPE + Hexadecimal rdata
 @	TYPE37	0	0	0	AA==		; TYPE
diff --git a/src/zscanner/test/tests/30_KEY.in b/src/zscanner/test/tests/30_KEY.in
index 8d57bf5f49a654c26620bd0212640cf5a14c8202..392257fd896d3ce95bbbf98f099ee408960f2930 100644
--- a/src/zscanner/test/tests/30_KEY.in
+++ b/src/zscanner/test/tests/30_KEY.in
@@ -6,7 +6,7 @@ $TTL	1
 @	KEY	65535	255	255	AA==		; Maximal numbers
 @	KEY	0	0	0	Zm8=		; One char padding
 @	KEY	0	0	0	Zm9v		; Without padding
-@	KEY	0	0	0	Zm9vYg==	; Two base64 blocks 
+@	KEY	0	0	0	Zm9vYg==	; Two base64 blocks
 @	KEY	0	0	0	Zm9v YmE=	; Two base64 blocks with blank space between them
 @	TYPE25	\# 5 0000000000				; TYPE + Hexadecimal rdata
 @	TYPE25	0	0	0	AA==		; TYPE
diff --git a/src/zscanner/test/tests/31_DNSKEY.in b/src/zscanner/test/tests/31_DNSKEY.in
index 38cbce7ebfd3e4da089b4238fc6e8f32f63a78ef..0f99937473e814211416d9e3e5a4a969e7d32806 100644
--- a/src/zscanner/test/tests/31_DNSKEY.in
+++ b/src/zscanner/test/tests/31_DNSKEY.in
@@ -7,7 +7,7 @@ $TTL	1
 @	DNSKEY	0	0	RSAMD5	AA==		; Algorithm mnemonic
 @	DNSKEY	0	0	0	Zm8=		; One char padding
 @	DNSKEY	0	0	0	Zm9v		; Without padding
-@	DNSKEY	0	0	0	Zm9vYg==	; Two base64 blocks 
+@	DNSKEY	0	0	0	Zm9vYg==	; Two base64 blocks
 @	DNSKEY	0	0	0	Zm9v YmE=	; Two base64 blocks with blank space between them
 @	TYPE48	\# 5 0000000000				; TYPE + Hexadecimal rdata
 @	TYPE48	0	0	0	AA==		; TYPE
diff --git a/src/zscanner/test/tests/32_APL.in b/src/zscanner/test/tests/32_APL.in
index ee93bcb754f89b2dfeadf3b4bd0fe2746a449bb8..56f2c232959cebcbe49efb29759f1a209487b9eb 100644
--- a/src/zscanner/test/tests/32_APL.in
+++ b/src/zscanner/test/tests/32_APL.in
@@ -18,8 +18,8 @@ $TTL	1
 
 ; KO
 @	APL	0:0.0.0.0/32		; Bad address family
-@	APL	x:0.0.0.0/32		; Bad address family 
-@	APL	!x:0.0.0.0/32		; Bad address family 
+@	APL	x:0.0.0.0/32		; Bad address family
+@	APL	!x:0.0.0.0/32		; Bad address family
 @	APL	1:0.0.0.0/33		; Prefix length is too long
 @	APL	2:0::0/129		; Prefix length is too long
 @	APL	2::/0			; Bad ipv6 address
diff --git a/src/zscanner/test/tests/36_RRSIG.in b/src/zscanner/test/tests/36_RRSIG.in
index 5b1a938e6da4a84f229d193feb208b6a1f41b67e..700c152d155cb88e53e104b01537a08c0bde9898 100644
--- a/src/zscanner/test/tests/36_RRSIG.in
+++ b/src/zscanner/test/tests/36_RRSIG.in
@@ -6,12 +6,12 @@ $TTL	1
 @	RRSIG	A	2	3	4	5	6	7	\008.	CQ==	; Human visual test - block numbering
 @	RRSIG	TYPE65535	255	255	4294967295	4294967295	4294967295	65535	.	AA==	; Maximal numbers
 @	RRSIG	TYPE0	RSAMD5	0	0	0	0	0	.	AA==	; Algorithm mnemonic
-@	RRSIG	A	0	0	0	19700101000000	0	0	.	AA==	; Minimal date format	
+@	RRSIG	A	0	0	0	19700101000000	0	0	.	AA==	; Minimal date format
 @	RRSIG	A	0	0	0	0	21051231235959	0	.	AA==	; Maximal date format (zscanner limit)
 @	RRSIG	TYPE0	0	0	0	0	0	0	\0320\ \\\"\.\@\*.tld.	AA==	; Special chars in domain name
 @	RRSIG	A	0	0	0	0	0	0	.	Zm8=		; One char padding
 @	RRSIG	A	0	0	0	0	0	0	.	Zm9v		; Without padding
-@	RRSIG	A	0	0	0	0	0	0	.	Zm9vYg==	; Two base64 blocks 
+@	RRSIG	A	0	0	0	0	0	0	.	Zm9vYg==	; Two base64 blocks
 @	RRSIG	A	0	0	0	0	0	0	.	Zm9v YmE=	; Two base64 blocks with blank space between them
 @	TYPE46	\# 20 000100000000000000000000000000000000 00 00			; TYPE + Hexadecimal rdata
 @	TYPE46	A       0       0       0       0       0       0       .       AA==	; TYPE
@@ -34,11 +34,11 @@ $TTL	1
 @	RRSIG	A	0	0	0	0	2106010100000x	0	.	AA==	; Bad timestamp char
 @	RRSIG	A	0	0	0	0	210601010000000	0	.	AA==	; Bad timestamp length
 @	RRSIG	A	0	0	0	0	0	0	a%	AA==	; Bad domain char
-@	RRSIG	A	0	0	0	0	0	0	.	A	; Continuous block length must be multiple of 4	
+@	RRSIG	A	0	0	0	0	0	0	.	A	; Continuous block length must be multiple of 4
 @	RRSIG	A	0	0	0	0	0	0	.	AB	; Continuous block length must be multiple of 4
 @	RRSIG	A	0	0	0	0	0	0	.	ABC	; Continuous block length must be multiple of 4
 @	RRSIG	A	0	0	0	0	0	0	.	AA ==	; Continuous block length must be multiple of 4
-@	RRSIG	A	0	0	0	0	0	0	.	A===	; Bad padding	
+@	RRSIG	A	0	0	0	0	0	0	.	A===	; Bad padding
 @	RRSIG	A	0	0	0	0	0	0	.	=	; Bad padding
 @	RRSIG	A	0	0	0	0	0	0	.	==	; Bad padding
 @	RRSIG	A	0	0	0	0	0	0	.	===	; Bad padding
diff --git a/src/zscanner/test/tests/38_DHCID.in b/src/zscanner/test/tests/38_DHCID.in
index 9a1033d7c74f1424e72fe588de3037ab29aa6683..30f5c006e43a581ec96b6fef81281962ea225b3b 100644
--- a/src/zscanner/test/tests/38_DHCID.in
+++ b/src/zscanner/test/tests/38_DHCID.in
@@ -5,7 +5,7 @@ $TTL	1
 @	DHCID	AA==		; The simplest variant
 @	DHCID	Zm8=		; One char padding
 @	DHCID	Zm9v		; Without padding
-@	DHCID	Zm9vYg==	; Two base64 blocks 
+@	DHCID	Zm9vYg==	; Two base64 blocks
 @	DHCID	Zm9v YmE=	; Two base64 blocks with blank space between them
 @	TYPE49	\# 1 00		; TYPE + Hexadecimal rdata
 @	TYPE49	AA==		; TYPE
diff --git a/src/zscanner/test/tests/42_LOC.in b/src/zscanner/test/tests/42_LOC.in
index 7aae50f7dc3d23d08c79f15b6e5093bef05e53a0..6ff32004f6c0c3b13131b4a1f5d188873128bd12 100644
--- a/src/zscanner/test/tests/42_LOC.in
+++ b/src/zscanner/test/tests/42_LOC.in
@@ -3,7 +3,7 @@ $TTL	1
 
 ; OK
 @	LOC	1     N 1     E	0			; The simplest case
-@	LOC	0 1   N 1     E 0			; Combination of parameters 
+@	LOC	0 1   N 1     E 0			; Combination of parameters
 @	LOC	0 0 1 N 1     E 0			; Combination of parameters
 @	LOC	1     N 0 1   E 0			; Combination of parameters
 @	LOC	1     N 0 0 1 E 0			; Combination of parameters
@@ -22,7 +22,7 @@ $TTL	1
 @	LOC	0     S 0 0 1.0   W 0			; Float dd.ddd test
 @	LOC	0     S 0 0 10    W 0			; Float dd.ddd test
 @	LOC	0     S 0     W 0 0.01			; Number to [mantisa,exponent] test
-@	LOC	0     S 0     W 0 0.10			; Number to [mantisa,exponent] test 
+@	LOC	0     S 0     W 0 0.10			; Number to [mantisa,exponent] test
 @	LOC	0     S 0     W 0 1.0			; Number to [mantisa,exponent] test
 @	LOC	0     S 0     W 0 10			; Number to [mantisa,exponent] test
 @	LOC	0     S 0     W 0 100			; Number to [mantisa,exponent] test
diff --git a/src/zscanner/test/zscanner-tool.c b/src/zscanner/test/zscanner-tool.c
index 0853784c0ebd6d80dffad1a174b7a2ae206ad416..fa93b797e0b4765f240e18123c692a0b0dd9d908 100644
--- a/src/zscanner/test/zscanner-tool.c
+++ b/src/zscanner/test/zscanner-tool.c
@@ -157,4 +157,3 @@ int main(int argc, char *argv[])
 
 	return EXIT_SUCCESS;
 }
-
diff --git a/tests/Makefile b/tests/Makefile
index bd3e9aa92a6609a50e4192499c9132b37fb67b03..fdb97d1b7d04aa162e85c234d6ded2932e2a0c9f 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,16 +1,15 @@
 BASE = ../src
-CFLAGS += -std=gnu99 -g -I.. -I$(BASE) -I$(BASE)/libknot -I/usr/local/include 
+CFLAGS += -std=gnu99 -g -I.. -I$(BASE) -I$(BASE)/libknot -I/usr/local/include
 
 chkjournal: chkjournal.c $(BASE)/libknotd.la
-	libtool --mode=link $(CC) $(CFLAGS) chkjournal.c $(BASE)/libknotd.la -o chkjournal 
+	libtool --mode=link $(CC) $(CFLAGS) chkjournal.c $(BASE)/libknotd.la -o chkjournal
 chkjournal-i386:
 	@echo "!!! Make sure knot is compiled with -fpack-struct=4"
 	@grep -q -- "-fpack-struct=4" $(BASE)/Makefile || exit 1
-	libtool --mode=link $(CC) $(CFLAGS) -fpack-struct=4 chkjournal.c $(BASE)/libknotd.la -o chkjournal-i386 
+	libtool --mode=link $(CC) $(CFLAGS) -fpack-struct=4 chkjournal.c $(BASE)/libknotd.la -o chkjournal-i386
 chkjournal-amd64:
 	@echo "!!! Make sure knot is compiled with -fpack-struct=8"
 	@grep -q -- "-fpack-struct=8" $(BASE)/Makefile || exit 1
-	libtool --mode=link $(CC) $(CFLAGS) -fpack-struct=8 chkjournal.c $(BASE)/libknotd.la -o chkjournal-amd64 
+	libtool --mode=link $(CC) $(CFLAGS) -fpack-struct=8 chkjournal.c $(BASE)/libknotd.la -o chkjournal-amd64
 clean:
 	rm chkjournal chkjournal-i386 chkjournal-amd64
-
diff --git a/tests/chkjournal.c b/tests/chkjournal.c
index b429a877662184a912e97a769bb9557662ea7145..5bc287a717b522d31b195ece9c88ec7b432df54c 100644
--- a/tests/chkjournal.c
+++ b/tests/chkjournal.c
@@ -19,7 +19,7 @@
       (for this computer):  make chkjournal
       (for 32bit journals): make chkjournal-i386
       (for 64bit journal):  make chkjournal-amd64
-      
+
    !!! For specific versions, make sure the libknotd.la is compiled
    with -fpack-struct=4 for 32bit or -fpack-struct=8 for 64bit chkjournal.
    f.e.:
@@ -136,12 +136,12 @@ int fixcrc(const char *fname)
 	if (fd < 0) {
 		return 1;
 	}
-	
+
 	int ret = 1;
 	if (journal_update_crc(fd) == 0) {
 		ret = 0;
 	}
-	
+
 	close(fd);
 	return ret;
 }
@@ -175,7 +175,7 @@ int update(const char *fname)
 	if (fd < 0) {
 		return 1;
 	}
-	
+
 	/* Check source magic bytes. */
 	int rb = 0;
 	int ret = 0;
@@ -196,7 +196,7 @@ int update(const char *fname)
 			write(nfd, buf, sizeof(crc_t));
 			read(fd, buf, sizeof(uint16_t) * 3);
 			write(nfd, buf, sizeof(uint16_t) * 3);
-			
+
 			/* Copy nodes. */
 			uint16_t ncount = *((uint16_t*)buf) + 1;
 			printf("Will update %hu nodes.\n", ncount - 1);
@@ -211,7 +211,7 @@ int update(const char *fname)
 				read(fd, buf, PADDING);
 				write(nfd, buf, PADDING);
 			}
-			
+
 			/* Copy remaining. */
 			while((rb = read(fd, buf, sizeof(buf))) > 0) {
 				if (write(nfd, buf, rb) != rb) {
@@ -224,7 +224,7 @@ int update(const char *fname)
 				journal_update_crc(nfd);
 			}
 		}
-		
+
 		/* Replace if success. */
 		close(nfd);
 		close(fd);
@@ -243,7 +243,7 @@ int update(const char *fname)
 		int nfd = open(nfname, O_RDWR|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
 		size_t hs102 = (MAGIC_LENGTH + sizeof(crc_t) + sizeof(uint16_t) * 3);
 		const char nmbytes[] = "knot102";
-		
+
 		if (nfd >= 0) {
 			/* Copy header. */
 			lseek(fd, 0, SEEK_SET);
@@ -251,7 +251,7 @@ int update(const char *fname)
 			write(nfd, buf, hs102);
 			lseek(nfd, 0, SEEK_SET);
 			write(nfd, nmbytes, MAGIC_LENGTH);
-			
+
 			/* Read node count. */
 			lseek(fd, MAGIC_LENGTH + sizeof(crc_t), SEEK_SET);
 			uint16_t ncount = 0;
@@ -260,7 +260,7 @@ int update(const char *fname)
 			ncount += 1; /* Free segment. */
 			lseek(fd, hs102, SEEK_SET);
 			lseek(nfd, hs102, SEEK_SET);
-			
+
 			/* Extend nodes. */
 			/*! \todo Calculate offset from difference of struct size. */
 			for (uint16_t i = 0; i < ncount; ++i) {
@@ -270,7 +270,7 @@ int update(const char *fname)
 				/* Append 'next'. */
 				memset(buf, 0, sizeof(uint16_t));
 				write(nfd, buf, sizeof(uint16_t));
-				
+
 				/* Copy rest. */
 				read(fd, buf, a(2*sizeof(uint32_t)));
 				//*((uint32_t*)buf) += offs;
@@ -279,7 +279,7 @@ int update(const char *fname)
 				read(fd, buf, PADDING);
 				write(nfd, buf, PADDING);
 			}
-			
+
 			/* Copy remaining. */
 			while((rb = read(fd, buf, sizeof(buf))) > 0) {
 				if (write(nfd, buf, rb) != rb) {
@@ -292,7 +292,7 @@ int update(const char *fname)
 				journal_update_crc(nfd);
 			}
 		}
-		
+
 		/* Replace if success. */
 		close(nfd);
 		close(fd);
@@ -319,14 +319,14 @@ int update(const char *fname)
 		write(nfd, nmbytes, MAGIC_LENGTH);
 		journal_update_crc(nfd);
 		close(nfd);
-		
+
 		/* Fix crc. */
 		fixcrc(fname);
-		
+
 		/* Open as source journal. */
 		journal_t *src = journal_open(fname, 0, 0, 0);
 		assert(src != NULL);
-		
+
 		/* Recreate as new journal. */
 		char *nfname = malloc(strlen(fname) + 4 + 1);
 		assert(nfname != NULL);
@@ -335,7 +335,7 @@ int update(const char *fname)
 		journal_create(nfname, src->max_nodes);
 		journal_t *dst = journal_open(nfname, 0, 0, 0);
 		assert(dst != NULL);
-		
+
 		/* Convert journal entries, adding dummy flags. */
 		uint32_t flags = 1;
 		size_t i = src->qhead;
@@ -349,7 +349,7 @@ int update(const char *fname)
 		}
 		journal_close(src);
 		journal_close(dst);
-		
+
 		/* Switch journals. */
 		remove(fname);
 		rename(nfname, fname);
@@ -358,8 +358,8 @@ int update(const char *fname)
 	} else {
 		close(fd);
 	}
-	
-	
+
+
 	return ret;
 }
 
@@ -372,7 +372,7 @@ int xdump(const char *fname, uint64_t id)
 		fprintf(stderr, "error: couldn't open journal '%s'\n", fname);
 		return 1;
 	}
-	
+
 	int ret = 1;
 	journal_node_t *n = NULL;
 	journal_fetch(j, id, NULL, &n);
@@ -392,7 +392,7 @@ int xdump(const char *fname, uint64_t id)
 		free(buf);
 		ret = 0;
 	}
-	
+
 	journal_close(j);
 	return ret;
 }
@@ -406,14 +406,14 @@ int dump(const char *fname, uint64_t id)
 		fprintf(stderr, "error: couldn't open journal '%s'\n", fname);
 		return 1;
 	}
-	
+
 	journal_node_t *n = NULL;
 	journal_fetch(j, id, NULL, &n);
 	if (n == NULL) {
 		journal_close(j);
 		return 1;
 	}
-	
+
 	/* Reserve and read changeset. */
 	knot_changesets_t* chsets = malloc(sizeof(knot_changesets_t));
 	assert(chsets != NULL);
@@ -429,12 +429,12 @@ int dump(const char *fname, uint64_t id)
 	assert(chs->data != NULL);
 	journal_read(j, n->id, NULL, chs->data);
 	chs->size = chs->allocated = n->len;
-	
+
 	/* Unpack */
 	int ks = zones_changesets_from_binary(chsets);
 	printf("=== index %llu fpos=%u length=%u\n",
 	       (unsigned long long)id, n->pos, n->len);
-	
+
 	/* TODO: dump wireformat? */
 	printf("--- %zu records\n", chs->remove_count);
 	for (unsigned i = 0; i < chs->remove_count; ++i) {
@@ -466,7 +466,7 @@ int main(int argc, char *argv[])
 		{"help",   no_argument,       0, 'h'},
 		{0, 0, 0, 0}
 	};
-	
+
 	int c = 0, li = 0;
 	int action = SHOW;
 	uint64_t dump_id = 0;
@@ -500,20 +500,20 @@ int main(int argc, char *argv[])
 			return 1;
 		}
 	}
-	
+
 	/* Check if there's at least one remaining non-option. */
 	if (argc - optind < 1) {
 		help(argc, argv);
 		return 1;
 	}
 	const char *fname = argv[optind];
-	
+
 	/* Init log. */
 	log_init();
 	log_levels_set(LOGT_SYSLOG, LOG_ANY, 0);
 	log_levels_set(LOGT_STDERR, LOG_ANY, 0);
 	log_levels_set(LOGT_STDOUT, LOG_ANY, ~0);
-	
+
 	/* Execute operation. */
 	int ret = 0;
 	switch(action) {
@@ -536,6 +536,6 @@ int main(int argc, char *argv[])
 		fprintf(stderr, "Unsupported operation.\n");
 		break;
 	}
-	
+
 	return ret;
 }
diff --git a/tests/querytcp.c b/tests/querytcp.c
index 7e1418f25e73426913833f45bdf94c9e7c05d309..d90029885bee0e9f9ee2075e9a7e467dfa77e9c2 100644
--- a/tests/querytcp.c
+++ b/tests/querytcp.c
@@ -161,7 +161,7 @@ struct dnsheader  {
  |QR|   Opcode  |AA|TC|RD|RA|   Z    |   RCODE   |
  +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
 */
-	
+
 struct queries {
 	struct tcpdns {
 		unsigned short len;
@@ -709,7 +709,7 @@ void query()
 
 void usage()
 {
-	fprintf(stderr, 
+	fprintf(stderr,
 "querytcp [-d datafile] [-s server_addr] [-p port] [-q num_queries] [-t timeout] [l limit] [-4] [-6] [-h]\n"
 "  -d specifies the input data file (default: stdin)\n"
 "  -s sets the server to query (default: 127.0.0.1)\n"