diff --git a/.jenkins.d/10-ndn-cxx.sh b/.jenkins.d/10-ndn-cxx.sh
index 2af7d6a..1e0fdd7 100755
--- a/.jenkins.d/10-ndn-cxx.sh
+++ b/.jenkins.d/10-ndn-cxx.sh
@@ -2,30 +2,34 @@
 set -x
 set -e
 
+JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+source "$JDIR"/util.sh
+
 pushd /tmp >/dev/null
 
-INSTALLED_VERSION=$((cd ndn-cxx && git rev-parse HEAD) 2>/dev/null || echo NONE)
+NDN_CXX_FOLDER=ndn-cxx-0.4.0-beta2-11-ge3e2505
 
-sudo rm -Rf ndn-cxx-latest
-git clone --depth 1 git://github.com/named-data/ndn-cxx ndn-cxx-latest
-LATEST_VERSION=$((cd ndn-cxx-latest && git rev-parse HEAD) 2>/dev/null || echo UNKNOWN)
-
-if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then
-    sudo rm -Rf ndn-cxx
-    mv ndn-cxx-latest ndn-cxx
-else
-    sudo rm -Rf ndn-cxx-latest
-fi
+sudo rm -Rf "$NDN_CXX_FOLDER"
 
 sudo rm -Rf /usr/local/include/ndn-cxx
 sudo rm -f /usr/local/lib/libndn-cxx*
 sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx*
 
-pushd ndn-cxx >/dev/null
+mkdir "$NDN_CXX_FOLDER"
+pushd "$NDN_CXX_FOLDER" > /dev/null
 
-./waf configure -j1 --color=yes --without-osx-keychain
+git init
+git fetch https://github.com/named-data/ndn-cxx master && git checkout e3e2505aa03e0b298e1a8dfc9876f1f8dafcaaba
+
+./waf configure -j1 --color=yes --enable-shared --disable-static --without-osx-keychain
 ./waf -j1 --color=yes
 sudo ./waf install -j1 --color=yes
 
 popd >/dev/null
 popd >/dev/null
+
+if has Linux $NODE_LABELS; then
+    sudo ldconfig
+elif has FreeBSD $NODE_LABELS; then
+    sudo ldconfig -a
+fi
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index e699edb..767cb16 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -1,53 +1,58 @@
 # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
 
-from waflib import Logs, Configure
+from waflib import Logs, Configure, Utils
 
 def options(opt):
     opt.add_option('--debug', '--with-debug', action='store_true', default=False, dest='debug',
                    help='''Compile in debugging mode without optimizations (-O0 or -Og)''')
 
 def configure(conf):
-    areCustomCxxflagsPresent = (len(conf.env.CXXFLAGS) > 0)
-    defaultFlags = ['-std=c++0x', '-std=c++11',
-                    '-stdlib=libc++', # clang on OSX < 10.9 by default uses a non
-                                      # C++11-compatible STL library
-                    '-Wall', '-Wno-long-long']
+    cxx = conf.env['CXX_NAME'] # CXX_NAME represents generic name of the compiler
+    if cxx == 'gcc':
+        flags = GccFlags()
+    elif cxx == 'clang':
+        flags = ClangFlags()
+    else:
+        flags = CompilerFlags()
+        Logs.warn('The code has not yet been tested with %s compiler' % cxx)
 
+    areCustomCxxflagsPresent = (len(conf.env.CXXFLAGS) > 0)
+
+    # General flags are always applied (e.g., selecting C++11 mode)
+    generalFlags = flags.getGeneralFlags(conf)
+    conf.add_supported_cxxflags(generalFlags['CXXFLAGS'])
+    conf.add_supported_linkflags(generalFlags['LINKFLAGS'])
+    conf.env.DEFINES += generalFlags['DEFINES']
+
+    # Debug or optimized CXXFLAGS and LINKFLAGS are applied only if the
+    # corresponding environment variables are not set.
+    # DEFINES are always applied.
     if conf.options.debug:
-        conf.define('_DEBUG', 1)
-        defaultFlags += ['-O0',
-                         '-Og', # gcc >= 4.8
-                         '-g3',
-                         '-fcolor-diagnostics', # clang
-                         '-fdiagnostics-color', # gcc >= 4.9
-                         '-Werror',
-                         '-Wno-error=deprecated-register',
-                         '-Wno-error=maybe-uninitialized', # Bug #1615
-                         '-Wno-error=unneeded-internal-declaration', # Bug #1588
-                         '-Wno-nested-anon-types',
-                        ]
+        extraFlags = flags.getDebugFlags(conf)
         if areCustomCxxflagsPresent:
-            missingFlags = [x for x in defaultFlags if x not in conf.env.CXXFLAGS]
+            missingFlags = [x for x in extraFlags['CXXFLAGS'] if x not in conf.env.CXXFLAGS]
             if len(missingFlags) > 0:
                 Logs.warn("Selected debug mode, but CXXFLAGS is set to a custom value '%s'"
                           % " ".join(conf.env.CXXFLAGS))
                 Logs.warn("Default flags '%s' are not activated" % " ".join(missingFlags))
-        else:
-            conf.add_supported_cxxflags(defaultFlags)
     else:
-        defaultFlags += ['-O2', '-g']
-        if not areCustomCxxflagsPresent:
-            conf.add_supported_cxxflags(defaultFlags)
+        extraFlags = flags.getOptimizedFlags(conf)
 
-    # clang on OSX < 10.9 by default uses a non C++11-compatible STL library
-    conf.add_supported_linkflags(['-stdlib=libc++'])
+    if not areCustomCxxflagsPresent:
+        conf.add_supported_cxxflags(extraFlags['CXXFLAGS'])
+        conf.add_supported_linkflags(extraFlags['LINKFLAGS'])
+
+    conf.env.DEFINES += extraFlags['DEFINES']
 
 @Configure.conf
 def add_supported_cxxflags(self, cxxflags):
     """
     Check which cxxflags are supported by compiler and add them to env.CXXFLAGS variable
     """
-    self.start_msg('Checking allowed compile-stage flags for c++ compiler')
+    if len(cxxflags) == 0:
+        return
+
+    self.start_msg('Checking supported CXXFLAGS')
 
     supportedFlags = []
     for flag in cxxflags:
@@ -62,7 +67,10 @@
     """
     Check which linkflags are supported by compiler and add them to env.LINKFLAGS variable
     """
-    self.start_msg('Checking allowed link-stage flags for c++ compiler')
+    if len(linkflags) == 0:
+        return
+
+    self.start_msg('Checking supported LINKFLAGS')
 
     supportedFlags = []
     for flag in linkflags:
@@ -71,3 +79,113 @@
 
     self.end_msg(' '.join(supportedFlags))
     self.env.LINKFLAGS = supportedFlags + self.env.LINKFLAGS
+
+
+class CompilerFlags(object):
+    def getGeneralFlags(self, conf):
+        """Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are always needed"""
+        return {'CXXFLAGS': [], 'LINKFLAGS': [], 'DEFINES': []}
+
+    def getDebugFlags(self, conf):
+        """Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are needed only in debug mode"""
+        return {'CXXFLAGS': [], 'LINKFLAGS': [], 'DEFINES': ['_DEBUG']}
+
+    def getOptimizedFlags(self, conf):
+        """Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are needed only in optimized mode"""
+        return {'CXXFLAGS': [], 'LINKFLAGS': [], 'DEFINES': ['NDEBUG']}
+
+class GccBasicFlags(CompilerFlags):
+    """
+    This class defines basic flags that work for both gcc and clang compilers
+    """
+    def getDebugFlags(self, conf):
+        flags = super(GccBasicFlags, self).getDebugFlags(conf)
+        flags['CXXFLAGS'] += ['-O0',
+                              '-g3',
+                              '-pedantic',
+                              '-Wall',
+                              '-Wextra',
+                              '-Werror',
+                              '-Wno-unused-parameter',
+                              '-Wno-error=maybe-uninitialized', # Bug #1615
+                              ]
+        return flags
+
+    def getOptimizedFlags(self, conf):
+        flags = super(GccBasicFlags, self).getOptimizedFlags(conf)
+        flags['CXXFLAGS'] += ['-O2',
+                              '-g',
+                              '-pedantic',
+                              '-Wall',
+                              '-Wextra',
+                              '-Wno-unused-parameter',
+                              ]
+        return flags
+
+class GccFlags(GccBasicFlags):
+    def getGeneralFlags(self, conf):
+        flags = super(GccFlags, self).getGeneralFlags(conf)
+        version = tuple(int(i) for i in conf.env['CC_VERSION'])
+        if version < (4, 6, 0):
+            conf.fatal('The version of gcc you are using (%s) is too old.\n' %
+                       '.'.join(conf.env['CC_VERSION']) +
+                       'The minimum supported gcc version is 4.6.0.')
+        elif version < (4, 7, 0):
+            flags['CXXFLAGS'] += ['-std=c++0x']
+        else:
+            flags['CXXFLAGS'] += ['-std=c++11']
+        if version < (4, 8, 0):
+            flags['DEFINES'] += ['_GLIBCXX_USE_NANOSLEEP'] # Bug #2499
+        return flags
+
+    def getDebugFlags(self, conf):
+        flags = super(GccFlags, self).getDebugFlags(conf)
+        version = tuple(int(i) for i in conf.env['CC_VERSION'])
+        if version < (5, 1, 0):
+            flags['CXXFLAGS'] += ['-Wno-missing-field-initializers']
+        flags['CXXFLAGS'] += ['-Og', # gcc >= 4.8
+                              '-fdiagnostics-color', # gcc >= 4.9
+                              ]
+        return flags
+
+    def getOptimizedFlags(self, conf):
+        flags = super(GccFlags, self).getOptimizedFlags(conf)
+        version = tuple(int(i) for i in conf.env['CC_VERSION'])
+        if version < (5, 1, 0):
+            flags['CXXFLAGS'] += ['-Wno-missing-field-initializers']
+        flags['CXXFLAGS'] += ['-fdiagnostics-color'] # gcc >= 4.9
+        return flags
+
+class ClangFlags(GccBasicFlags):
+    def getGeneralFlags(self, conf):
+        flags = super(ClangFlags, self).getGeneralFlags(conf)
+        flags['CXXFLAGS'] += ['-std=c++11']
+        if Utils.unversioned_sys_platform() == 'darwin':
+            flags['CXXFLAGS'] += ['-stdlib=libc++']
+            flags['LINKFLAGS'] += ['-stdlib=libc++']
+        return flags
+
+    def getDebugFlags(self, conf):
+        flags = super(ClangFlags, self).getDebugFlags(conf)
+        flags['CXXFLAGS'] += ['-fcolor-diagnostics',
+                              '-Wno-unused-local-typedef', # Bugs #2657 and #3209
+                              '-Wno-error=unneeded-internal-declaration', # Bug #1588
+                              '-Wno-error=deprecated-register',
+                              '-Wno-error=keyword-macro', # Bug #3235
+                              '-Wno-nested-anon-types',
+                              '-Wno-sign-compare',
+                              '-Wno-keyword-macro',
+                              '-Wno-error=ignored-qualifiers',
+                              '-Wno-error=infinite-recursion',
+                              ]
+        return flags
+
+    def getOptimizedFlags(self, conf):
+        flags = super(ClangFlags, self).getOptimizedFlags(conf)
+        flags['CXXFLAGS'] += ['-fcolor-diagnostics',
+                              '-Wno-unused-local-typedef', # Bugs #2657 and #3209
+                              '-Wno-nested-anon-types',
+                              '-Wno-sign-compare',
+                              '-Wno-keyword-macro',
+                              ]
+        return flags
diff --git a/docs/doxygen.conf.in b/docs/doxygen.conf.in
index c8ecebb..c85d71b 100644
--- a/docs/doxygen.conf.in
+++ b/docs/doxygen.conf.in
@@ -1782,18 +1782,6 @@
 
 XML_OUTPUT             = xml
 
-# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a
-# validating XML parser to check the syntax of the XML files.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_SCHEMA             =
-
-# The XML_DTD tag can be used to specify a XML DTD, which can be used by a
-# validating XML parser to check the syntax of the XML files.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-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 enabling this will significantly increase the size
@@ -1928,7 +1916,18 @@
 # recursively expanded use the := operator instead of the = operator.
 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
 
-PREDEFINED             =
+PREDEFINED             = DOXYGEN=1 \
+                         INIT_LOGGER(x)= \
+                         BOOST_STATIC_ASSERT(x)= \
+                         BOOST_CONCEPT_ASSERT(x)= \
+                         BOOST_CONCEPT_REQUIRES(x)= \
+                         DECL_OVERRIDE=override \
+                         PUBLIC_WITH_TESTS_ELSE_PRIVATE=private \
+                         PUBLIC_WITH_TESTS_ELSE_PROTECTED=protected \
+                         PROTECTED_WITH_TESTS_ELSE_PRIVATE=private \
+                         VIRTUAL_WITH_TESTS \
+                         DECL_CLASS_FINAL=final \
+                         DECL_FINAL=final
 
 # 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
diff --git a/nsync/sync-logging.h b/nsync/sync-logging.h
index 2bdc36b..fce13c2 100644
--- a/nsync/sync-logging.h
+++ b/nsync/sync-logging.h
@@ -28,7 +28,7 @@
 #include <log4cxx/logger.h>
 
 #define INIT_LOGGER(name) \
-  static log4cxx::LoggerPtr staticModuleLogger = log4cxx::Logger::getLogger (name);
+  static log4cxx::LoggerPtr staticModuleLogger = log4cxx::Logger::getLogger (name)
 
 #define _LOG_DEBUG(x) \
   LOG4CXX_DEBUG(staticModuleLogger, x);
diff --git a/nsync/sync-logic.cc b/nsync/sync-logic.cc
index 2e0169c..900c424 100644
--- a/nsync/sync-logic.cc
+++ b/nsync/sync-logic.cc
@@ -29,6 +29,7 @@
 
 #include <boost/foreach.hpp>
 #include <boost/lexical_cast.hpp>
+#include <boost/thread.hpp>
 #include <vector>
 
 using namespace std;
diff --git a/nsync/sync-socket.cc b/nsync/sync-socket.cc
index 9c5ea9f..68eaa7d 100644
--- a/nsync/sync-socket.cc
+++ b/nsync/sync-socket.cc
@@ -20,7 +20,9 @@
 
 #include "sync-socket.h"
 #include "sync-logging.h"
+
 #include <boost/lexical_cast.hpp>
+#include <boost/thread.hpp>
 
 using namespace std;
 
diff --git a/src/tlv/adjacency-lsa.cpp b/src/tlv/adjacency-lsa.cpp
index e346e8a..b654b78 100644
--- a/src/tlv/adjacency-lsa.cpp
+++ b/src/tlv/adjacency-lsa.cpp
@@ -43,9 +43,9 @@
   wireDecode(block);
 }
 
-template<bool T>
+template<ndn::encoding::Tag TAG>
 size_t
-AdjacencyLsa::wireEncode(ndn::EncodingImpl<T>& block) const
+AdjacencyLsa::wireEncode(ndn::EncodingImpl<TAG>& block) const
 {
   size_t totalLength = 0;
 
@@ -63,10 +63,10 @@
 }
 
 template size_t
-AdjacencyLsa::wireEncode<true>(ndn::EncodingImpl<true>& block) const;
+AdjacencyLsa::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& encoder) const;
 
 template size_t
-AdjacencyLsa::wireEncode<false>(ndn::EncodingImpl<false>& block) const;
+AdjacencyLsa::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& encoder) const;
 
 const ndn::Block&
 AdjacencyLsa::wireEncode() const
diff --git a/src/tlv/adjacency-lsa.hpp b/src/tlv/adjacency-lsa.hpp
index 2fe5fc3..141386e 100644
--- a/src/tlv/adjacency-lsa.hpp
+++ b/src/tlv/adjacency-lsa.hpp
@@ -109,9 +109,9 @@
     return *this;
   }
 
-  template<bool T>
+  template<ndn::encoding::Tag TAG>
   size_t
-  wireEncode(ndn::EncodingImpl<T>& block) const;
+  wireEncode(ndn::EncodingImpl<TAG>& block) const;
 
   const ndn::Block&
   wireEncode() const;
diff --git a/src/tlv/adjacency.cpp b/src/tlv/adjacency.cpp
index 3a24356..05a206b 100644
--- a/src/tlv/adjacency.cpp
+++ b/src/tlv/adjacency.cpp
@@ -43,9 +43,9 @@
   wireDecode(block);
 }
 
-template<bool T>
+template<ndn::encoding::Tag TAG>
 size_t
-Adjacency::wireEncode(ndn::EncodingImpl<T>& encoder) const
+Adjacency::wireEncode(ndn::EncodingImpl<TAG>& encoder) const
 {
   size_t totalLength = 0;
 
@@ -63,10 +63,10 @@
 }
 
 template size_t
-Adjacency::wireEncode<true>(ndn::EncodingImpl<true>& block) const;
+Adjacency::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& block) const;
 
 template size_t
-Adjacency::wireEncode<false>(ndn::EncodingImpl<false>& block) const;
+Adjacency::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& block) const;
 
 const ndn::Block&
 Adjacency::wireEncode() const
diff --git a/src/tlv/adjacency.hpp b/src/tlv/adjacency.hpp
index 517bf42..2ad37b6 100644
--- a/src/tlv/adjacency.hpp
+++ b/src/tlv/adjacency.hpp
@@ -101,9 +101,9 @@
     return *this;
   }
 
-  template<bool T>
+  template<ndn::encoding::Tag TAG>
   size_t
-  wireEncode(ndn::EncodingImpl<T>& block) const;
+  wireEncode(ndn::EncodingImpl<TAG>& block) const;
 
   const ndn::Block&
   wireEncode() const;
diff --git a/src/tlv/coordinate-lsa.cpp b/src/tlv/coordinate-lsa.cpp
index efbac11..9bcdfd0 100644
--- a/src/tlv/coordinate-lsa.cpp
+++ b/src/tlv/coordinate-lsa.cpp
@@ -44,9 +44,9 @@
   wireDecode(block);
 }
 
-template<bool T>
+template<ndn::encoding::Tag TAG>
 size_t
-CoordinateLsa::wireEncode(ndn::EncodingImpl<T>& block) const
+CoordinateLsa::wireEncode(ndn::EncodingImpl<TAG>& block) const
 {
   size_t totalLength = 0;
   size_t doubleLength = 10;
@@ -70,10 +70,10 @@
 }
 
 template size_t
-CoordinateLsa::wireEncode<true>(ndn::EncodingImpl<true>& block) const;
+CoordinateLsa::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& block) const;
 
 template size_t
-CoordinateLsa::wireEncode<false>(ndn::EncodingImpl<false>& block) const;
+CoordinateLsa::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& block) const;
 
 const ndn::Block&
 CoordinateLsa::wireEncode() const
diff --git a/src/tlv/coordinate-lsa.hpp b/src/tlv/coordinate-lsa.hpp
index c769dfd..11ce6d5 100644
--- a/src/tlv/coordinate-lsa.hpp
+++ b/src/tlv/coordinate-lsa.hpp
@@ -103,9 +103,9 @@
     return *this;
   }
 
-  template<bool T>
+  template<ndn::encoding::Tag TAG>
   size_t
-  wireEncode(ndn::EncodingImpl<T>& block) const;
+  wireEncode(ndn::EncodingImpl<TAG>& block) const;
 
   const ndn::Block&
   wireEncode() const;
diff --git a/src/tlv/lsa-info.cpp b/src/tlv/lsa-info.cpp
index da3f189..28ddc10 100644
--- a/src/tlv/lsa-info.cpp
+++ b/src/tlv/lsa-info.cpp
@@ -47,9 +47,9 @@
   wireDecode(block);
 }
 
-template<bool T>
+template<ndn::encoding::Tag TAG>
 size_t
-LsaInfo::wireEncode(ndn::EncodingImpl<T>& encoder) const
+LsaInfo::wireEncode(ndn::EncodingImpl<TAG>& encoder) const
 {
   size_t totalLength = 0;
 
@@ -73,10 +73,10 @@
 }
 
 template size_t
-LsaInfo::wireEncode<true>(ndn::EncodingImpl<true>& block) const;
+LsaInfo::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& block) const;
 
 template size_t
-LsaInfo::wireEncode<false>(ndn::EncodingImpl<false>& block) const;
+LsaInfo::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& block) const;
 
 const ndn::Block&
 LsaInfo::wireEncode() const
diff --git a/src/tlv/lsa-info.hpp b/src/tlv/lsa-info.hpp
index 0cb186c..fc7cc91 100644
--- a/src/tlv/lsa-info.hpp
+++ b/src/tlv/lsa-info.hpp
@@ -114,9 +114,9 @@
     return m_hasInfiniteExpirationPeriod;
   }
 
-  template<bool T>
+  template<ndn::encoding::Tag TAG>
   size_t
-  wireEncode(ndn::EncodingImpl<T>& block) const;
+  wireEncode(ndn::EncodingImpl<TAG>& block) const;
 
   const ndn::Block&
   wireEncode() const;
diff --git a/src/tlv/lsdb-status.cpp b/src/tlv/lsdb-status.cpp
index dae40d3..e621798 100644
--- a/src/tlv/lsdb-status.cpp
+++ b/src/tlv/lsdb-status.cpp
@@ -45,9 +45,9 @@
   wireDecode(block);
 }
 
-template<bool T>
+template<ndn::encoding::Tag TAG>
 size_t
-LsdbStatus::wireEncode(ndn::EncodingImpl<T>& block) const
+LsdbStatus::wireEncode(ndn::EncodingImpl<TAG>& block) const
 {
   size_t totalLength = 0;
 
@@ -73,10 +73,10 @@
 }
 
 template size_t
-LsdbStatus::wireEncode<true>(ndn::EncodingImpl<true>& block) const;
+LsdbStatus::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& block) const;
 
 template size_t
-LsdbStatus::wireEncode<false>(ndn::EncodingImpl<false>& block) const;
+LsdbStatus::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& block) const;
 
 const ndn::Block&
 LsdbStatus::wireEncode() const
diff --git a/src/tlv/lsdb-status.hpp b/src/tlv/lsdb-status.hpp
index cc66d49..cf916b1 100644
--- a/src/tlv/lsdb-status.hpp
+++ b/src/tlv/lsdb-status.hpp
@@ -156,9 +156,9 @@
     return m_hasNameLsas;
   }
 
-  template<bool T>
+  template<ndn::encoding::Tag TAG>
   size_t
-  wireEncode(ndn::EncodingImpl<T>& block) const;
+  wireEncode(ndn::EncodingImpl<TAG>& block) const;
 
   const ndn::Block&
   wireEncode() const;
diff --git a/src/tlv/name-lsa.cpp b/src/tlv/name-lsa.cpp
index c60b0b4..2542989 100644
--- a/src/tlv/name-lsa.cpp
+++ b/src/tlv/name-lsa.cpp
@@ -43,9 +43,9 @@
   wireDecode(block);
 }
 
-template<bool T>
+template<ndn::encoding::Tag TAG>
 size_t
-NameLsa::wireEncode(ndn::EncodingImpl<T>& block) const
+NameLsa::wireEncode(ndn::EncodingImpl<TAG>& block) const
 {
   size_t totalLength = 0;
 
@@ -63,10 +63,10 @@
 }
 
 template size_t
-NameLsa::wireEncode<true>(ndn::EncodingImpl<true>& block) const;
+NameLsa::wireEncode<ndn::encoding::EncoderTag>(ndn::EncodingImpl<ndn::encoding::EncoderTag>& block) const;
 
 template size_t
-NameLsa::wireEncode<false>(ndn::EncodingImpl<false>& block) const;
+NameLsa::wireEncode<ndn::encoding::EstimatorTag>(ndn::EncodingImpl<ndn::encoding::EstimatorTag>& block) const;
 
 const ndn::Block&
 NameLsa::wireEncode() const
diff --git a/src/tlv/name-lsa.hpp b/src/tlv/name-lsa.hpp
index 2b58283..8a5337d 100644
--- a/src/tlv/name-lsa.hpp
+++ b/src/tlv/name-lsa.hpp
@@ -108,9 +108,9 @@
     return *this;
   }
 
-  template<bool T>
+  template<ndn::encoding::Tag TAG>
   size_t
-  wireEncode(ndn::EncodingImpl<T>& block) const;
+  wireEncode(ndn::EncodingImpl<TAG>& block) const;
 
   const ndn::Block&
   wireEncode() const;
diff --git a/tests/identity-fixture.cpp b/tests/identity-fixture.cpp
index 36ab807..3efdf00 100644
--- a/tests/identity-fixture.cpp
+++ b/tests/identity-fixture.cpp
@@ -95,5 +95,8 @@
 };
 
 BOOST_GLOBAL_FIXTURE(IdentityFixture)
+#if BOOST_VERSION >= 105900
+;
+#endif // BOOST_VERSION >= 105900
 
 } // namespace nlsr
diff --git a/tests/publisher/publisher-fixture.hpp b/tests/publisher/publisher-fixture.hpp
index 07da594..2edb668 100644
--- a/tests/publisher/publisher-fixture.hpp
+++ b/tests/publisher/publisher-fixture.hpp
@@ -86,7 +86,7 @@
     CoordinateLsa lsa(origin, CoordinateLsa::TYPE_STRING, 1, ndn::time::system_clock::now(),
                       radius, angle);
 
-    return std::move(lsa);
+    return lsa;
   }
 
   void
diff --git a/tests/test-conf-parameter.cpp b/tests/test-conf-parameter.cpp
index 18eebdc..f773fd5 100644
--- a/tests/test-conf-parameter.cpp
+++ b/tests/test-conf-parameter.cpp
@@ -75,7 +75,7 @@
 
   BOOST_CHECK_EQUAL(cp1.getRouterPrefix(), "/ATT/memphis/router1");
 
-  BOOST_CHECK_EQUAL(cp1.getInterestRetryNumber(), (uint32_t)2);
+  BOOST_CHECK_EQUAL(cp1.getInterestRetryNumber(), 2);
 
   BOOST_CHECK_EQUAL(cp1.getInterestResendTime(), 1000);
 
diff --git a/tools/nlsrc.cpp b/tools/nlsrc.cpp
index fad8fc3..3d43a62 100644
--- a/tools/nlsrc.cpp
+++ b/tools/nlsrc.cpp
@@ -351,7 +351,7 @@
   const ndn::Name& originRouterName = info.getOriginRouter();
 
   const auto& pair =
-    m_routers.insert(std::make_pair(originRouterName, std::move(Router())));
+    m_routers.insert(std::make_pair(originRouterName, Router()));
 
   return pair.first->second;
 }
@@ -414,4 +414,4 @@
     return 2;
   }
   return 0;
-}
\ No newline at end of file
+}
diff --git a/wscript b/wscript
index 5d33053..c77a3e3 100644
--- a/wscript
+++ b/wscript
@@ -105,7 +105,7 @@
         name='nsync-objects',
         features='cxx',
         source=bld.path.ant_glob(['nsync/**/*.cc', 'nsync/**/*.proto']),
-        use='BOOST NDN_CXX OPENSSL',
+        use='BOOST NDN_CXX OPENSSL LOG4CXX',
         includes='nsync',
         export_includes='nsync',
         )
