diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f475e24..49216c8 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -9,7 +9,7 @@
 jobs:
   linux:
     runs-on: ${{ matrix.os }}
-    name: ${{ matrix.os }} build
+    name: ${{ matrix.os }}
 
     strategy:
       matrix:
@@ -17,7 +17,8 @@
 
     env:
       NODE_LABELS: "Linux Ubuntu ${{ matrix.os }}"
-      WAF_JOBS: 2
+      WAF_JOBS: 4
+      JOB_NAME: limited-build
 
     steps:
     - uses: actions/checkout@v2
@@ -25,3 +26,43 @@
     - name: Run build script
       run: |
         ./.jenkins
+
+  ubuntu-ppa:
+    runs-on: ubuntu-latest
+    name: Ubuntu PPA build
+
+    steps:
+    - uses: actions/checkout@v2
+
+    - name: Run build script
+      run: |
+        sudo apt install -y software-properties-common
+        sudo add-apt-repository ppa:named-data/ppa -y
+        sudo apt update
+        sudo apt-get install nfd libndn-cxx-dev libchronosync-dev
+        sudo apt-get install libcrypto++-dev libboost-all-dev qt5-default
+        ./waf --color=yes configure --debug
+        ./waf --color=yes build -j4
+
+  macos:
+    runs-on: ${{ matrix.os }}
+    continue-on-error: false
+    name: Xcode ${{ matrix.xcode }}
+
+    strategy:
+      matrix:
+        os: [macos-latest]
+        xcode: [11.3.1, 11.7, 12.2]
+
+    env:
+      WAF_JOBS: 4
+      JOB_NAME: limited-build
+
+    steps:
+    - uses: actions/checkout@v2
+
+    - name: Run build script
+      run: |
+        sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
+        export NODE_LABELS="OSX OSX-$(sw_vers -productVersion | cut -d . -f -2)"
+        ./.jenkins
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 462f6b1..0000000
--- a/.gitmodules
+++ /dev/null
@@ -1,4 +0,0 @@
-[submodule "ChronoSync"]
-	path = ChronoSync
-	url = git://github.com/named-data/ChronoSync.git
-	branch = master
diff --git a/.jenkins b/.jenkins
index 674d751..bc1c847 100755
--- a/.jenkins
+++ b/.jenkins
@@ -1,10 +1,32 @@
 #!/usr/bin/env bash
 set -e
+source .jenkins.d/util.sh
 
-DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+export CACHE_DIR=${CACHE_DIR:-/tmp}
+export WAF_JOBS=${WAF_JOBS:-1}
+[[ $JOB_NAME == *"code-coverage" ]] && export DISABLE_ASAN=yes
 
-for file in "$DIR"/.jenkins.d/*; do
+nanos() {
+    # Cannot use date(1) because macOS does not support %N format specifier
+    python3 -c 'import time; print(int(time.time() * 1e9))'
+}
+
+for file in .jenkins.d/*; do
     [[ -f $file && -x $file ]] || continue
-    echo "Run: $file"
+
+    if [[ -n $TRAVIS ]]; then
+        label=$(basename "$file" | sed -E 's/[[:digit:]]+-(.*)\..*/\1/')
+        echo -ne "travis_fold:start:${label}\r"
+        echo -ne "travis_time:start:${label}\r"
+        start=$(nanos)
+    fi
+
+    echo "\$ $file"
     "$file"
+
+    if [[ -n $TRAVIS ]]; then
+        finish=$(nanos)
+        echo -ne "travis_time:end:${label}:start=${start},finish=${finish},duration=$((finish-start)),event=${label}\r"
+        echo -ne "travis_fold:end:${label}\r"
+    fi
 done
diff --git a/.jenkins.d/00-deps.sh b/.jenkins.d/00-deps.sh
index 261097c..34d006e 100755
--- a/.jenkins.d/00-deps.sh
+++ b/.jenkins.d/00-deps.sh
@@ -1,25 +1,37 @@
 #!/usr/bin/env bash
-set -x
-set -e
-
-JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-source "$JDIR"/util.sh
-
-[[ -n $NODE_LABELS ]] || exit 0
+set -ex
 
 if has OSX $NODE_LABELS; then
-    brew update
-    brew upgrade
-    brew install boost pkg-config qt4
-    brew cleanup
-fi
+    FORMULAE=(boost openssl pkg-config qt)
+    if has OSX-10.13 $NODE_LABELS || has OSX-10.14 $NODE_LABELS; then
+        FORMULAE+=(python)
+    fi
 
-if has Ubuntu $NODE_LABELS; then
-    sudo apt-get update -qq -y
-    sudo apt-get -qq -y install build-essential
-    sudo apt-get -qq -y install libssl-dev libsqlite3-dev
+    if [[ -n $GITHUB_ACTIONS ]]; then
+        # Homebrew doesn't have cryptopp packages, so build from source
+        git clone https://github.com/weidai11/cryptopp/
+        cd cryptopp
+        make -j4
+        make install
+        cd ..
 
-    sudo apt-get -qq -y install libprotobuf-dev protobuf-compiler libevent-dev libcrypto++-dev
-    sudo apt-get -qq -y install libboost-all-dev
-    sudo apt-get -qq -y install qt5-default
-fi
+        # Travis images come with a large number of pre-installed
+        # brew packages, don't waste time upgrading all of them
+        for FORMULA in "${FORMULAE[@]}"; do
+            brew list --versions "$FORMULA" || brew install "$FORMULA"
+        done
+
+        brew link qt --force
+    else
+        brew update
+        brew upgrade
+        brew install "${FORMULAE[@]}"
+        brew cleanup
+    fi
+
+elif has Ubuntu $NODE_LABELS; then
+    sudo apt-get -qq update
+    sudo apt-get -qy install g++ pkg-config python3-minimal \
+                             libboost-all-dev libssl-dev libsqlite3-dev \
+                             libcrypto++-dev qt5-default
+fi
\ No newline at end of file
diff --git a/.jenkins.d/01-ndn-cxx.sh b/.jenkins.d/01-ndn-cxx.sh
new file mode 100755
index 0000000..4e0e154
--- /dev/null
+++ b/.jenkins.d/01-ndn-cxx.sh
@@ -0,0 +1,55 @@
+#!/usr/bin/env bash
+set -ex
+
+pushd "$CACHE_DIR" >/dev/null
+
+INSTALLED_VERSION=
+if has OSX $NODE_LABELS; then
+    BOOST=$(brew ls --versions boost)
+    OLD_BOOST=$(cat boost.txt || :)
+    if [[ $OLD_BOOST != $BOOST ]]; then
+        echo "$BOOST" > boost.txt
+        INSTALLED_VERSION=NONE
+    fi
+fi
+
+if [[ -z $INSTALLED_VERSION ]]; then
+    INSTALLED_VERSION=$(git -C ndn-cxx rev-parse HEAD 2>/dev/null || echo NONE)
+fi
+
+sudo rm -rf ndn-cxx-latest
+git clone --depth 1 https://github.com/named-data/ndn-cxx.git ndn-cxx-latest
+LATEST_VERSION=$(git -C ndn-cxx-latest 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 -f /usr/local/bin/ndnsec*
+sudo rm -fr /usr/local/include/ndn-cxx
+sudo rm -f /usr/local/lib{,64}/libndn-cxx*
+sudo rm -f /usr/local/lib{,64}/pkgconfig/libndn-cxx.pc
+
+pushd ndn-cxx >/dev/null
+
+if has CentOS-8 $NODE_LABELS; then
+    # https://bugzilla.redhat.com/show_bug.cgi?id=1721553
+    PCH="--without-pch"
+fi
+
+./waf --color=yes configure --disable-static --enable-shared --without-osx-keychain $PCH
+./waf --color=yes build -j$WAF_JOBS
+sudo_preserve_env PATH -- ./waf --color=yes install
+
+popd >/dev/null
+popd >/dev/null
+
+if has CentOS-8 $NODE_LABELS; then
+    sudo tee /etc/ld.so.conf.d/ndn.conf >/dev/null <<< /usr/local/lib64
+fi
+if has Linux $NODE_LABELS; then
+    sudo ldconfig
+fi
diff --git a/.jenkins.d/02-chronosync.sh b/.jenkins.d/02-chronosync.sh
new file mode 100755
index 0000000..642e469
--- /dev/null
+++ b/.jenkins.d/02-chronosync.sh
@@ -0,0 +1,46 @@
+#!/usr/bin/env bash
+set -ex
+
+PROJ=ChronoSync
+
+pushd "$CACHE_DIR" >/dev/null
+
+INSTALLED_VERSION=
+NDN_CXX=$(ndnsec version)
+OLD_NDN_CXX=$(cat "$PROJ-ndn-cxx.txt" || :)
+if [[ $OLD_NDN_CXX != $NDN_CXX ]]; then
+    echo "$NDN_CXX" > "$PROJ-ndn-cxx.txt"
+    INSTALLED_VERSION=NONE
+fi
+
+if [[ -z $INSTALLED_VERSION ]]; then
+    INSTALLED_VERSION=$(git -C "$PROJ" rev-parse HEAD 2>/dev/null || echo NONE)
+fi
+
+sudo rm -rf "$PROJ-latest"
+git clone --depth 1 "https://github.com/named-data/$PROJ.git" "$PROJ-latest"
+LATEST_VERSION=$(git -C "$PROJ-latest" rev-parse HEAD 2>/dev/null || echo UNKNOWN)
+
+if [[ $INSTALLED_VERSION != $LATEST_VERSION ]]; then
+    sudo rm -rf "$PROJ"
+    mv "$PROJ-latest" "$PROJ"
+else
+    sudo rm -rf "$PROJ-latest"
+fi
+
+sudo rm -fr /usr/local/include/"$PROJ"
+sudo rm -f /usr/local/lib{,64}/lib"$PROJ"*
+sudo rm -f /usr/local/lib{,64}/pkgconfig/"$PROJ".pc
+
+pushd "$PROJ" >/dev/null
+
+./waf --color=yes configure
+./waf --color=yes build -j$WAF_JOBS
+sudo_preserve_env PATH -- ./waf --color=yes install
+
+popd >/dev/null
+popd >/dev/null
+
+if has Linux $NODE_LABELS; then
+    sudo ldconfig
+fi
diff --git a/.jenkins.d/10-build.sh b/.jenkins.d/10-build.sh
new file mode 100755
index 0000000..4dd6f6f
--- /dev/null
+++ b/.jenkins.d/10-build.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+set -ex
+
+git submodule sync
+git submodule update --init
+
+if [[ $JOB_NAME != *"limited-build" ]]; then
+    # Build in release mode with tests
+    ./waf --color=yes configure --with-tests
+    ./waf --color=yes build -j$WAF_JOBS
+
+    # Cleanup
+    ./waf --color=yes distclean
+
+    # Build in release mode without tests
+    ./waf --color=yes configure
+    ./waf --color=yes build -j$WAF_JOBS
+
+    # Cleanup
+    ./waf --color=yes distclean
+fi
+
+# Build in debug mode with tests
+./waf --color=yes configure --debug --with-tests
+./waf --color=yes build -j$WAF_JOBS
+
+# (tests will be run against the debug version)
+
+# Install
+sudo_preserve_env PATH -- ./waf --color=yes install
diff --git a/.jenkins.d/10-ndn-cxx.sh b/.jenkins.d/10-ndn-cxx.sh
deleted file mode 100755
index 841aa3f..0000000
--- a/.jenkins.d/10-ndn-cxx.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env bash
-set -x
-set -e
-
-pushd /tmp >/dev/null
-
-INSTALLED_VERSION=$((cd ndn-cxx && git rev-parse HEAD) 2>/dev/null || echo NONE)
-
-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 /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
-
-./waf configure --color=yes --enable-shared --disable-static --without-osx-keychain
-./waf --color=yes
-sudo ./waf install --color=yes
-
-popd >/dev/null
-popd >/dev/null
diff --git a/.jenkins.d/11-chronosync.sh b/.jenkins.d/11-chronosync.sh
deleted file mode 100755
index b7484fd..0000000
--- a/.jenkins.d/11-chronosync.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env bash
-set -x
-set -e
-
-sudo rm -Rf /usr/local/include/ChronoSync
-sudo rm -f /usr/local/lib/libChronoSync*
-sudo rm -f /usr/local/lib/pkgconfig/ChronoSync*
-
-
-# Update ChronoSync
-git submodule init
-git submodule update
-pushd ChronoSync >/dev/null
-sudo ./waf --color=yes distclean
-./waf --color=yes configure
-./waf --color=yes build
-sudo ./waf install --color=yes
-sudo ldconfig || true
-popd >/dev/null
diff --git a/.jenkins.d/20-build.sh b/.jenkins.d/20-build.sh
deleted file mode 100755
index 4174800..0000000
--- a/.jenkins.d/20-build.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-set -x
-set -e
-
-# Cleanup
-sudo ./waf --color=yes distclean
-
-# Configure/build in optimized mode with tests
-./waf --color=yes configure --debug --with-tests
-./waf --color=yes build
diff --git a/.jenkins.d/20-tests.sh b/.jenkins.d/20-tests.sh
new file mode 100755
index 0000000..c092071
--- /dev/null
+++ b/.jenkins.d/20-tests.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+set -ex
+
+# Prepare environment
+rm -rf ~/.ndn
+
+if has OSX $NODE_LABELS; then
+    security unlock-keychain -p named-data
+fi
+
+ndnsec-keygen "/tmp/jenkins/$NODE_NAME" | ndnsec-install-cert -
+
+# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
+ASAN_OPTIONS="color=always"
+ASAN_OPTIONS+=":check_initialization_order=1"
+ASAN_OPTIONS+=":detect_stack_use_after_return=1"
+ASAN_OPTIONS+=":strict_init_order=1"
+ASAN_OPTIONS+=":strict_string_checks=1"
+ASAN_OPTIONS+=":detect_invalid_pointer_pairs=2"
+ASAN_OPTIONS+=":detect_container_overflow=0"
+ASAN_OPTIONS+=":detect_leaks=0"
+ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
+export ASAN_OPTIONS
+
+export BOOST_TEST_BUILD_INFO=1
+export BOOST_TEST_COLOR_OUTPUT=1
+export BOOST_TEST_DETECT_MEMORY_LEAK=0
+export BOOST_TEST_LOGGER=HRF,test_suite,stdout:XML,all,build/xunit-log.xml
+
+# Run unit tests
+./build/unit-tests
diff --git a/.jenkins.d/30-tests.sh b/.jenkins.d/30-tests.sh
deleted file mode 100755
index 7e6610e..0000000
--- a/.jenkins.d/30-tests.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-set -x
-set -e
-
-# Prepare environment
-sudo rm -Rf ~/.ndn
-
-./build/unit-tests -l test_suite
diff --git a/.jenkins.d/util.sh b/.jenkins.d/util.sh
index 81c8931..8077a74 100644
--- a/.jenkins.d/util.sh
+++ b/.jenkins.d/util.sh
@@ -1,9 +1,39 @@
 has() {
+    local saved_xtrace
+    [[ $- == *x* ]] && saved_xtrace=-x || saved_xtrace=+x
+    set +x
+
     local p=$1
     shift
-    local x
-    for x in "$@"; do
-        [[ "${x}" == "${p}" ]] && return 0
+    local i ret=1
+    for i in "$@"; do
+        if [[ "${i}" == "${p}" ]]; then
+            ret=0
+            break
+        fi
     done
-    return 1
+
+    set ${saved_xtrace}
+    return ${ret}
 }
+export -f has
+
+sudo_preserve_env() {
+    local saved_xtrace
+    [[ $- == *x* ]] && saved_xtrace=-x || saved_xtrace=+x
+    set +x
+
+    local vars=()
+    while [[ $# -gt 0 ]]; do
+        local arg=$1
+        shift
+        case ${arg} in
+            --) break ;;
+            *)  vars+=("${arg}=${!arg}") ;;
+        esac
+    done
+
+    set ${saved_xtrace}
+    sudo env "${vars[@]}" "$@"
+}
+export -f sudo_preserve_env
diff --git a/.waf-tools/boost.py b/.waf-tools/boost.py
new file mode 100644
index 0000000..9feba3a
--- /dev/null
+++ b/.waf-tools/boost.py
@@ -0,0 +1,533 @@
+#!/usr/bin/env python
+# encoding: utf-8
+#
+# partially based on boost.py written by Gernot Vormayr
+# written by Ruediger Sonderfeld <ruediger@c-plusplus.de>, 2008
+# modified by Bjoern Michaelsen, 2008
+# modified by Luca Fossati, 2008
+# rewritten for waf 1.5.1, Thomas Nagy, 2008
+# rewritten for waf 1.6.2, Sylvain Rouquette, 2011
+
+'''
+
+This is an extra tool, not bundled with the default waf binary.
+To add the boost tool to the waf file:
+$ ./waf-light --tools=compat15,boost
+	or, if you have waf >= 1.6.2
+$ ./waf update --files=boost
+
+When using this tool, the wscript will look like:
+
+	def options(opt):
+		opt.load('compiler_cxx boost')
+
+	def configure(conf):
+		conf.load('compiler_cxx boost')
+		conf.check_boost(lib='system filesystem')
+
+	def build(bld):
+		bld(source='main.cpp', target='app', use='BOOST')
+
+Options are generated, in order to specify the location of boost includes/libraries.
+The `check_boost` configuration function allows to specify the used boost libraries.
+It can also provide default arguments to the --boost-mt command-line arguments.
+Everything will be packaged together in a BOOST component that you can use.
+
+When using MSVC, a lot of compilation flags need to match your BOOST build configuration:
+ - you may have to add /EHsc to your CXXFLAGS or define boost::throw_exception if BOOST_NO_EXCEPTIONS is defined.
+   Errors: C4530
+ - boost libraries will try to be smart and use the (pretty but often not useful) auto-linking feature of MSVC
+   So before calling `conf.check_boost` you might want to disabling by adding
+		conf.env.DEFINES_BOOST += ['BOOST_ALL_NO_LIB']
+   Errors:
+ - boost might also be compiled with /MT, which links the runtime statically.
+   If you have problems with redefined symbols,
+		self.env['DEFINES_%s' % var] += ['BOOST_ALL_NO_LIB']
+		self.env['CXXFLAGS_%s' % var] += ['/MD', '/EHsc']
+Passing `--boost-linkage_autodetect` might help ensuring having a correct linkage in some basic cases.
+
+'''
+
+import sys
+import re
+from waflib import Utils, Logs, Errors
+from waflib.Configure import conf
+from waflib.TaskGen import feature, after_method
+
+BOOST_LIBS = ['/usr/lib', '/usr/local/lib', '/opt/local/lib', '/sw/lib', '/lib']
+BOOST_INCLUDES = ['/usr/include', '/usr/local/include', '/opt/local/include', '/sw/include']
+
+BOOST_VERSION_FILE = 'boost/version.hpp'
+BOOST_VERSION_CODE = '''
+#include <iostream>
+#include <boost/version.hpp>
+int main() { std::cout << BOOST_LIB_VERSION << ":" << BOOST_VERSION << std::endl; }
+'''
+
+BOOST_ERROR_CODE = '''
+#include <boost/system/error_code.hpp>
+int main() { boost::system::error_code c; }
+'''
+
+PTHREAD_CODE = '''
+#include <pthread.h>
+static void* f(void*) { return 0; }
+int main() {
+	pthread_t th;
+	pthread_attr_t attr;
+	pthread_attr_init(&attr);
+	pthread_create(&th, &attr, &f, 0);
+	pthread_join(th, 0);
+	pthread_cleanup_push(0, 0);
+	pthread_cleanup_pop(0);
+	pthread_attr_destroy(&attr);
+}
+'''
+
+BOOST_THREAD_CODE = '''
+#include <boost/thread.hpp>
+int main() { boost::thread t; }
+'''
+
+BOOST_LOG_CODE = '''
+#include <boost/log/trivial.hpp>
+int main() { BOOST_LOG_TRIVIAL(info) << "boost_log is working"; }
+'''
+
+BOOST_LOG_SETUP_CODE = '''
+#include <boost/log/trivial.hpp>
+#include <boost/log/utility/setup/console.hpp>
+#include <boost/log/utility/setup/common_attributes.hpp>
+int main() {
+	using namespace boost::log;
+	add_common_attributes();
+	add_console_log(std::clog, keywords::format = "%Message%");
+	BOOST_LOG_TRIVIAL(info) << "boost_log_setup is working";
+}
+'''
+
+# toolsets from {boost_dir}/tools/build/v2/tools/common.jam
+PLATFORM = Utils.unversioned_sys_platform()
+detect_intel = lambda env: (PLATFORM == 'win32') and 'iw' or 'il'
+detect_clang = lambda env: (PLATFORM == 'darwin') and 'clang-darwin' or 'clang'
+detect_mingw = lambda env: (re.search('MinGW', env.CXX[0])) and 'mgw' or 'gcc'
+BOOST_TOOLSETS = {
+	'borland':  'bcb',
+	'clang':	detect_clang,
+	'como':	 'como',
+	'cw':	   'cw',
+	'darwin':   'xgcc',
+	'edg':	  'edg',
+	'g++':	  detect_mingw,
+	'gcc':	  detect_mingw,
+	'icpc':	 detect_intel,
+	'intel':	detect_intel,
+	'kcc':	  'kcc',
+	'kylix':	'bck',
+	'mipspro':  'mp',
+	'mingw':	'mgw',
+	'msvc':	 'vc',
+	'qcc':	  'qcc',
+	'sun':	  'sw',
+	'sunc++':   'sw',
+	'tru64cxx': 'tru',
+	'vacpp':	'xlc'
+}
+
+
+def options(opt):
+	opt = opt.add_option_group('Boost Options')
+	opt.add_option('--boost-includes', type='string',
+				   default='', dest='boost_includes',
+				   help='''path to the directory where the boost includes are,
+				   e.g., /path/to/boost_1_55_0/stage/include''')
+	opt.add_option('--boost-libs', type='string',
+				   default='', dest='boost_libs',
+				   help='''path to the directory where the boost libs are,
+				   e.g., path/to/boost_1_55_0/stage/lib''')
+	opt.add_option('--boost-mt', action='store_true',
+				   default=False, dest='boost_mt',
+				   help='select multi-threaded libraries')
+	opt.add_option('--boost-abi', type='string', default='', dest='boost_abi',
+				   help='''select libraries with tags (gd for debug, static is automatically added),
+				   see doc Boost, Getting Started, chapter 6.1''')
+	opt.add_option('--boost-linkage_autodetect', action='store_true', dest='boost_linkage_autodetect',
+				   help="auto-detect boost linkage options (don't get used to it / might break other stuff)")
+	opt.add_option('--boost-toolset', type='string',
+				   default='', dest='boost_toolset',
+				   help='force a toolset e.g. msvc, vc90, \
+						gcc, mingw, mgw45 (default: auto)')
+	py_version = '%d%d' % (sys.version_info[0], sys.version_info[1])
+	opt.add_option('--boost-python', type='string',
+				   default=py_version, dest='boost_python',
+				   help='select the lib python with this version \
+						(default: %s)' % py_version)
+
+
+@conf
+def __boost_get_version_file(self, d):
+	if not d:
+		return None
+	dnode = self.root.find_dir(d)
+	if dnode:
+		return dnode.find_node(BOOST_VERSION_FILE)
+	return None
+
+@conf
+def boost_get_version(self, d):
+	"""silently retrieve the boost version number"""
+	node = self.__boost_get_version_file(d)
+	if node:
+		try:
+			txt = node.read()
+		except EnvironmentError:
+			Logs.error('Could not read the file %r' % node.abspath())
+		else:
+			re_but1 = re.compile('^#define\\s+BOOST_LIB_VERSION\\s+"(.+)"', re.M)
+			m1 = re_but1.search(txt)
+			re_but2 = re.compile('^#define\\s+BOOST_VERSION\\s+(\\d+)', re.M)
+			m2 = re_but2.search(txt)
+			if m1 and m2:
+				return (m1.group(1), m2.group(1))
+	return self.check_cxx(fragment=BOOST_VERSION_CODE, includes=[d], execute=True, define_ret=True).split(':')
+
+@conf
+def boost_get_includes(self, *k, **kw):
+	includes = k and k[0] or kw.get('includes', None)
+	if includes and self.__boost_get_version_file(includes):
+		return includes
+	for d in self.environ.get('INCLUDE', '').split(';') + BOOST_INCLUDES:
+		if self.__boost_get_version_file(d):
+			return d
+	if includes:
+		self.end_msg('headers not found in %s' % includes, 'YELLOW')
+		self.fatal('The configuration failed')
+	else:
+		self.end_msg('headers not found, please provide a --boost-includes argument (see help)', 'YELLOW')
+		self.fatal('The configuration failed')
+
+
+@conf
+def boost_get_toolset(self, cc):
+	toolset = cc
+	if not cc:
+		build_platform = Utils.unversioned_sys_platform()
+		if build_platform in BOOST_TOOLSETS:
+			cc = build_platform
+		else:
+			cc = self.env.CXX_NAME
+	if cc in BOOST_TOOLSETS:
+		toolset = BOOST_TOOLSETS[cc]
+	return isinstance(toolset, str) and toolset or toolset(self.env)
+
+
+@conf
+def __boost_get_libs_path(self, *k, **kw):
+	''' return the lib path and all the files in it '''
+	if 'files' in kw:
+		return self.root.find_dir('.'), Utils.to_list(kw['files'])
+	libs = k and k[0] or kw.get('libs', None)
+	if libs:
+		path = self.root.find_dir(libs)
+		files = path.ant_glob('*boost_*')
+	if not libs or not files:
+		for d in self.environ.get('LIB', '').split(';') + BOOST_LIBS:
+			if not d:
+				continue
+			path = self.root.find_dir(d)
+			if path:
+				files = path.ant_glob('*boost_*')
+				if files:
+					break
+			path = self.root.find_dir(d + '64')
+			if path:
+				files = path.ant_glob('*boost_*')
+				if files:
+					break
+	if not path:
+		if libs:
+			self.end_msg('libs not found in %s' % libs, 'YELLOW')
+			self.fatal('The configuration failed')
+		else:
+			self.end_msg('libs not found, please provide a --boost-libs argument (see help)', 'YELLOW')
+			self.fatal('The configuration failed')
+
+	self.to_log('Found the boost path in %r with the libraries:' % path)
+	for x in files:
+		self.to_log('    %r' % x)
+	return path, files
+
+@conf
+def boost_get_libs(self, *k, **kw):
+	'''
+	return the lib path and the required libs
+	according to the parameters
+	'''
+	path, files = self.__boost_get_libs_path(**kw)
+	files = sorted(files, key=lambda f: (len(f.name), f.name), reverse=True)
+	toolset = self.boost_get_toolset(kw.get('toolset', ''))
+	toolset_pat = '(-%s[0-9]{0,3})' % toolset
+	version = '-%s' % self.env.BOOST_VERSION
+
+	def find_lib(re_lib, files):
+		for file in files:
+			if re_lib.search(file.name):
+				self.to_log('Found boost lib %s' % file)
+				return file
+		return None
+
+	def format_lib_name(name):
+		if name.startswith('lib') and self.env.CC_NAME != 'msvc':
+			name = name[3:]
+		return name[:name.rfind('.')]
+
+	def match_libs(lib_names, is_static):
+		libs = []
+		lib_names = Utils.to_list(lib_names)
+		if not lib_names:
+			return libs
+		t = []
+		if kw.get('mt', False):
+			t.append('-mt')
+		if kw.get('abi', None):
+			t.append('%s%s' % (is_static and '-s' or '-', kw['abi']))
+		elif is_static:
+			t.append('-s')
+		tags_pat = t and ''.join(t) or ''
+		ext = is_static and self.env.cxxstlib_PATTERN or self.env.cxxshlib_PATTERN
+		ext = ext.partition('%s')[2] # remove '%s' or 'lib%s' from PATTERN
+
+		for lib in lib_names:
+			if lib == 'python':
+				# for instance, with python='27',
+				# accepts '-py27', '-py2', '27' and '2'
+				# but will reject '-py3', '-py26', '26' and '3'
+				tags = '({0})?((-py{2})|(-py{1}(?=[^0-9]))|({2})|({1}(?=[^0-9]))|(?=[^0-9])(?!-py))'.format(tags_pat, kw['python'][0], kw['python'])
+			else:
+				tags = tags_pat
+			# Trying libraries, from most strict match to least one
+			for pattern in ['boost_%s%s%s%s%s$' % (lib, toolset_pat, tags, version, ext),
+							'boost_%s%s%s%s$' % (lib, tags, version, ext),
+							# Give up trying to find the right version
+							'boost_%s%s%s%s$' % (lib, toolset_pat, tags, ext),
+							'boost_%s%s%s$' % (lib, tags, ext),
+							'boost_%s%s$' % (lib, ext),
+							'boost_%s' % lib]:
+				self.to_log('Trying pattern %s' % pattern)
+				file = find_lib(re.compile(pattern), files)
+				if file:
+					libs.append(format_lib_name(file.name))
+					break
+			else:
+				self.end_msg('lib %s not found in %s' % (lib, path.abspath()), 'YELLOW')
+				self.fatal('The configuration failed')
+		return libs
+
+	return  path.abspath(), match_libs(kw.get('lib', None), False), match_libs(kw.get('stlib', None), True)
+
+@conf
+def _check_pthread_flag(self, *k, **kw):
+	'''
+	Computes which flags should be added to CXXFLAGS and LINKFLAGS to compile in multi-threading mode
+
+	Yes, we *need* to put the -pthread thing in CPPFLAGS because with GCC3,
+	boost/thread.hpp will trigger a #error if -pthread isn't used:
+	  boost/config/requires_threads.hpp:47:5: #error "Compiler threading support
+	  is not turned on. Please set the correct command line options for
+	  threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)"
+
+	Based on _BOOST_PTHREAD_FLAG(): https://github.com/tsuna/boost.m4/blob/master/build-aux/boost.m4
+    '''
+
+	var = kw.get('uselib_store', 'BOOST')
+
+	self.start_msg('Checking the flags needed to use pthreads')
+
+	# The ordering *is* (sometimes) important.  Some notes on the
+	# individual items follow:
+	# (none): in case threads are in libc; should be tried before -Kthread and
+	#       other compiler flags to prevent continual compiler warnings
+	# -lpthreads: AIX (must check this before -lpthread)
+	# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+	# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+	# -llthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+	# -pthread: GNU Linux/GCC (kernel threads), BSD/GCC (userland threads)
+	# -pthreads: Solaris/GCC
+	# -mthreads: MinGW32/GCC, Lynx/GCC
+	# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+	#      doesn't hurt to check since this sometimes defines pthreads too;
+	#      also defines -D_REENTRANT)
+	#      ... -mt is also the pthreads flag for HP/aCC
+	# -lpthread: GNU Linux, etc.
+	# --thread-safe: KAI C++
+	if Utils.unversioned_sys_platform() == 'sunos':
+		# On Solaris (at least, for some versions), libc contains stubbed
+		# (non-functional) versions of the pthreads routines, so link-based
+		# tests will erroneously succeed.  (We need to link with -pthreads/-mt/
+		# -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+		# a function called by this macro, so we could check for that, but
+		# who knows whether they'll stub that too in a future libc.)  So,
+		# we'll just look for -pthreads and -lpthread first:
+		boost_pthread_flags = ['-pthreads', '-lpthread', '-mt', '-pthread']
+	else:
+		boost_pthread_flags = ['', '-lpthreads', '-Kthread', '-kthread', '-llthread', '-pthread',
+							   '-pthreads', '-mthreads', '-lpthread', '--thread-safe', '-mt']
+
+	for boost_pthread_flag in boost_pthread_flags:
+		try:
+			self.env.stash()
+			self.env['CXXFLAGS_%s' % var] += [boost_pthread_flag]
+			self.env['LINKFLAGS_%s' % var] += [boost_pthread_flag]
+			self.check_cxx(code=PTHREAD_CODE, msg=None, use=var, execute=False, quiet=True)
+			self.end_msg(boost_pthread_flag)
+			return
+		except self.errors.ConfigurationError:
+			self.env.revert()
+	self.end_msg('none')
+
+@conf
+def check_boost(self, *k, **kw):
+	"""
+	Initialize boost libraries to be used.
+
+	Keywords: you can pass the same parameters as with the command line (without "--boost-").
+	Note that the command line has the priority, and should preferably be used.
+	"""
+	if not self.env['CXX']:
+		self.fatal('load a c++ compiler first, conf.load("compiler_cxx")')
+
+	params = {
+		'lib': k and k[0] or kw.get('lib', None),
+		'stlib': kw.get('stlib', None)
+	}
+	for key, value in self.options.__dict__.items():
+		if not key.startswith('boost_'):
+			continue
+		key = key[len('boost_'):]
+		params[key] = value and value or kw.get(key, '')
+
+	var = kw.get('uselib_store', 'BOOST')
+
+	if not self.env.DONE_FIND_BOOST_COMMON:
+		self.find_program('dpkg-architecture', var='DPKG_ARCHITECTURE', mandatory=False)
+		if self.env.DPKG_ARCHITECTURE:
+			deb_host_multiarch = self.cmd_and_log([self.env.DPKG_ARCHITECTURE[0], '-qDEB_HOST_MULTIARCH'])
+			BOOST_LIBS.insert(0, '/usr/lib/%s' % deb_host_multiarch.strip())
+
+		self.start_msg('Checking boost includes')
+		self.env['INCLUDES_%s' % var] = inc = self.boost_get_includes(**params)
+		versions = self.boost_get_version(inc)
+		self.env.BOOST_VERSION = versions[0]
+		self.env.BOOST_VERSION_NUMBER = int(versions[1])
+		self.end_msg('%d.%d.%d' % (int(versions[1]) / 100000,
+								   int(versions[1]) / 100 % 1000,
+								   int(versions[1]) % 100))
+		if Logs.verbose:
+			Logs.pprint('CYAN', '	path : %s' % self.env['INCLUDES_%s' % var])
+
+		self.env.DONE_FIND_BOOST_COMMON = True
+
+	if not params['lib'] and not params['stlib']:
+		return
+	if 'static' in kw or 'static' in params:
+		Logs.warn('boost: static parameter is deprecated, use stlib instead.')
+	self.start_msg('Checking boost libs')
+	path, libs, stlibs = self.boost_get_libs(**params)
+	self.env['LIBPATH_%s' % var] = [path]
+	self.env['STLIBPATH_%s' % var] = [path]
+	self.env['LIB_%s' % var] = libs
+	self.env['STLIB_%s' % var] = stlibs
+	self.end_msg(' '.join(libs + stlibs))
+	if Logs.verbose:
+		Logs.pprint('CYAN', '	path : %s' % path)
+		Logs.pprint('CYAN', '	shared libs : %s' % libs)
+		Logs.pprint('CYAN', '	static libs : %s' % stlibs)
+
+	def has_shlib(lib):
+		return params['lib'] and lib in params['lib']
+	def has_stlib(lib):
+		return params['stlib'] and lib in params['stlib']
+	def has_lib(lib):
+		return has_shlib(lib) or has_stlib(lib)
+	if has_lib('thread'):
+		# not inside try_link to make check visible in the output
+		self._check_pthread_flag(k, kw)
+
+	def try_link():
+		if has_lib('system'):
+			self.check_cxx(fragment=BOOST_ERROR_CODE, use=var, execute=False)
+		if has_lib('thread'):
+			self.check_cxx(fragment=BOOST_THREAD_CODE, use=var, execute=False)
+		if has_lib('log') or has_lib('log_setup'):
+			if not has_lib('thread'):
+				self.env['DEFINES_%s' % var] += ['BOOST_LOG_NO_THREADS']
+			if has_shlib('log') or has_shlib('log_setup'):
+				self.env['DEFINES_%s' % var] += ['BOOST_LOG_DYN_LINK']
+			if has_lib('log_setup'):
+				self.check_cxx(fragment=BOOST_LOG_SETUP_CODE, use=var, execute=False)
+			else:
+				self.check_cxx(fragment=BOOST_LOG_CODE, use=var, execute=False)
+
+	if params.get('linkage_autodetect', False):
+		self.start_msg('Attempting to detect boost linkage flags')
+		toolset = self.boost_get_toolset(kw.get('toolset', ''))
+		if toolset in ('vc',):
+			# disable auto-linking feature, causing error LNK1181
+			# because the code wants to be linked against
+			self.env['DEFINES_%s' % var] += ['BOOST_ALL_NO_LIB']
+
+			# if no dlls are present, we guess the .lib files are not stubs
+			has_dlls = False
+			for x in Utils.listdir(path):
+				if x.endswith(self.env.cxxshlib_PATTERN % ''):
+					has_dlls = True
+					break
+			if not has_dlls:
+				self.env['STLIBPATH_%s' % var] = [path]
+				self.env['STLIB_%s' % var] = libs
+				del self.env['LIB_%s' % var]
+				del self.env['LIBPATH_%s' % var]
+
+			# we attempt to play with some known-to-work CXXFLAGS combinations
+			for cxxflags in (['/MD', '/EHsc'], []):
+				self.env.stash()
+				self.env['CXXFLAGS_%s' % var] += cxxflags
+				try:
+					try_link()
+					self.end_msg('ok: winning cxxflags combination: %s' % (self.env['CXXFLAGS_%s' % var]))
+					exc = None
+					break
+				except Errors.ConfigurationError as e:
+					self.env.revert()
+					exc = e
+
+			if exc is not None:
+				self.end_msg('Could not auto-detect boost linking flags combination, you may report it to boost.py author', ex=exc)
+				self.fatal('The configuration failed')
+		else:
+			self.end_msg('Boost linkage flags auto-detection not implemented (needed ?) for this toolchain')
+			self.fatal('The configuration failed')
+	else:
+		self.start_msg('Checking for boost linkage')
+		try:
+			try_link()
+		except Errors.ConfigurationError as e:
+			self.end_msg('Could not link against boost libraries using supplied options', 'YELLOW')
+			self.fatal('The configuration failed')
+		self.end_msg('ok')
+
+
+@feature('cxx')
+@after_method('apply_link')
+def install_boost(self):
+	if install_boost.done or not Utils.is_win32 or not self.bld.cmd.startswith('install'):
+		return
+	install_boost.done = True
+	inst_to = getattr(self, 'install_path', '${BINDIR}')
+	for lib in self.env.LIB_BOOST:
+		try:
+			file = self.bld.find_file(self.env.cxxshlib_PATTERN % lib, self.env.LIBPATH_BOOST)
+			self.bld.install_files(inst_to, self.bld.root.find_node(file))
+		except:
+			continue
+install_boost.done = False
\ No newline at end of file
diff --git a/waf-tools/cryptopp.py b/.waf-tools/cryptopp.py
similarity index 100%
rename from waf-tools/cryptopp.py
rename to .waf-tools/cryptopp.py
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
new file mode 100644
index 0000000..7a317b1
--- /dev/null
+++ b/.waf-tools/default-compiler-flags.py
@@ -0,0 +1,228 @@
+# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
+
+import platform
+from waflib import Configure, Logs, Utils
+
+def options(opt):
+    opt.add_option('--debug', '--with-debug', action='store_true', default=False,
+                   help='Compile in debugging mode with minimal optimizations (-Og)')
+
+def configure(conf):
+    conf.start_msg('Checking C++ compiler version')
+
+    cxx = conf.env.CXX_NAME # generic name of the compiler
+    ccver = tuple(int(i) for i in conf.env.CC_VERSION)
+    ccverstr = '.'.join(conf.env.CC_VERSION)
+    errmsg = ''
+    warnmsg = ''
+    if cxx == 'gcc':
+        if ccver < (5, 3, 0):
+            errmsg = ('The version of gcc you are using is too old.\n'
+                      'The minimum supported gcc version is 7.4.0.')
+        elif ccver < (7, 4, 0):
+            warnmsg = ('Using a version of gcc older than 7.4.0 is not '
+                       'officially supported and may result in build failures.')
+        conf.flags = GccFlags()
+    elif cxx == 'clang':
+        if Utils.unversioned_sys_platform() == 'darwin' and ccver < (9, 0, 0):
+            errmsg = ('The version of Xcode you are using is too old.\n'
+                      'The minimum supported Xcode version is 9.0.')
+        elif ccver < (4, 0, 0):
+            errmsg = ('The version of clang you are using is too old.\n'
+                      'The minimum supported clang version is 4.0.')
+        conf.flags = ClangFlags()
+    else:
+        warnmsg = '%s compiler is unsupported' % cxx
+        conf.flags = CompilerFlags()
+
+    if errmsg:
+        conf.end_msg(ccverstr, color='RED')
+        conf.fatal(errmsg)
+    elif warnmsg:
+        conf.end_msg(ccverstr, color='YELLOW')
+        Logs.warn('WARNING: ' + warnmsg)
+    else:
+        conf.end_msg(ccverstr)
+
+    conf.areCustomCxxflagsPresent = (len(conf.env.CXXFLAGS) > 0)
+
+    # General flags are always applied (e.g., selecting C++ language standard)
+    generalFlags = conf.flags.getGeneralFlags(conf)
+    conf.add_supported_cxxflags(generalFlags['CXXFLAGS'])
+    conf.add_supported_linkflags(generalFlags['LINKFLAGS'])
+    conf.env.DEFINES += generalFlags['DEFINES']
+
+@Configure.conf
+def check_compiler_flags(conf):
+    # 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:
+        extraFlags = conf.flags.getDebugFlags(conf)
+        if conf.areCustomCxxflagsPresent:
+            missingFlags = [x for x in extraFlags['CXXFLAGS'] if x not in conf.env.CXXFLAGS]
+            if missingFlags:
+                Logs.warn('Selected debug mode, but CXXFLAGS is set to a custom value "%s"'
+                          % ' '.join(conf.env.CXXFLAGS))
+                Logs.warn('Default flags "%s" will not be used' % ' '.join(missingFlags))
+    else:
+        extraFlags = conf.flags.getOptimizedFlags(conf)
+
+    if not conf.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
+    """
+    if len(cxxflags) == 0:
+        return
+
+    self.start_msg('Checking supported CXXFLAGS')
+
+    supportedFlags = []
+    for flags in cxxflags:
+        flags = Utils.to_list(flags)
+        if self.check_cxx(cxxflags=['-Werror'] + flags, mandatory=False):
+            supportedFlags += flags
+
+    self.end_msg(' '.join(supportedFlags))
+    self.env.prepend_value('CXXFLAGS', supportedFlags)
+
+@Configure.conf
+def add_supported_linkflags(self, linkflags):
+    """
+    Check which linkflags are supported by compiler and add them to env.LINKFLAGS variable
+    """
+    if len(linkflags) == 0:
+        return
+
+    self.start_msg('Checking supported LINKFLAGS')
+
+    supportedFlags = []
+    for flags in linkflags:
+        flags = Utils.to_list(flags)
+        if self.check_cxx(linkflags=['-Werror'] + flags, mandatory=False):
+            supportedFlags += flags
+
+    self.end_msg(' '.join(supportedFlags))
+    self.env.prepend_value('LINKFLAGS', supportedFlags)
+
+
+class CompilerFlags(object):
+    def getCompilerVersion(self, conf):
+        return tuple(int(i) for i in conf.env.CC_VERSION)
+
+    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 getGeneralFlags(self, conf):
+        flags = super(GccBasicFlags, self).getGeneralFlags(conf)
+        flags['CXXFLAGS'] += ['-std=c++14']
+        if Utils.unversioned_sys_platform() == 'linux':
+            flags['LINKFLAGS'] += ['-fuse-ld=gold']
+        elif Utils.unversioned_sys_platform() == 'freebsd':
+            flags['LINKFLAGS'] += ['-fuse-ld=lld']
+        return flags
+
+    def getDebugFlags(self, conf):
+        flags = super(GccBasicFlags, self).getDebugFlags(conf)
+        flags['CXXFLAGS'] += ['-Og',
+                              '-g3',
+                              '-pedantic',
+                              '-Wall',
+                              '-Wextra',
+                              '-Werror',
+                              '-Wcatch-value=2',
+                              # '-Wextra-semi', # prevent noisy output with Qt5
+                              '-Wnon-virtual-dtor',
+                              '-Wno-error=deprecated-declarations', # Bug #3795
+                              '-Wno-error=maybe-uninitialized', # Bug #1615
+                              '-Wno-unused-parameter',
+                              '-Wno-error=deprecated-copy', # Qt5
+                              ]
+        flags['LINKFLAGS'] += ['-Wl,-O1']
+        return flags
+
+    def getOptimizedFlags(self, conf):
+        flags = super(GccBasicFlags, self).getOptimizedFlags(conf)
+        flags['CXXFLAGS'] += ['-O2',
+                              '-g',
+                              '-pedantic',
+                              '-Wall',
+                              '-Wextra',
+                              '-Wcatch-value=2',
+                              '-Wextra-semi',
+                              '-Wnon-virtual-dtor',
+                              '-Wno-unused-parameter',
+                              ]
+        flags['LINKFLAGS'] += ['-Wl,-O1']
+        return flags
+
+class GccFlags(GccBasicFlags):
+    def getDebugFlags(self, conf):
+        flags = super(GccFlags, self).getDebugFlags(conf)
+        flags['CXXFLAGS'] += ['-fdiagnostics-color',
+                              '-Wredundant-tags',
+                              ]
+        if platform.machine() == 'armv7l' and self.getCompilerVersion(conf) >= (7, 1, 0):
+            flags['CXXFLAGS'] += ['-Wno-psabi'] # Bug #5106
+        return flags
+
+    def getOptimizedFlags(self, conf):
+        flags = super(GccFlags, self).getOptimizedFlags(conf)
+        flags['CXXFLAGS'] += ['-fdiagnostics-color',
+                              '-Wredundant-tags',
+                              ]
+        if platform.machine() == 'armv7l' and self.getCompilerVersion(conf) >= (7, 1, 0):
+            flags['CXXFLAGS'] += ['-Wno-psabi'] # Bug #5106
+        return flags
+
+class ClangFlags(GccBasicFlags):
+    def getGeneralFlags(self, conf):
+        flags = super(ClangFlags, self).getGeneralFlags(conf)
+        if Utils.unversioned_sys_platform() == 'darwin':
+            # Bug #4296
+            flags['CXXFLAGS'] += [['-isystem', '/usr/local/include'], # for Homebrew
+                                  ['-isystem', '/opt/local/include']] # for MacPorts
+        elif Utils.unversioned_sys_platform() == 'freebsd':
+            # Bug #4790
+            flags['CXXFLAGS'] += [['-isystem', '/usr/local/include']]
+        return flags
+
+    def getDebugFlags(self, conf):
+        flags = super(ClangFlags, self).getDebugFlags(conf)
+        flags['CXXFLAGS'] += ['-fcolor-diagnostics',
+                              '-Wundefined-func-template',
+                              '-Wno-unused-local-typedef', # Bugs #2657 and #3209
+                              ]
+        if self.getCompilerVersion(conf) < (6, 0, 0):
+            flags['CXXFLAGS'] += ['-Wno-missing-braces'] # Bug #4721
+        return flags
+
+    def getOptimizedFlags(self, conf):
+        flags = super(ClangFlags, self).getOptimizedFlags(conf)
+        flags['CXXFLAGS'] += ['-fcolor-diagnostics',
+                              '-Wundefined-func-template',
+                              '-Wno-unused-local-typedef', # Bugs #2657 and #3209
+                              ]
+        if self.getCompilerVersion(conf) < (6, 0, 0):
+            flags['CXXFLAGS'] += ['-Wno-missing-braces'] # Bug #4721
+        return flags
\ No newline at end of file
diff --git a/waf-tools/doxygen.py b/.waf-tools/doxygen.py
similarity index 98%
rename from waf-tools/doxygen.py
rename to .waf-tools/doxygen.py
index ac8c70b..85e0828 100644
--- a/waf-tools/doxygen.py
+++ b/.waf-tools/doxygen.py
@@ -85,7 +85,7 @@
 
 			# Override with any parameters passed to the task generator
 			if getattr(self.generator, 'pars', None):
-				for k, v in self.generator.pars.iteritems():
+				for k, v in self.generator.pars.items():
 					self.pars[k] = v
 
 			self.doxy_inputs = getattr(self, 'doxy_inputs', [])
@@ -211,4 +211,4 @@
 from waflib.Build import BuildContext
 class doxy(BuildContext):
     cmd = "doxygen"
-    fun = "doxygen"
+    fun = "doxygen"
\ No newline at end of file
diff --git a/waf-tools/qt5.py b/.waf-tools/qt5_custom.py
similarity index 98%
rename from waf-tools/qt5.py
rename to .waf-tools/qt5_custom.py
index 23ff0b8..47d0d4c 100644
--- a/waf-tools/qt5.py
+++ b/.waf-tools/qt5_custom.py
@@ -500,7 +500,7 @@
 	# Qt5 may be compiled with '-reduce-relocations' which requires dependent programs to have -fPIE or -fPIC?
 	frag = '#include <QMap>\nint main(int argc, char **argv) {QMap<int,int> m;return m.keys().size();}\n'
 	uses = 'QT5CORE'
-	for flag in [[], '-fPIE', '-fPIC', '-std=c++11' , ['-std=c++11', '-fPIE'], ['-std=c++11', '-fPIC']]:
+	for flag in [[], '-fPIE', '-fPIC', '-std=c++14' , ['-std=c++14', '-fPIE'], ['-std=c++14', '-fPIC']]:
 		msg = 'See if Qt files compile '
 		if flag:
 			msg += 'with %s' % flag
diff --git a/waf-tools/sphinx_build.py b/.waf-tools/sphinx_build.py
similarity index 82%
rename from waf-tools/sphinx_build.py
rename to .waf-tools/sphinx_build.py
index e61da6e..b44a54f 100644
--- a/waf-tools/sphinx_build.py
+++ b/.waf-tools/sphinx_build.py
@@ -44,28 +44,28 @@
     task.inputs.append(conf)
 
     confdir = conf.parent.abspath()
-    buildername = getattr(self, "builder", "html")
-    srcdir = getattr(self, "srcdir", confdir)
-    outdir = self.path.find_or_declare(getattr(self, "outdir", buildername)).get_bld()
-    doctreedir = getattr(self, "doctreedir", os.path.join(outdir.abspath(), ".doctrees"))
+    buildername = getattr(self, 'builder', 'html')
+    srcdir = getattr(self, 'srcdir', confdir)
+    outdir = self.path.find_or_declare(getattr(self, 'outdir', buildername)).get_bld()
+    doctreedir = getattr(self, 'doctreedir', os.path.join(outdir.abspath(), '.doctrees'))
 
     task.env['BUILDERNAME'] = buildername
     task.env['SRCDIR'] = srcdir
     task.env['DOCTREEDIR'] = doctreedir
     task.env['OUTDIR'] = outdir.abspath()
-    task.env['VERSION'] = "version=%s" % self.VERSION
-    task.env['RELEASE'] = "release=%s" % self.VERSION
+    task.env['VERSION'] = 'version=%s' % self.version
+    task.env['RELEASE'] = 'release=%s' % getattr(self, 'release', self.version)
 
     import imp
     confData = imp.load_source('sphinx_conf', conf.abspath())
 
-    if buildername == "man":
+    if buildername == 'man':
         for i in confData.man_pages:
             target = outdir.find_or_declare('%s.%d' % (i[1], i[4]))
             task.outputs.append(target)
 
             if self.install_path:
-                self.bld.install_files("%s/man%d/" % (self.install_path, i[4]), target)
+                self.bld.install_files('%s/man%d/' % (self.install_path, i[4]), target)
     else:
         task.outputs.append(outdir)
 
diff --git a/ChronoSync b/ChronoSync
deleted file mode 160000
index 5f408ae..0000000
--- a/ChronoSync
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 5f408ae7f52f2fb792c65db733c80c6d4d5ecf48
diff --git a/README.md b/README.md
index c0a2bb7..3737987 100644
--- a/README.md
+++ b/README.md
@@ -6,81 +6,25 @@
 Note that after you click to close ChronoChat, it will keep running on your system tray. To restore it to normal size window, you have to click on the system tray icon (normally on the upper right corner of your screen). Clicking on the dock won't work for now and is still on the to-do list (because I'm using qt for gui, not the native Cocoa framework).
 
 ## Known Issues
----------------
 
 1. When you switch to a new room, you'll temporarily see yourself in two nodes for a minute or so. It won't affect others, just yourself. Hopefully it's not so disturbing.
 2. Sometimes you may not get the most up-to-date chat history.
 
-## For those who want (or is forced to) compile from source code
------------------------------------------------------------------
+## Compilation steps
 
-### Compilation steps for OSX
+1. On Ubuntu, configure [NDN PPA repository](http://named-data.net/doc/NFD/current/FAQ.html#how-to-start-using-ndn-ppa-repository-on-ubuntu-linux) and install NFD and ChronoSYnc if you don't have it yet, then install dependencies
 
-1. Install MacPorts, if not yet installed (http://www.macports.org/), configure [NDN ports repository](http://named-data.net/doc/NFD/current/FAQ.html#how-to-start-using-ndn-macports-repository-on-osx) and install NFD if you don't have it yet.
+        sudo apt-get install nfd libndn-cxx-dev libchronosync-dev
+        sudo apt-get install libcrypto++-dev libboost-all-dev qt5-default
 
-        sudo port install nfd
-        sudo nfd-start
+2. Fetch source code
 
-2. Install ChronoChat dependencies
+        git clone https://github.com/named-data/ChronoChat
 
-        sudo port install pkgconfig protobuf-cpp boost qt4-mac
+3. Configure and build ChronoChat
 
-3. Fetch source code with submodules
-
-        git clone --recursive git://github.com/named-data/ChronoChat
-
-If you already cloned repository, you can update submodules this way:
-
-        git submodule update --init
-
-4. Configure and install ChronoSync
-
-        cd ChronoChat/ChronoSync
-        ./waf configure
-        ./waf
-        sudo ./waf install
-
-5. Configure and build ChronoChat
-
-        cd ..
-        PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig ./waf configure
-        ./waf
-
-Congratulations! build/ChronoChat.app is ready to use (on a Mac).
-
-### Compilation steps for Ubuntu 18.04, 20.04
-
-1. Configure [NDN PPA repository](http://named-data.net/doc/NFD/current/FAQ.html#how-to-start-using-ndn-ppa-repository-on-ubuntu-linux) and install NFD if you don't have it yet.
-
-        sudo apt-get install nfd
-
-2. Install ChronoChat dependencies
-
-        sudo apt-get install libprotobuf-dev protobuf-compiler libevent-dev libcrypto++-dev
-        sudo apt-get install libboost-all-dev
-        sudo apt-get install qt5-default
-
-3. Fetch source code with submodules
-
-        git clone --recursive git://github.com/named-data/ChronoChat
-
-If you already cloned repository, you can update submodules this way:
-
-	    git submodule update --init
-
-4. Configure and install ChronoSync
-
-        cd ChronoChat/ChronoSync
-        ./waf configure
-        ./waf
-        sudo ./waf install
-        sudo ldconfig
-
-5. Configure and build ChronoChat
-
-        cd ..
         ./waf configure
         ./waf
 
-Congratulations! build/ChronoChat is ready to use.  Do not forget to start NFD and configure FIB before using ChronoChat.
+Congratulations! `build/ChronoChat` is ready to use.  Do not forget to start NFD and configure FIB before using ChronoChat.
 For ease of debugging, you can generate trusted identities in your local TPM using `debug-tools/create-cert`.
diff --git a/debug-tools/create-cert.cc b/debug-tools/create-cert.cpp
similarity index 93%
rename from debug-tools/create-cert.cc
rename to debug-tools/create-cert.cpp
index 5941783..09399b1 100644
--- a/debug-tools/create-cert.cc
+++ b/debug-tools/create-cert.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /**
- * Copyright (C) 2013 Regents of the University of California.
+ * Copyright (C) 2020 Regents of the University of California.
  * @author: Yingdi Yu <yingdi@cs.ucla.edu>
  * See COPYING for copyright and distribution information.
  */
@@ -19,7 +19,7 @@
 generateCertificate(KeyChain& keyChain, Name name) {
   try {
     keyChain.getPib().getIdentity(name);
-  } catch (ndn::security::pib::Pib::Error&) {
+  } catch (const ndn::security::pib::Pib::Error&) {
     Identity id = keyChain.createIdentity(name);
     Key key = id.getDefaultKey();
     Certificate cert = Certificate(key.getDefaultCertificate());
diff --git a/disabled/send-invitation-request-dialog.cpp b/disabled/send-invitation-request-dialog.cpp
deleted file mode 100644
index 8cc0640..0000000
--- a/disabled/send-invitation-request-dialog.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-#include "send-invitation-request-dialog.hpp"
-#include "ui_send-invitation-request-dialog.h"
-
-using namespace chronos;
-
-SendInvitationRequestDialog::SendInvitationRequestDialog(QWidget *parent) :
-  QDialog(parent),
-  ui(new Ui::SendInvitationRequestDialog),
-  m_stringListModel(new QStringListModel)
-{
-  ui->setupUi(this);
-  ui->contactsListView->setEditTriggers(ui->contactsListView->NoEditTriggers);
-  ui->contactsListView->setModel(m_stringListModel);
-
-  connect(ui->sendButton, SIGNAL(clicked()),
-          this, SLOT(onSendButtonClicked()));
-  connect(ui->cancelButton, SIGNAL(clicked()),
-          this, SLOT(onCancelButtonClicked()));
-  connect(ui->contactsListView, SIGNAL(clicked(QModelIndex)),
-          this, SLOT(onContactListViewClicked(QModelIndex)));
-  connect(ui->contactsListView,SIGNAL(doubleClicked(QModelIndex)),
-          this, SLOT(onContactListViewDoubleClicked(QModelIndex)));
-}
-
-SendInvitationRequestDialog::~SendInvitationRequestDialog()
-{
-  delete ui;
-}
-
-void
-SendInvitationRequestDialog::setContacts(const std::vector<ndn::Name>& contacts)
-{
-  QStringList contactsList;
-  for(int i = 0; i < contacts.size(); i++){
-    contactsList.append(QString::fromStdString(contacts[i].toUri()));
-  }
-  m_stringListModel->setStringList(contactsList);
-}
-
-void
-SendInvitationRequestDialog::onSendButtonClicked()
-{
-  if(ui->contactsListView->selectionModel()->selectedRows().size() == 0){
-    QMessageBox messageBox;
-    messageBox.addButton(QMessageBox::Ok);
-    messageBox.setIcon(QMessageBox::Information);
-    messageBox.setText("Please select a contact to send invitation request");
-    messageBox.exec();
-  }
-  else{
-    //send invitation request
-    int selectedRow = ui->contactsListView->selectionModel()->selectedRows()[0].row();
-    QString contactName = m_stringListModel->stringList()[selectedRow];
-    qDebug() << contactName;
-
-    QMessageBox messageBox;
-    messageBox.addButton(QMessageBox::Yes);
-    messageBox.addButton(QMessageBox::No);
-    messageBox.setIcon(QMessageBox::Question);
-    messageBox.setText("Send invitation request to "+ contactName +"?");
-
-    int selection = messageBox.exec();
-
-    if(selection == QMessageBox::Yes){
-      //send invitation request
-      //need to have another message box when successfully send
-      //emit sendInvitationRequest(m_chatroomName, contactName);
-    }
-  }
-}
-
-
-void
-SendInvitationRequestDialog::onCancelButtonClicked()
-{
-  //qDebug() << "cancel";
-  this->close();
-}
-
-void
-SendInvitationRequestDialog::onContactListViewClicked(QModelIndex modelIndex)
-{}
-
-void
-SendInvitationRequestDialog::onContactListViewDoubleClicked(QModelIndex modelIndex)
-{
-  onSendButtonClicked();
-}
-
-void
-SendInvitationRequestDialog::setChatroomName(const QString chatroomName)
-{
-  m_chatroomName = chatroomName;
-}
-
-
-#if WAF
-#include "send-invitation-request-dialog.moc"
-#endif
diff --git a/disabled/send-invitation-request-dialog.hpp b/disabled/send-invitation-request-dialog.hpp
deleted file mode 100644
index ea86676..0000000
--- a/disabled/send-invitation-request-dialog.hpp
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef SENDINVITATIONREQUESTDIALOG_H
-#define SENDINVITATIONREQUESTDIALOG_H
-
-#include <QDialog>
-#include <QStringListModel>
-#include <QMessageBox>
-#include <QDebug>
-#include <QAbstractItemView>
-
-#ifndef Q_MOC_RUN
-#include "chatroom-discovery.hpp"
-#endif
-
-namespace Ui {
-class SendInvitationRequestDialog;
-}
-
-namespace chronos {
-
-class SendInvitationRequestDialog : public QDialog
-{
-  Q_OBJECT
-
-public:
-  explicit SendInvitationRequestDialog(QWidget *parent = 0);
-  ~SendInvitationRequestDialog();
-
-  void
-  setContacts(const std::vector<ndn::Name>& contacts);
-
-  void
-  setChatroomName(const QString chatroomName);
-
-public slots:
-  void
-  onSendButtonClicked();
-
-  void
-  onCancelButtonClicked();
-
-  void
-  onContactListViewClicked(QModelIndex modelIndex);
-
-  void
-  onContactListViewDoubleClicked(QModelIndex modelIndex);
-
-private:
-  Ui::SendInvitationRequestDialog *ui;
-  QString m_chatroomName;
-  QStringListModel *m_stringListModel;
-};
-
-} //namespace chronos
-
-#endif // SENDINVITATIONREQUESTDIALOG_H
diff --git a/disabled/send-invitation-request-dialog.ui b/disabled/send-invitation-request-dialog.ui
deleted file mode 100644
index 1108478..0000000
--- a/disabled/send-invitation-request-dialog.ui
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>SendInvitationRequestDialog</class>
- <widget class="QDialog" name="SendInvitationRequestDialog">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>441</width>
-    <height>308</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Dialog</string>
-  </property>
-  <widget class="QLabel" name="introLabel">
-   <property name="geometry">
-    <rect>
-     <x>40</x>
-     <y>20</y>
-     <width>391</width>
-     <height>16</height>
-    </rect>
-   </property>
-   <property name="text">
-    <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Choose your contact to send invitation request:&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-   </property>
-  </widget>
-  <widget class="QListView" name="contactsListView">
-   <property name="geometry">
-    <rect>
-     <x>40</x>
-     <y>50</y>
-     <width>351</width>
-     <height>192</height>
-    </rect>
-   </property>
-  </widget>
-  <widget class="QPushButton" name="sendButton">
-   <property name="geometry">
-    <rect>
-     <x>230</x>
-     <y>260</y>
-     <width>91</width>
-     <height>32</height>
-    </rect>
-   </property>
-   <property name="text">
-    <string>Send</string>
-   </property>
-  </widget>
-  <widget class="QPushButton" name="cancelButton">
-   <property name="geometry">
-    <rect>
-     <x>330</x>
-     <y>260</y>
-     <width>91</width>
-     <height>32</height>
-    </rect>
-   </property>
-   <property name="text">
-    <string>Cancel</string>
-   </property>
-  </widget>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/log4cxx.properties b/log4cxx.properties
deleted file mode 100644
index bdbc1a2..0000000
--- a/log4cxx.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-# Set root logger level to DEBUG and its only appender to A1.
-log4j.rootLogger=TRACE, A1
-#, rollingFile
-
-# A1 is set to be a ConsoleAppender.
-log4j.appender.A1=org.apache.log4j.ConsoleAppender
-
-# A1 uses PatternLayout.
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-log4j.appender.A1.target=System.err
-#log4j.appender.A1.layout.ConversionPattern=%d{dd-MMM HH:MM:SS,SSS} %p %c %m%n
-#log4j.appender.A1.layout.ConversionPattern=%d{hh:mm:ss,SSS} %-14t %-14c  %m%n
-log4j.appender.A1.layout.ConversionPattern=%d{ss,SSS} %-5p %-12c  %m%n
-
-log4j.appender.rollingFile=org.apache.log4j.RollingFileAppender
-log4j.appender.rollingFile.File=logfile.txt
-log4j.appender.rollingFile.MaxFileSize=10MB
-log4j.appender.rollingFile.MaxBackupIndex=9
-log4j.appender.rollingFile.layout = org.apache.log4j.PatternLayout
-log4j.appender.rollingFile.layout.ConversionPattern=%d{ss,SSS} %-5p %-12c  %m%n
-
-log4j.logger.Executor = ERROR
-#log4j.logger.Scheduler = ERROR
-
diff --git a/logging.cc b/logging.cc
deleted file mode 100644
index 04fb6c3..0000000
--- a/logging.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2013, Regents of the University of California
- *                     Alexander Afanasyev
- *                     Zhenkai Zhu
- *
- * BSD license, See the LICENSE file for more information
- *
- * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- *         Zhenkai Zhu <zhenkai@cs.ucla.edu>
- */
-
-#include "logging.h"
-
-#ifdef HAVE_LOG4CXX
-
-#include <log4cxx/logger.h>
-#include <log4cxx/basicconfigurator.h>
-#include <log4cxx/consoleappender.h>
-#include <log4cxx/patternlayout.h>
-#include <log4cxx/level.h>
-#include <log4cxx/propertyconfigurator.h>
-#include <log4cxx/defaultconfigurator.h>
-#include <log4cxx/helpers/exception.h>
-using namespace log4cxx;
-using namespace log4cxx::helpers;
-
-#include <unistd.h>
-
-void
-INIT_LOGGERS ()
-{
-  static bool configured = false;
-
-  if (configured) return;
-
-  if (access ("log4cxx.properties", R_OK)==0)
-    PropertyConfigurator::configureAndWatch ("log4cxx.properties");
-  else
-    {
-      PatternLayoutPtr   layout   (new PatternLayout ("%d{HH:mm:ss} %p %c{1} - %m%n"));
-      ConsoleAppenderPtr appender (new ConsoleAppender (layout));
-
-      BasicConfigurator::configure( appender );
-      Logger::getRootLogger()->setLevel (log4cxx::Level::getInfo ());
-    }
-
-  configured = true;
-}
-
-#endif
diff --git a/logging.h b/logging.h
deleted file mode 100644
index 2aa3344..0000000
--- a/logging.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2013, Regents of the University of California
- *                     Alexander Afanasyev
- *                     Zhenkai Zhu
- *
- * BSD license, See the LICENSE file for more information
- *
- * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- *         Zhenkai Zhu <zhenkai@cs.ucla.edu>
- */
-
-#ifndef LOGGING_H
-#define LOGGING_H
-
-#include "config.h"
-
-#ifdef HAVE_LOG4CXX
-
-#include <log4cxx/logger.h>
-
-#define MEMBER_LOGGER                           \
-  static log4cxx::LoggerPtr staticModuleLogger;
-
-#define INIT_MEMBER_LOGGER(className,name)          \
-  log4cxx::LoggerPtr className::staticModuleLogger =  log4cxx::Logger::getLogger (name);
-
-#define INIT_LOGGER(name) \
-  static log4cxx::LoggerPtr staticModuleLogger = log4cxx::Logger::getLogger (name);
-
-#define _LOG_DEBUG(x) \
-  LOG4CXX_DEBUG(staticModuleLogger, x);
-
-#define _LOG_TRACE(x) \
-  LOG4CXX_TRACE(staticModuleLogger, x);
-
-#define _LOG_FUNCTION(x) \
-  LOG4CXX_TRACE(staticModuleLogger, __FUNCTION__ << "(" << x << ")");
-
-#define _LOG_FUNCTION_NOARGS \
-  LOG4CXX_TRACE(staticModuleLogger, __FUNCTION__ << "()");
-
-#define _LOG_ERROR(x) \
-  LOG4CXX_ERROR(staticModuleLogger, x);
-
-#define _LOG_ERROR_COND(cond,x) \
-  if (cond) { _LOG_ERROR(x) }
-
-#define _LOG_DEBUG_COND(cond,x) \
-  if (cond) { _LOG_DEBUG(x) }
-
-void
-INIT_LOGGERS ();
-
-#else // else HAVE_LOG4CXX
-
-#define INIT_LOGGER(name)
-#define _LOG_FUNCTION(x)
-#define _LOG_FUNCTION_NOARGS
-#define _LOG_TRACE(x)
-#define INIT_LOGGERS(x)
-#define _LOG_ERROR(x)
-#define _LOG_ERROR_COND(cond,x)
-#define _LOG_DEBUG_COND(cond,x)
-
-#define MEMBER_LOGGER
-#define INIT_MEMBER_LOGGER(className,name)
-
-#ifdef _DEBUG
-
-#include <boost/thread/thread.hpp>
-#include <boost/date_time/posix_time/posix_time.hpp>
-#include <iostream>
-
-#define _LOG_DEBUG(x) \
-  std::clog << boost::get_system_time () << " " << boost::this_thread::get_id () << " " << x << std::endl;
-
-#else
-#define _LOG_DEBUG(x)
-#endif
-
-#endif // HAVE_LOG4CXX
-
-#endif // LOGGING_H
diff --git a/src/add-contact-panel.cpp b/src/add-contact-panel.cpp
index 770f039..48e59d6 100644
--- a/src/add-contact-panel.cpp
+++ b/src/add-contact-panel.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -11,9 +11,6 @@
 #include "add-contact-panel.hpp"
 #include "ui_add-contact-panel.h"
 
-#ifndef Q_MOC_RUN
-#endif
-
 namespace chronochat {
 
 AddContactPanel::AddContactPanel(QWidget *parent)
@@ -98,5 +95,4 @@
 
 #if WAF
 #include "add-contact-panel.moc"
-// #include "add-contact-panel.cpp.moc"
 #endif
diff --git a/src/add-contact-panel.hpp b/src/add-contact-panel.hpp
index fe8f851..0c73fa7 100644
--- a/src/add-contact-panel.hpp
+++ b/src/add-contact-panel.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -20,7 +20,7 @@
 
 namespace Ui {
 class AddContactPanel;
-}
+} // namespace Ui
 
 namespace chronochat {
 
diff --git a/src/browse-contact-dialog.cpp b/src/browse-contact-dialog.cpp
index bf9df24..887c664 100644
--- a/src/browse-contact-dialog.cpp
+++ b/src/browse-contact-dialog.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -135,5 +135,4 @@
 
 #if WAF
 #include "browse-contact-dialog.moc"
-// #include "browse-contact-dialog.cpp.moc"
 #endif
diff --git a/src/browse-contact-dialog.hpp b/src/browse-contact-dialog.hpp
index 4a081e0..f80f684 100644
--- a/src/browse-contact-dialog.hpp
+++ b/src/browse-contact-dialog.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -24,7 +24,7 @@
 
 namespace Ui {
 class BrowseContactDialog;
-}
+} // namespace Ui
 
 namespace chronochat {
 
@@ -61,7 +61,7 @@
   onNameListReady(const QStringList& nameList);
 
   void
-  onIdCertReady(const ndn::security::Certificate & idCert);
+  onIdCertReady(const ndn::security::Certificate& idCert);
 
 signals:
   void
diff --git a/src/chat-dialog-backend.cpp b/src/chat-dialog-backend.cpp
index 234e4a3..53bfdb3 100644
--- a/src/chat-dialog-backend.cpp
+++ b/src/chat-dialog-backend.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013-2016, Regents of the University of California
+ * Copyright (c) 2013-2020, Regents of the University of California
  *                          Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -68,7 +68,7 @@
     try {
       m_face->getIoService().run();
     }
-    catch (std::runtime_error& e) {
+    catch (const std::runtime_error& e) {
       {
         std::lock_guard<std::mutex>lock(m_nfdConnectionMutex);
         m_isNfdConnected = false;
@@ -131,10 +131,8 @@
                         bind(&ChatDialogBackend::sendJoin, this));
 
   // cancel existing hello event if it exists
-  if (m_helloEventId) {
+  if (m_helloEventId)
     m_helloEventId.cancel();
-    m_helloEventId.reset();
-  }
 }
 
 class IoDeviceSource
@@ -229,7 +227,7 @@
   try {
     msg.wireDecode(data.getContent().blockFromValue());
   }
-  catch (tlv::Error&) {
+  catch (const tlv::Error&) {
     // nasty stuff: as a remedy, we'll form some standard msg for inparsable msgs
     msg.setNick("inconnu");
     msg.setMsgType(ChatMessage::OTHER);
@@ -243,7 +241,7 @@
 
     if (it != m_roster.end()) {
       // cancel timeout event
-      if (static_cast<bool>(it->second.timeoutEventId))
+      if (it->second.timeoutEventId)
         it->second.timeoutEventId.cancel();
 
       // notify frontend to remove the remote session (node)
@@ -268,10 +266,6 @@
 
     uint64_t seqNo = data.getName().get(-1).toNumber();
 
-    // If a timeout event has been scheduled, cancel it.
-    if (static_cast<bool>(it->second.timeoutEventId))
-      it->second.timeoutEventId.cancel();
-
     // (Re)schedule another timeout event after 3 HELLO_INTERVAL;
     it->second.timeoutEventId =
       m_scheduler->schedule(HELLO_INTERVAL * 3,
@@ -414,7 +408,7 @@
 void
 ChatDialogBackend::prepareChatMessage(const QString& text,
                                       time_t timestamp,
-                                      ChatMessage &msg)
+                                      ChatMessage& msg)
 {
   msg.setNick(m_nick);
   msg.setChatroomName(m_chatroomName);
@@ -514,5 +508,4 @@
 
 #if WAF
 #include "chat-dialog-backend.moc"
-// #include "chat-dialog-backend.cpp.moc"
 #endif
diff --git a/src/chat-dialog-backend.hpp b/src/chat-dialog-backend.hpp
index e9543bb..0c417c3 100644
--- a/src/chat-dialog-backend.hpp
+++ b/src/chat-dialog-backend.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -25,18 +25,20 @@
 
 namespace chronochat {
 
-class NodeInfo {
+class NodeInfo
+{
 public:
   QString sessionPrefix;
   chronosync::SeqNo seqNo;
 };
 
-class UserInfo {
+class UserInfo
+{
 public:
   ndn::Name sessionPrefix;
   bool hasNick;
   std::string userNick;
-  ndn::scheduler::EventId timeoutEventId;
+  ndn::scheduler::ScopedEventId timeoutEventId;
 };
 
 class ChatDialogBackend : public QThread
@@ -98,7 +100,7 @@
   void
   prepareChatMessage(const QString& text,
                      time_t timestamp,
-                     ChatMessage &msg);
+                     ChatMessage& msg);
 
   void
   updatePrefixes();
diff --git a/src/chat-dialog.cpp b/src/chat-dialog.cpp
index 0158496..2d93156 100644
--- a/src/chat-dialog.cpp
+++ b/src/chat-dialog.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -150,7 +150,7 @@
 void
 ChatDialog::changeEvent(QEvent *e)
 {
-  switch(e->type()) {
+  switch (e->type()) {
   case QEvent::ActivationChange:
     if (isActiveWindow()) {
       emit resetIcon();
@@ -450,5 +450,4 @@
 
 #if WAF
 #include "chat-dialog.moc"
-// #include "chat-dialog.cpp.moc"
 #endif
diff --git a/src/chat-dialog.hpp b/src/chat-dialog.hpp
index 6510297..5b9a14f 100644
--- a/src/chat-dialog.hpp
+++ b/src/chat-dialog.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -32,7 +32,7 @@
 
 namespace Ui {
 class ChatDialog;
-}
+} // namespace Ui
 
 namespace chronochat {
 
diff --git a/src/chat-message.cpp b/src/chat-message.cpp
index 7932321..9a78f9d 100644
--- a/src/chat-message.cpp
+++ b/src/chat-message.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -101,23 +101,23 @@
   m_wire.parse();
 
   if (m_wire.type() != tlv::ChatMessage)
-    throw Error("Unexpected TLV number when decoding chat message packet");
+    NDN_THROW(Error("Unexpected TLV number when decoding chat message packet"));
 
   Block::element_const_iterator i = m_wire.elements_begin();
   if (i == m_wire.elements_end() || i->type() != tlv::Nick)
-    throw Error("Expect Nick but get ...");
+    NDN_THROW(Error("Expect Nick but get ..."));
   m_nick = std::string(reinterpret_cast<const char* >(i->value()),
                        i->value_size());;
   i++;
 
   if (i == m_wire.elements_end() || i->type() != tlv::ChatroomName)
-    throw Error("Expect Chatroom Name but get ...");
+    NDN_THROW(Error("Expect Chatroom Name but get ..."));
   m_chatroomName = std::string(reinterpret_cast<const char* >(i->value()),
                        i->value_size());;
   i++;
 
   if (i == m_wire.elements_end() || i->type() != tlv::ChatMessageType)
-    throw Error("Expect Chat Message Type but get ...");
+    NDN_THROW(Error("Expect Chat Message Type but get ..."));
   m_msgType = static_cast<ChatMessageType>(readNonNegativeInteger(*i));
   i++;
 
@@ -125,19 +125,19 @@
     m_data = "";
   else {
     if (i == m_wire.elements_end() || i->type() != tlv::ChatData)
-      throw Error("Expect Chat Data but get ...");
+      NDN_THROW(Error("Expect Chat Data but get ..."));
     m_data = std::string(reinterpret_cast<const char* >(i->value()),
                        i->value_size());;
     i++;
   }
 
   if (i == m_wire.elements_end() || i->type() != tlv::Timestamp)
-    throw Error("Expect Timestamp but get ...");
+    NDN_THROW(Error("Expect Timestamp but get ..."));
   m_timestamp = static_cast<time_t>(readNonNegativeInteger(*i));
   i++;
 
   if (i != m_wire.elements_end()) {
-    throw Error("Unexpected element");
+    NDN_THROW(Error("Unexpected element"));
   }
 
 }
@@ -177,4 +177,4 @@
   m_timestamp = timestamp;
 }
 
-}// namespace chronochat
+} // namespace chronochat
diff --git a/src/chat-message.hpp b/src/chat-message.hpp
index 778f505..1a44005 100644
--- a/src/chat-message.hpp
+++ b/src/chat-message.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -61,13 +61,13 @@
   const std::string&
   getChatroomName() const;
 
-  const ChatMessageType
+  ChatMessageType
   getMsgType() const;
 
   const std::string&
   getData() const;
 
-  const time_t
+  time_t
   getTimestamp() const;
 
   void
@@ -112,7 +112,7 @@
   return m_chatroomName;
 }
 
-inline const ChatMessage::ChatMessageType
+inline ChatMessage::ChatMessageType
 ChatMessage::getMsgType() const
 {
   return m_msgType;
@@ -124,7 +124,7 @@
   return m_data;
 }
 
-inline const time_t
+inline time_t
 ChatMessage::getTimestamp() const
 {
   return m_timestamp;
@@ -132,4 +132,4 @@
 
 } // namespace chronochat
 
-#endif //CHRONOCHAT_CHAT_MESSAGE_HPP
+#endif // CHRONOCHAT_CHAT_MESSAGE_HPP
diff --git a/src/chatroom-discovery-backend.cpp b/src/chatroom-discovery-backend.cpp
index 67dd7fa..3f92e01 100644
--- a/src/chatroom-discovery-backend.cpp
+++ b/src/chatroom-discovery-backend.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -11,7 +11,6 @@
 #include "chatroom-discovery-backend.hpp"
 #include <QStringList>
 
-
 #ifndef Q_MOC_RUN
 
 #endif
@@ -63,7 +62,7 @@
     try {
       m_face->getIoService().run();
     }
-    catch (std::runtime_error& e) {
+    catch (const std::runtime_error& e) {
       {
         std::lock_guard<std::mutex>lock(m_nfdConnectionMutex);
         m_isNfdConnected = false;
@@ -113,9 +112,6 @@
                                                 this, _1));
 
   // add an timer to refresh front end
-  if (m_refreshPanelId) {
-    m_refreshPanelId.cancel();
-  }
   m_refreshPanelId = m_scheduler->schedule(REFRESH_INTERVAL,
                                            [this] { sendChatroomList(); });
 }
@@ -124,7 +120,6 @@
 ChatroomDiscoveryBackend::close()
 {
   m_scheduler->cancelAllEvents();
-  m_refreshPanelId.reset();
   m_chatroomList.clear();
   m_sock.reset();
 }
@@ -169,9 +164,9 @@
         return;
       }
       else {
-        if (it->second.helloTimeoutEventId) {
+        if (it->second.helloTimeoutEventId)
           it->second.helloTimeoutEventId.cancel();
-        }
+
         it->second.isManager = false;
       }
 
@@ -250,10 +245,6 @@
   if (it != m_chatroomList.end() && it->second.isManager) {
     ndn::Block buf = it->second.info.wireEncode();
 
-    if (it->second.helloTimeoutEventId) {
-      it->second.helloTimeoutEventId.cancel();
-    }
-
     m_sock->publishData(buf.wire(), buf.size(), FRESHNESS_PERIOD, it->second.chatroomPrefix);
 
     it->second.helloTimeoutEventId =
@@ -431,9 +422,6 @@
   }
 
   emit chatroomListReady(chatroomList);
-  if (m_refreshPanelId) {
-    m_refreshPanelId.cancel();
-  }
   m_refreshPanelId = m_scheduler->schedule(REFRESH_INTERVAL,
                                            [this] { sendChatroomList(); });
 }
diff --git a/src/chatroom-discovery-backend.hpp b/src/chatroom-discovery-backend.hpp
index ad471ac..0c40ee4 100644
--- a/src/chatroom-discovery-backend.hpp
+++ b/src/chatroom-discovery-backend.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -24,7 +24,8 @@
 
 namespace chronochat {
 
-class ChatroomInfoBackend {
+class ChatroomInfoBackend
+{
 public:
   std::string chatroomName;
   Name chatroomPrefix;
@@ -36,7 +37,7 @@
   // For a user to check the status of the chatroom that he is not in.
   ndn::scheduler::EventId remoteChatroomTimeoutEventId;
   // If the user is manager, he will need the helloEventId to keep track of hello message
-  ndn::scheduler::EventId helloTimeoutEventId;
+  ndn::scheduler::ScopedEventId helloTimeoutEventId;
   // To tell whether the user is in this chatroom
   bool isParticipant;
   // To tell whether the user is the manager
@@ -228,7 +229,7 @@
   shared_ptr<ndn::Face> m_face;
 
   unique_ptr<ndn::Scheduler> m_scheduler;            // scheduler
-  ndn::scheduler::EventId m_refreshPanelId;
+  ndn::scheduler::ScopedEventId m_refreshPanelId;
   shared_ptr<chronosync::Socket> m_sock; // SyncSocket
 
   ChatroomList m_chatroomList;
diff --git a/src/chatroom-info.cpp b/src/chatroom-info.cpp
index aa8efcc..e8d47eb 100644
--- a/src/chatroom-info.cpp
+++ b/src/chatroom-info.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -137,47 +137,47 @@
   //                   Name+
 
   if (m_wire.type() != tlv::ChatroomInfo)
-    throw Error("Unexpected TLV number when decoding chatroom packet");
+    NDN_THROW(Error("Unexpected TLV number when decoding chatroom packet"));
 
   // Chatroom Info
   Block::element_const_iterator i = m_wire.elements_begin();
   if (i == m_wire.elements_end())
-    throw Error("Missing Chatroom Name");
+    NDN_THROW(Error("Missing Chatroom Name"));
   if (i->type() != tlv::ChatroomName)
-    throw Error("Expect Chatroom Name but get TLV Type " + std::to_string(i->type()));
+    NDN_THROW(Error("Expect Chatroom Name but get TLV Type " + std::to_string(i->type())));
   m_chatroomName.wireDecode(i->blockFromValue());
   ++i;
 
   // Trust Model
   if (i == m_wire.elements_end())
-    throw Error("Missing Trust Model");
+    NDN_THROW(Error("Missing Trust Model"));
   if (i->type() != tlv::TrustModel)
-    throw Error("Expect Trust Model but get TLV Type " + std::to_string(i->type()));
+    NDN_THROW(Error("Expect Trust Model but get TLV Type " + std::to_string(i->type())));
   m_trustModel =
       static_cast<TrustModel>(readNonNegativeInteger(*i));
   ++i;
 
   // Chatroom Sync Prefix
   if (i == m_wire.elements_end())
-    throw Error("Missing Chatroom Prefix");
+    NDN_THROW(Error("Missing Chatroom Prefix"));
   if (i->type() != tlv::ChatroomPrefix)
-    throw Error("Expect Chatroom Prefix but get TLV Type " + std::to_string(i->type()));
+    NDN_THROW(Error("Expect Chatroom Prefix but get TLV Type " + std::to_string(i->type())));
   m_syncPrefix.wireDecode(i->blockFromValue());
   ++i;
 
   // Manager Prefix
   if (i == m_wire.elements_end())
-    throw Error("Missing Manager Prefix");
+    NDN_THROW(Error("Missing Manager Prefix"));
   if (i->type() != tlv::ManagerPrefix)
-    throw Error("Expect Manager Prefix but get TLV Type " + std::to_string(i->type()));
+    NDN_THROW(Error("Expect Manager Prefix but get TLV Type " + std::to_string(i->type())));
   m_manager.wireDecode(i->blockFromValue());
   ++i;
 
   // Participants
   if (i == m_wire.elements_end())
-    throw Error("Missing Participant");
+    NDN_THROW(Error("Missing Participant"));
   if (i->type() != tlv::Participants)
-    throw Error("Expect Participant but get TLV Type " + std::to_string(i->type()));
+    NDN_THROW(Error("Expect Participant but get TLV Type " + std::to_string(i->type())));
 
   Block temp = *i;
   temp.parse();
@@ -189,15 +189,15 @@
     ++j;
   }
   if (j != temp.elements_end())
-    throw Error("Unexpected element");
+    NDN_THROW(Error("Unexpected element"));
 
   if (m_participants.empty())
-    throw Error("No participant in the chatroom");
+    NDN_THROW(Error("No participant in the chatroom"));
 
   ++i;
 
   if (i != m_wire.elements_end()) {
-    throw Error("Unexpected element");
+    NDN_THROW(Error("Unexpected element"));
   }
 }
 
diff --git a/src/chatroom-info.hpp b/src/chatroom-info.hpp
index 81e0fde..2572193 100644
--- a/src/chatroom-info.hpp
+++ b/src/chatroom-info.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -64,7 +64,7 @@
   const Name::Component&
   getName() const;
 
-  const TrustModel
+  TrustModel
   getTrustModel() const;
 
   const Name&
@@ -115,7 +115,7 @@
   return m_chatroomName;
 }
 
-inline const ChatroomInfo::TrustModel
+inline ChatroomInfo::TrustModel
 ChatroomInfo::getTrustModel() const
 {
   return m_trustModel;
diff --git a/src/common.hpp b/src/common.hpp
index 3b14f79..90f5e54 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -1,6 +1,13 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * COPYRIGHT MSG GOES HERE...
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2020, Regents of the University of California
+ *                     Yingdi Yu
+ *
+ * BSD license, See the LICENSE file for more information
+ *
+ * Author: Mengjin Yan <jane.yan0129@gmail.com>
+ *         Yingdi Yu <yingdi@cs.ucla.edu>
+ *         Qiuhan Ding <qiuhanding@cs.ucla.edu>
  */
 
 #ifndef CHRONOCHAT_COMMON_HPP
@@ -22,51 +29,33 @@
 
 #include <cstddef>
 #include <list>
-#include <set>
 #include <map>
-#include <queue>
 #include <vector>
 #include <string>
 
+#include <boost/assert.hpp>
+
 #include <ndn-cxx/interest.hpp>
 #include <ndn-cxx/data.hpp>
 
-#include <boost/algorithm/string.hpp>
-#include <boost/asio.hpp>
-#include <boost/assert.hpp>
-#include <boost/lexical_cast.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/property_tree/ptree.hpp>
-
 namespace chronochat {
 
 using std::size_t;
 
-using boost::noncopyable;
-
 using std::shared_ptr;
 using std::unique_ptr;
-using std::weak_ptr;
-using std::enable_shared_from_this;
 using std::make_shared;
-using std::static_pointer_cast;
-using std::dynamic_pointer_cast;
-using std::const_pointer_cast;
 using std::function;
 using std::bind;
-using std::ref;
-using std::cref;
 
 using ndn::Interest;
 using ndn::Data;
 using ndn::Name;
 using ndn::Block;
-using ndn::Signature;
-using ndn::KeyLocator;
 
 namespace tlv {
 using namespace ndn::tlv;
-}
+} // namespace tlv
 
 namespace name = ndn::name;
 namespace time = ndn::time;
diff --git a/src/conf.cpp b/src/conf.cpp
index d02fe08..db44604 100644
--- a/src/conf.cpp
+++ b/src/conf.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -79,14 +79,14 @@
   //            String
 
   if (m_wire.type() != tlv::Conf)
-    throw Error("Unexpected TLV number when decoding conf packet");
+    NDN_THROW(Error("Unexpected TLV number when decoding conf packet"));
 
   // Identity
   Block::element_const_iterator i = m_wire.elements_begin();
   if (i == m_wire.elements_end())
-    throw Error("Missing Identity");
+    NDN_THROW(Error("Missing Identity"));
   if (i->type() != tlv::Name)
-    throw Error("Expect Identity but get TLV Type " + std::to_string(i->type()));
+    NDN_THROW(Error("Expect Identity but get TLV Type " + std::to_string(i->type())));
 
   m_identity.wireDecode(*i);
   ++i;
@@ -95,15 +95,14 @@
   if (i == m_wire.elements_end())
     return;
   if (i->type() != tlv::Nick)
-    throw Error("Expect Nick but get TLV Type " + std::to_string(i->type()));
+    NDN_THROW(Error("Expect Nick but get TLV Type " + std::to_string(i->type())));
 
   m_nick = std::string(reinterpret_cast<const char* >(i->value()),
                        i->value_size());
   ++i;
 
-  if (i != m_wire.elements_end()) {
-    throw Error("Unexpected element");
-  }
+  if (i != m_wire.elements_end())
+    NDN_THROW(Error("Unexpected element"));
 }
 
 void
diff --git a/src/conf.hpp b/src/conf.hpp
index 3b4f394..8df9f62 100644
--- a/src/conf.hpp
+++ b/src/conf.hpp
@@ -1,21 +1,17 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
  * Author: Qiuhan Ding <qiuhanding@cs.ucla.edu>
  */
 
-#ifndef CHRONOCHAT_CONFIG_HPP
-#define CHRONOCHAT_CONFIG_HPP
+#ifndef CHRONOCHAT_CONF_HPP
+#define CHRONOCHAT_CONF_HPP
 
 #include "common.hpp"
 #include "tlv.hpp"
-#include <ndn-cxx/util/concepts.hpp>
-#include <ndn-cxx/encoding/block.hpp>
-#include <ndn-cxx/encoding/encoding-buffer.hpp>
-#include <list>
 
 namespace chronochat {
 
@@ -84,4 +80,4 @@
 
 } // namespace chronochat
 
-#endif //CHRONOCHAT_CONF_HPP
+#endif // CHRONOCHAT_CONF_HPP
diff --git a/src/contact-manager.cpp b/src/contact-manager.cpp
index 2bb5153..5a5f5bb 100644
--- a/src/contact-manager.cpp
+++ b/src/contact-manager.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013-2016, Regents of the University of California
+ * Copyright (c) 2013-2020, Regents of the University of California
  *                          Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -9,10 +9,6 @@
  *         Qiuhan Ding <qiuhanding@cs.ucla.edu>
  */
 
-#if __clang__
-#pragma clang diagnostic ignored "-Wtautological-compare"
-#endif
-
 #include "contact-manager.hpp"
 #include <QStringList>
 #include <QFile>
@@ -28,7 +24,6 @@
 #include <boost/asio.hpp>
 #include <boost/tokenizer.hpp>
 #include <boost/filesystem.hpp>
-#include "logging.h"
 #endif
 
 namespace fs = boost::filesystem;
@@ -97,6 +92,7 @@
 
   Interest interest(interestName);
   interest.setInterestLifetime(time::milliseconds(1000));
+  interest.setCanBePrefix(true);
   interest.setMustBeFresh(false);
 
   m_face.expressInterest(interest,
@@ -112,17 +108,14 @@
 void
 ContactManager::prepareEndorseInfo(const Name& identity)
 {
-  // _LOG_DEBUG("prepareEndorseInfo");
   const Profile& profile = m_bufferedContacts[identity].m_selfEndorseCert->getProfile();
 
   shared_ptr<EndorseInfo> endorseInfo = make_shared<EndorseInfo>();
   m_bufferedContacts[identity].m_endorseInfo = endorseInfo;
 
   map<string, size_t> endorseCount;
-  for (Profile::const_iterator pIt = profile.begin(); pIt != profile.end(); pIt++) {
-    // _LOG_DEBUG("prepareEndorseInfo: profile[" << pIt->first << "]: " << pIt->second);
+  for (Profile::const_iterator pIt = profile.begin(); pIt != profile.end(); pIt++)
     endorseCount[pIt->first] = 0;
-  }
 
   size_t endorseCertCount = 0;
 
@@ -179,13 +172,13 @@
     else
       emit contactInfoFetchFailed(QString::fromStdString(identity.toUri() + ": verification failed"));
   }
-  catch(Block::Error& e) {
+  catch (const Block::Error& e) {
     emit contactInfoFetchFailed(QString::fromStdString(identity.toUri() + ": block error " + e.what()));
   }
-  catch(EndorseCertificate::Error& e) {
+  catch (const EndorseCertificate::Error& e) {
     emit contactInfoFetchFailed(QString::fromStdString(identity.toUri() + ": cert error " + e.what()));
   }
-  catch(Data::Error& e) {
+  catch (const Data::Error& e) {
     emit contactInfoFetchFailed(QString::fromStdString(identity.toUri() + ": data error " + e.what()));
   }
 }
@@ -219,7 +212,7 @@
     m_bufferedContacts[identity].m_endorseCollection = endorseCollection;
     fetchEndorseCertificateInternal(identity, 0);
   }
-  catch (std::runtime_error&) {
+  catch (const std::runtime_error&) {
     prepareEndorseInfo(identity);
   }
 }
@@ -235,7 +228,6 @@
 void
 ContactManager::onDnsCollectEndorseTimeoutNotify(const Interest& interest, const Name& identity)
 {
-  // _LOG_DEBUG("onDnsCollectEndorseTimeoutNotify: " << interest.getName());
   prepareEndorseInfo(identity);
 }
 
@@ -283,6 +275,7 @@
 
       Interest interest(interestName);
       interest.setMustBeFresh(true);
+      interest.setCanBePrefix(true);
       interest.setInterestLifetime(time::milliseconds(1000));
 
       ndn::security::DataValidationSuccessCallback onValidated =
@@ -368,14 +361,12 @@
 ContactManager::onIdentityCertValidationFailed(const Data& data,
                                                const ndn::security::ValidationError& error)
 {
-  // _LOG_DEBUG("ContactManager::onIdentityCertValidationFailed " << data->getName());
   decreaseIdCertCount();
 }
 
 void
 ContactManager::onIdentityCertTimeoutNotify(const Interest& interest)
 {
-  // _LOG_DEBUG("ContactManager::onIdentityCertTimeoutNotify: " << interest.getName());
   decreaseIdCertCount();
 }
 
@@ -527,7 +518,6 @@
                                 const ndn::security::DataValidationFailureCallback& onValidationFailed,
                                 const TimeoutNotify& timeoutNotify)
 {
-  // _LOG_DEBUG("On interest timeout: " << interest.getName());
   if (retry > 0)
     sendInterest(interest, onValidated, onValidationFailed, timeoutNotify, retry-1);
   else
@@ -578,7 +568,7 @@
                                                 .getDefaultCertificate();
     if (cert.getKeyName() == interestName)
       return m_face.put(cert);
-  } catch (ndn::security::Pib::Error&) {}
+  } catch (const ndn::security::Pib::Error&) {}
 
   data = m_contactStorage->getSelfEndorseCertificate();
   if (static_cast<bool>(data) && data->getKeyName().equals(interestName))
@@ -597,38 +587,20 @@
 
   m_contactStorage = make_shared<ContactStorage>(m_identity);
 
-  Name dnsPrefix;
-  dnsPrefix.append(m_identity).append("DNS");
-  auto dnsListenerId = make_shared<ndn::RegisteredPrefixHandle>(
-    m_face.setInterestFilter(dnsPrefix,
-                             bind(&ContactManager::onDnsInterest, this, _1, _2),
-                             bind(&ContactManager::onDnsRegisterFailed, this, _1, _2)));
+  m_dnsListenerHandle = m_face.setInterestFilter(
+    Name(m_identity).append("DNS"),
+    bind(&ContactManager::onDnsInterest, this, _1, _2),
+    bind(&ContactManager::onDnsRegisterFailed, this, _1, _2));
 
-  Name keyPrefix;
-  keyPrefix.append(m_identity).append("KEY");
-  auto keyListenerId = make_shared<ndn::RegisteredPrefixHandle>(
-    m_face.setInterestFilter(keyPrefix,
-                             bind(&ContactManager::onKeyInterest, this, _1, _2),
-                             bind(&ContactManager::onDnsRegisterFailed, this, _1, _2)));
+  m_keyListenerHandle = m_face.setInterestFilter(
+    Name(m_identity).append("KEY"),
+    bind(&ContactManager::onKeyInterest, this, _1, _2),
+    bind(&ContactManager::onDnsRegisterFailed, this, _1, _2));
 
-  Name profileCertPrefix;
-  profileCertPrefix.append(m_identity).append("PROFILE-CERT");
-  auto profileCertListenerId = make_shared<ndn::RegisteredPrefixHandle>(
-    m_face.setInterestFilter(profileCertPrefix,
-                             bind(&ContactManager::onKeyInterest, this, _1, _2),
-                             bind(&ContactManager::onDnsRegisterFailed, this, _1, _2)));
-
-  if (m_dnsListenerId != 0)
-    m_dnsListenerId->unregister();
-  m_dnsListenerId = dnsListenerId;
-
-  if (m_keyListenerId != 0)
-    m_keyListenerId->unregister();
-  m_keyListenerId = keyListenerId;
-
-  if (m_profileCertListenerId != 0)
-    m_profileCertListenerId->unregister();
-  m_profileCertListenerId = profileCertListenerId;
+  m_profileCertListenerHandle = m_face.setInterestFilter(
+    Name(m_identity).append("PROFILE-CERT"),
+    bind(&ContactManager::onKeyInterest, this, _1, _2),
+    bind(&ContactManager::onDnsRegisterFailed, this, _1, _2));
 
   m_contactList.clear();
   m_contactStorage->getAllContacts(m_contactList);
@@ -647,10 +619,9 @@
   Name interestName;
   interestName.append(identityName).append("DNS").append("PROFILE");
 
-  // _LOG_DEBUG("onFetchContactInfo " << identity.toStdString() << " profile: " << interestName);
-
   Interest interest(interestName);
   interest.setInterestLifetime(time::milliseconds(1000));
+  interest.setCanBePrefix(true);
   interest.setMustBeFresh(true);
 
   ndn::security::DataValidationSuccessCallback onValidated =
@@ -666,14 +637,12 @@
 void
 ContactManager::onAddFetchedContact(const QString& identity)
 {
-  // _LOG_DEBUG("onAddFetchedContact");
-
   Name identityName(identity.toStdString());
 
   BufferedContacts::const_iterator it = m_bufferedContacts.find(identityName);
   if (it != m_bufferedContacts.end()) {
     Contact contact(*(it->second.m_selfEndorseCert));
-    // _LOG_DEBUG("onAddFetchedContact: contact ready");
+
     try {
       m_contactStorage->addContact(contact);
       m_bufferedContacts.erase(identityName);
@@ -683,7 +652,7 @@
 
       onWaitForContactList();
     }
-    catch(ContactStorage::Error& e) {
+    catch (const ContactStorage::Error& e) {
       emit warning(QString::fromStdString(e.what()));
     }
   }
@@ -699,8 +668,6 @@
   if (!static_cast<bool>(newProfile))
     return;
 
-  // _LOG_DEBUG("ContactManager::onUpdateProfile: getProfile");
-
   shared_ptr<EndorseCertificate> newEndorseCertificate =
     getSignedSelfEndorseCertificate(*newProfile);
 
@@ -773,7 +740,7 @@
       if (!it->empty())
         bufferedIdCertNames.push_back(*it);
   }
-  catch(std::exception &e) {
+  catch (const std::exception& e) {
     emit warning(QString::fromStdString("Fail to fetch certificate directory! #N"));
   }
 
@@ -790,6 +757,7 @@
     Interest interest(certName);
     interest.setInterestLifetime(time::milliseconds(1000));
     interest.setMustBeFresh(true);
+    interest.setCanBePrefix(true);
 
     ndn::security::DataValidationSuccessCallback onValidated =
     bind(&ContactManager::onIdentityCertValidated, this, _1);
@@ -829,7 +797,7 @@
 
       onWaitForContactList();
     }
-    catch(ContactStorage::Error& e) {
+    catch (const ContactStorage::Error& e) {
       emit warning(QString::fromStdString(e.what()));
     }
   }
@@ -908,5 +876,4 @@
 
 #if WAF
 #include "contact-manager.moc"
-// #include "contact-manager.cpp.moc"
 #endif
diff --git a/src/contact-manager.hpp b/src/contact-manager.hpp
index b475eb4..456a19d 100644
--- a/src/contact-manager.hpp
+++ b/src/contact-manager.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -256,7 +256,8 @@
 
 private:
 
-  class FetchedInfo {
+  class FetchedInfo
+  {
   public:
     shared_ptr<EndorseCertificate> m_selfEndorseCert;
     shared_ptr<EndorseCollection> m_endorseCollection;
@@ -283,9 +284,9 @@
   BufferedIdCerts m_bufferedIdCerts;
 
   // Tmp Dns
-  shared_ptr<ndn::RegisteredPrefixHandle> m_dnsListenerId;
-  shared_ptr<ndn::RegisteredPrefixHandle> m_keyListenerId;
-  shared_ptr<ndn::RegisteredPrefixHandle> m_profileCertListenerId;
+  ndn::ScopedRegisteredPrefixHandle m_dnsListenerHandle;
+  ndn::ScopedRegisteredPrefixHandle m_keyListenerHandle;
+  ndn::ScopedRegisteredPrefixHandle m_profileCertListenerHandle;
 
   RecLock m_collectCountMutex;
   size_t m_collectCount;
diff --git a/src/contact-panel.cpp b/src/contact-panel.cpp
index 8841d5d..04b68d5 100644
--- a/src/contact-panel.cpp
+++ b/src/contact-panel.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -18,12 +18,6 @@
 #include <QtSql/QSqlField>
 #include <QtSql/QSqlError>
 
-#ifndef Q_MOC_RUN
-#include "logging.h"
-#endif
-
-// INIT_LOGGER("ContactPanel");
-
 namespace chronochat {
 
 ContactPanel::ContactPanel(QWidget *parent)
@@ -129,15 +123,10 @@
 void
 ContactPanel::onCloseDBModule()
 {
-  // _LOG_DEBUG("close db module");
-  if (m_trustScopeModel) {
+  if (m_trustScopeModel)
     delete m_trustScopeModel;
-    // _LOG_DEBUG("trustScopeModel closed");
-  }
-  if (m_endorseDataModel) {
+  if (m_endorseDataModel)
     delete m_endorseDataModel;
-    // _LOG_DEBUG("endorseDataModel closed");
-  }
 }
 
 void
@@ -211,8 +200,8 @@
 
 // private slots
 void
-ContactPanel::onSelectionChanged(const QItemSelection &selected,
-                                 const QItemSelection &deselected)
+ContactPanel::onSelectionChanged(const QItemSelection& selected,
+                                 const QItemSelection& deselected)
 {
   QModelIndexList items = selected.indexes();
   QString alias = m_contactListModel->data(items.first(), Qt::DisplayRole).toString();
@@ -341,5 +330,4 @@
 
 #if WAF
 #include "contact-panel.moc"
-// #include "contact-panel.cpp.moc"
 #endif
diff --git a/src/contact-panel.hpp b/src/contact-panel.hpp
index 7eec224..737b487 100644
--- a/src/contact-panel.hpp
+++ b/src/contact-panel.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -11,20 +11,20 @@
 #ifndef CHRONOCHAT_CONTACT_PANEL_HPP
 #define CHRONOCHAT_CONTACT_PANEL_HPP
 
+#include "set-alias-dialog.hpp"
+#include "endorse-combobox-delegate.hpp"
+
 #include <QDialog>
 #include <QStringListModel>
 #include <QSqlTableModel>
 #include <QItemSelection>
 
-#include "set-alias-dialog.hpp"
-#include "endorse-combobox-delegate.hpp"
-
 #ifndef Q_MOC_RUN
 #endif
 
 namespace Ui {
 class ContactPanel;
-}
+} // namespace Ui
 
 namespace chronochat {
 
diff --git a/src/contact-storage.cpp b/src/contact-storage.cpp
index d5e0fe2..76ae31d 100644
--- a/src/contact-storage.cpp
+++ b/src/contact-storage.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -10,10 +10,9 @@
  */
 
 #include "contact-storage.hpp"
-
-#include <boost/filesystem.hpp>
 #include "cryptopp.hpp"
 
+#include <boost/filesystem.hpp>
 
 namespace chronochat {
 
@@ -167,7 +166,7 @@
 
   int res = sqlite3_open((chronosDir / getDBName()).c_str(), &m_db);
   if (res != SQLITE_OK)
-    throw Error("chronochat DB cannot be open/created");
+    NDN_THROW(Error("chronochat DB cannot be open/created"));
 
   initializeTable("SelfProfile", INIT_SP_TABLE);
   initializeTable("SelfEndorse", INIT_SE_TABLE);
@@ -215,9 +214,9 @@
 
   if (!tableExist) {
     char *errmsg = 0;
-    res = sqlite3_exec(m_db, sqlCreateStmt.c_str (), NULL, NULL, &errmsg);
+    res = sqlite3_exec(m_db, sqlCreateStmt.c_str (), nullptr, nullptr, &errmsg);
     if (res != SQLITE_OK && errmsg != 0)
-      throw Error("Init \"error\" in " + tableName);
+      NDN_THROW(Error("Init \"error\" in " + tableName));
   }
 }
 
@@ -396,7 +395,7 @@
 ContactStorage::addContact(const Contact& contact)
 {
   if (doesContactExist(contact.getNameSpace()))
-    throw Error("Normal Contact has already existed");
+    NDN_THROW(Error("Normal Contact has already existed"));
 
   string identity = contact.getNameSpace().toUri();
   bool isIntroducer = contact.isIntroducer();
diff --git a/src/contact-storage.hpp b/src/contact-storage.hpp
index 10bb117..b4f4e04 100644
--- a/src/contact-storage.hpp
+++ b/src/contact-storage.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -25,7 +25,7 @@
   class Error : public std::runtime_error
   {
   public:
-    Error(const std::string &what)
+    Error(const std::string& what)
       : std::runtime_error(what)
     {
     }
diff --git a/src/contact.hpp b/src/contact.hpp
index b0fe674..4b04b47 100644
--- a/src/contact.hpp
+++ b/src/contact.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -12,11 +12,12 @@
 #define CHRONOCHAT_CONTACT_HPP
 
 #include "common.hpp"
-#include <ndn-cxx/security/certificate.hpp>
-#include <ndn-cxx/util/regex.hpp>
 #include "endorse-certificate.hpp"
 #include "profile.hpp"
 
+#include <ndn-cxx/security/certificate.hpp>
+#include <ndn-cxx/util/regex.hpp>
+
 namespace chronochat {
 
 class Contact
@@ -45,7 +46,7 @@
     try {
       m_notBefore = identityCertificate.getValidityPeriod().getPeriod().first;
       m_notAfter = identityCertificate.getValidityPeriod().getPeriod().second;
-    } catch (tlv::Error&) {}
+    } catch (const tlv::Error&) {}
   }
 
   Contact(const EndorseCertificate& endorseCertificate,
@@ -69,7 +70,7 @@
     try {
       m_notBefore = endorseCertificate.getValidityPeriod().getPeriod().first;
       m_notAfter = endorseCertificate.getValidityPeriod().getPeriod().second;
-    } catch (tlv::Error&) {}
+    } catch (const tlv::Error&) {}
   }
 
   Contact(const Name& identity,
diff --git a/src/controller-backend.cpp b/src/controller-backend.cpp
index 7c6b8a5..9078cf2 100644
--- a/src/controller-backend.cpp
+++ b/src/controller-backend.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013-2016, Regents of the University of California
+ * Copyright (c) 2013-2020, Regents of the University of California
  *                          Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -12,11 +12,14 @@
 #include "controller-backend.hpp"
 
 #ifndef Q_MOC_RUN
+#include <iostream>
+#include <boost/asio.hpp>
+
 #include <ndn-cxx/util/segment-fetcher.hpp>
 #include <ndn-cxx/security/signing-helpers.hpp>
 #include <ndn-cxx/security/certificate-fetcher-offline.hpp>
+
 #include "invitation.hpp"
-#include <iostream>
 #endif
 
 namespace chronochat {
@@ -58,7 +61,7 @@
       setInvitationListener();
       m_face.processEvents();
     }
-    catch (std::runtime_error& e) {
+    catch (const std::runtime_error& e) {
       {
         std::lock_guard<std::mutex>lock(m_nfdConnectionMutex);
         m_isNfdConnected = false;
@@ -136,35 +139,13 @@
   invitationPrefix.append(m_identity).append("CHRONOCHAT-INVITATION");
   requestPrefix.append(m_identity).append("CHRONOCHAT-INVITATION-REQUEST");
 
-  auto invitationListenerId =
-    make_shared<ndn::RegisteredPrefixHandle>(m_face.setInterestFilter(invitationPrefix,
-                             bind(&ControllerBackend::onInvitationInterest,
-                                  this, _1, _2, offset),
-                             bind(&ControllerBackend::onInvitationRegisterFailed,
-                                  this, _1, _2)));
+  m_invitationListenerHandle = m_face.setInterestFilter(invitationPrefix,
+    bind(&ControllerBackend::onInvitationInterest, this, _1, _2, offset),
+    bind(&ControllerBackend::onInvitationRegisterFailed, this, _1, _2));
 
-  if (m_invitationListenerId != 0) {
-    invitationListenerId->unregister(
-      bind(&ControllerBackend::onInvitationPrefixReset, this),
-      bind(&ControllerBackend::onInvitationPrefixResetFailed, this, _1));
-  }
-
-  m_invitationListenerId = invitationListenerId;
-
-  auto requestListenerId =
-    make_shared<ndn::RegisteredPrefixHandle>(
-      m_face.setInterestFilter(requestPrefix,
-                               bind(&ControllerBackend::onInvitationRequestInterest,
-                                    this, _1, _2, offset),
-                               [] (const Name& prefix, const std::string& failInfo) {}));
-
-  if (m_requestListenerId != 0) {
-    m_requestListenerId->unregister(
-      []{},
-      [] (const std::string& failInfo) {});
-  }
-
-  m_requestListenerId = requestListenerId;
+  m_requestListenerHandle = m_face.setInterestFilter(requestPrefix,
+    bind(&ControllerBackend::onInvitationRequestInterest, this, _1, _2, offset),
+    [] (const Name& prefix, const std::string& failInfo) {});
 }
 
 ndn::Name
@@ -173,25 +154,12 @@
   return Name("/ndn/broadcast");
 }
 
-void
-ControllerBackend::onInvitationPrefixReset()
-{
-  // _LOG_DEBUG("ControllerBackend::onInvitationPrefixReset");
-}
-
-void
-ControllerBackend::onInvitationPrefixResetFailed(const std::string& failInfo)
-{
-  // _LOG_DEBUG("ControllerBackend::onInvitationPrefixResetFailed: " << failInfo);
-}
-
 
 void
 ControllerBackend::onInvitationInterest(const ndn::Name& prefix,
                                         const ndn::Interest& interest,
                                         size_t routingPrefixOffset)
 {
-  // _LOG_DEBUG("onInvitationInterest: " << interest.getName());
   shared_ptr<Interest> invitationInterest =
     make_shared<Interest>(interest.getName().getSubName(routingPrefixOffset));
 
@@ -201,7 +169,7 @@
       if (m_chatDialogList.contains(QString::fromStdString(invitation.getChatroom())))
         return;
   }
-  catch (Invitation::Error& e) {
+  catch (const Invitation::Error& e) {
     // Cannot parse the invitation;
     return;
   }
@@ -215,7 +183,6 @@
 void
 ControllerBackend::onInvitationRegisterFailed(const Name& prefix, const std::string& failInfo)
 {
-  // _LOG_DEBUG("ControllerBackend::onInvitationRegisterFailed: " << failInfo);
 }
 
 void
@@ -258,8 +225,6 @@
 ControllerBackend::onInvitationValidationFailed(const Interest& interest,
                                                 const ndn::security::ValidationError& failureInfo)
 {
-  // _LOG_DEBUG("Invitation: " << interest->getName() <<
-  //            " cannot not be validated due to: " << failureInfo);
 }
 
 void
@@ -288,7 +253,7 @@
         prefix = Name("/private/local");
     }
   }
-  catch (Block::Error& e) {
+  catch (const Block::Error& e) {
     prefix = Name("/private/local");
   }
 
@@ -441,8 +406,6 @@
       .append(ROUTING_HINT_SEPARATOR)
       .append(response->getName());
 
-    // _LOG_DEBUG("onInvitationResponded: prepare reply " << wrappedName);
-
     shared_ptr<Data> wrappedData = make_shared<Data>(wrappedName);
     wrappedData->setContent(response->wireEncode());
     wrappedData->setFreshnessPeriod(time::milliseconds(1000));
@@ -485,6 +448,7 @@
   Interest interest(interestName);
   interest.setInterestLifetime(time::milliseconds(10000));
   interest.setMustBeFresh(true);
+  interest.setCanBePrefix(true);
   interest.getNonce();
   m_face.expressInterest(interest,
                          bind(&ControllerBackend::onRequestResponse, this, _1, _2),
@@ -517,5 +481,4 @@
 
 #if WAF
 #include "controller-backend.moc"
-// #include "controller-backend.cpp.moc"
 #endif
diff --git a/src/controller-backend.hpp b/src/controller-backend.hpp
index 18b1cd8..2e3aa9f 100644
--- a/src/controller-backend.hpp
+++ b/src/controller-backend.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -57,12 +57,6 @@
   getInvitationRoutingPrefix();
 
   void
-  onInvitationPrefixReset();
-
-  void
-  onInvitationPrefixResetFailed(const std::string& failInfo);
-
-  void
   onInvitationInterest(const ndn::Name& prefix, const ndn::Interest& interest,
                        size_t routingPrefixOffset);
 
@@ -170,8 +164,8 @@
   ndn::security::ValidatorNull m_nullValidator;
 
   // RegisteredPrefixId
-  shared_ptr<ndn::RegisteredPrefixHandle> m_invitationListenerId;
-  shared_ptr<ndn::RegisteredPrefixHandle> m_requestListenerId;
+  ndn::ScopedRegisteredPrefixHandle m_invitationListenerHandle;
+  ndn::ScopedRegisteredPrefixHandle m_requestListenerHandle;
 
   // ChatRoomList
   QStringList m_chatDialogList;
diff --git a/src/controller.cpp b/src/controller.cpp
index d41b65d..b8b2c97 100644
--- a/src/controller.cpp
+++ b/src/controller.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -9,23 +9,18 @@
  *         Qiuhan Ding <qiuhanding@cs.ucla.edu>
  */
 
+#include "controller.hpp"
+#include "cryptopp.hpp"
+#include "conf.hpp"
+#include "endorse-info.hpp"
+
 #include <QApplication>
 #include <QMessageBox>
 #include <QDir>
 #include <QTimer>
-#include "controller.hpp"
 
-#ifndef Q_MOC_RUN
 #include <boost/filesystem.hpp>
-#include <boost/lexical_cast.hpp>
 #include <ndn-cxx/util/random.hpp>
-#include "cryptopp.hpp"
-#include "logging.h"
-#include "conf.hpp"
-#include "endorse-info.hpp"
-#endif
-
-INIT_LOGGER("chronochat.Controller");
 
 Q_DECLARE_METATYPE(ndn::Name)
 Q_DECLARE_METATYPE(ndn::security::Certificate)
@@ -286,9 +281,6 @@
   m_db.setDatabaseName(path);
 
   m_db.open();
-
-  // bool ok = m_db.open();
-  // _LOG_DEBUG("DB opened: " << std::boolalpha << ok );
 }
 
 void
@@ -322,12 +314,12 @@
     else
       m_nick = m_identity.get(-1).toUri();
   }
-  catch (tlv::Error&) {
+  catch (const tlv::Error&) {
     try {
       ndn::KeyChain keyChain;
       m_identity = keyChain.getPib().getDefaultIdentity().getName();
     }
-    catch (ndn::security::pib::Pib::Error&) {
+    catch (const ndn::security::pib::Pib::Error&) {
       m_identity.clear();
       m_identity.append("chronochat-tmp-identity")
                 .append(getRandomString());
@@ -553,7 +545,6 @@
 Controller::onIdentityUpdatedContinued()
 {
   QString connection = m_db.connectionName();
-  // _LOG_DEBUG("connection name: " << connection.toStdString());
   QSqlDatabase::removeDatabase(connection);
   m_db.close();
 
@@ -839,5 +830,4 @@
 
 #if WAF
 #include "controller.moc"
-// #include "controller.cpp.moc"
 #endif
diff --git a/src/digest-tree-scene.cpp b/src/digest-tree-scene.cpp
index 55d9a36..093b33d 100644
--- a/src/digest-tree-scene.cpp
+++ b/src/digest-tree-scene.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -165,7 +165,7 @@
 }
 
 void
-DigestTreeScene::plotEdge(const std::vector<TreeLayout::Coordinate> &childNodesCo, int nodeSize)
+DigestTreeScene::plotEdge(const std::vector<TreeLayout::Coordinate>& childNodesCo, int nodeSize)
 {
   int n = childNodesCo.size();
   for (int i = 0; i < n; i++) {
@@ -275,5 +275,4 @@
 
 #if WAF
 #include "digest-tree-scene.moc"
-// #include "digest-tree-scene.cpp.moc"
 #endif
diff --git a/src/digest-tree-scene.hpp b/src/digest-tree-scene.hpp
index 562feeb..57d6387 100644
--- a/src/digest-tree-scene.hpp
+++ b/src/digest-tree-scene.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
diff --git a/src/discovery-panel.cpp b/src/discovery-panel.cpp
index 06c7cf7..4c5dcf7 100644
--- a/src/discovery-panel.cpp
+++ b/src/discovery-panel.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -105,7 +105,7 @@
   ui->NameData->setText(QString::fromStdString(info.getName().toUri()));
   ui->NameSpaceData->setText(QString::fromStdString(info.getSyncPrefix().toUri()));
 
-  switch(info.getTrustModel()) {
+  switch (info.getTrustModel()) {
   case 2:
     {
       ui->TrustModelData->setText(QString("Hierarchical"));
@@ -162,8 +162,8 @@
 
 // private slots
 void
-DiscoveryPanel::onSelectedChatroomChanged(const QItemSelection &selected,
-                                          const QItemSelection &deselected)
+DiscoveryPanel::onSelectedChatroomChanged(const QItemSelection& selected,
+                                          const QItemSelection& deselected)
 {
   QModelIndexList items = selected.indexes();
   QString chatroomName = m_chatroomListModel->data(items.first(), Qt::DisplayRole).toString();
@@ -187,8 +187,8 @@
 }
 
 void
-DiscoveryPanel::onSelectedParticipantChanged(const QItemSelection &selected,
-                                             const QItemSelection &deselected)
+DiscoveryPanel::onSelectedParticipantChanged(const QItemSelection& selected,
+                                             const QItemSelection& deselected)
 {
   if (m_isParticipant)
     return;
@@ -231,5 +231,4 @@
 
 #if WAF
 #include "discovery-panel.moc"
-// #include "discovery-panel.cpp.moc"
 #endif
diff --git a/src/discovery-panel.hpp b/src/discovery-panel.hpp
index 473283f..59c07b8 100644
--- a/src/discovery-panel.hpp
+++ b/src/discovery-panel.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -21,7 +21,7 @@
 
 namespace Ui {
 class DiscoveryPanel;
-}
+} // namespace Ui
 
 namespace chronochat {
 
diff --git a/src/endorse-certificate.cpp b/src/endorse-certificate.cpp
index f9286c6..42b1cb1 100644
--- a/src/endorse-certificate.cpp
+++ b/src/endorse-certificate.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -10,12 +10,12 @@
  */
 
 #include "endorse-certificate.hpp"
+#include "endorse-extension.hpp"
+
 #include <boost/iostreams/stream.hpp>
 #include <ndn-cxx/encoding/buffer-stream.hpp>
 #include <ndn-cxx/security/additional-description.hpp>
 #include <ndn-cxx/security/validity-period.hpp>
-#include "endorse-extension.hpp"
-#include <list>
 
 namespace chronochat {
 
@@ -81,7 +81,7 @@
 
   try {
     signatureInfo.setValidityPeriod(kskCertificate.getValidityPeriod());
-  } catch (tlv::Error&) {
+  } catch (const tlv::Error&) {
     signatureInfo.setValidityPeriod(ndn::security::ValidityPeriod(
       time::system_clock::now(), time::system_clock::now() + time::days(3650)));
   }
@@ -121,7 +121,7 @@
 
   try {
     signatureInfo.setValidityPeriod(endorseCertificate.getValidityPeriod());
-  } catch (tlv::Error&) {
+  } catch (const tlv::Error&) {
     signatureInfo.setValidityPeriod(ndn::security::ValidityPeriod(
       time::system_clock::now(), time::system_clock::now() + time::days(3650)));
   }
diff --git a/src/endorse-certificate.hpp b/src/endorse-certificate.hpp
index defc8a8..62bbb5a 100644
--- a/src/endorse-certificate.hpp
+++ b/src/endorse-certificate.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
diff --git a/src/endorse-collection.cpp b/src/endorse-collection.cpp
index 9b937a7..a4c6a44 100644
--- a/src/endorse-collection.cpp
+++ b/src/endorse-collection.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -86,13 +86,13 @@
   m_entries.clear();
 
   if (m_wire.type() != tlv::EndorseCollection)
-    throw Error("Unexpected TLV number when decoding endorse collection packet");
+    NDN_THROW(Error("Unexpected TLV number when decoding endorse collection packet"));
 
   Block::element_const_iterator i = m_wire.elements_begin();
   if (i == m_wire.elements_end())
-    throw Error("Missing Endorse Collection Entry");
+    NDN_THROW(Error("Missing Endorse Collection Entry"));
   if (i->type() != tlv::EndorseCollectionEntry)
-    throw Error("Expect Endorse Collection Entry but get TLV Type " + std::to_string(i->type()));
+    NDN_THROW(Error("Expect Endorse Collection Entry but get TLV Type " + std::to_string(i->type())));
 
   while (i != m_wire.elements_end() && i->type() == tlv::EndorseCollectionEntry) {
     CollectionEntry entry;
@@ -100,31 +100,30 @@
     temp.parse();
     Block::element_const_iterator j = temp.elements_begin();
     if (j == temp.elements_end())
-      throw Error("Missing Cert Name");
+      NDN_THROW(Error("Missing Cert Name"));
     if (j->type() != tlv::Name)
-      throw Error("Expect Cert Name but get TLV Type " + std::to_string(j->type()));
+      NDN_THROW(Error("Expect Cert Name but get TLV Type " + std::to_string(j->type())));
 
     entry.certName.wireDecode(*j);
 
     ++j;
     if (j == temp.elements_end())
-      throw Error("Missing Hash");
+      NDN_THROW(Error("Missing Hash"));
     if (j->type() != tlv::Hash)
-      throw Error("Expect Hash but get TLV Type " + std::to_string(j->type()));
+      NDN_THROW(Error("Expect Hash but get TLV Type " + std::to_string(j->type())));
 
     entry.hash = std::string(reinterpret_cast<const char* >(j->value()),
                              j->value_size());
     ++j;
-    if (j != temp.elements_end()) {
-      throw Error("Unexpected element");
-    }
+    if (j != temp.elements_end())
+      NDN_THROW(Error("Unexpected element"));
+
     m_entries.push_back(entry);
     ++i;
   }
 
-  if (i != m_wire.elements_end()) {
-      throw Error("Unexpected element");
-  }
+  if (i != m_wire.elements_end())
+      NDN_THROW(Error("Unexpected element"));
 }
 
 void
diff --git a/src/endorse-collection.hpp b/src/endorse-collection.hpp
index dd16bc3..1371839 100644
--- a/src/endorse-collection.hpp
+++ b/src/endorse-collection.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -77,4 +77,4 @@
 
 } // namespace chronochat
 
-#endif //CHRONOCHAT_ENDORSE_COLLECTION_HPP
+#endif // CHRONOCHAT_ENDORSE_COLLECTION_HPP
diff --git a/src/endorse-combobox-delegate.cpp b/src/endorse-combobox-delegate.cpp
index 319135a..d753c87 100644
--- a/src/endorse-combobox-delegate.cpp
+++ b/src/endorse-combobox-delegate.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -13,10 +13,6 @@
 #include <QComboBox>
 #include <QApplication>
 
-#ifndef Q_MOC_RUN
-#include "logging.h"
-#endif
-
 namespace chronochat {
 
 EndorseComboBoxDelegate::EndorseComboBoxDelegate(QObject* parent)
@@ -80,5 +76,4 @@
 
 #if WAF
 #include "endorse-combobox-delegate.moc"
-// #include "endorse-combobox-delegate.cpp.moc"
 #endif
diff --git a/src/endorse-combobox-delegate.hpp b/src/endorse-combobox-delegate.hpp
index 0611461..16ee85a 100644
--- a/src/endorse-combobox-delegate.hpp
+++ b/src/endorse-combobox-delegate.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
diff --git a/src/endorse-extension.cpp b/src/endorse-extension.cpp
index 0c9f6c4..37b82d6 100644
--- a/src/endorse-extension.cpp
+++ b/src/endorse-extension.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -79,14 +79,14 @@
   //
 
   if (m_wire.type() != tlv::EndorseExtension)
-    throw Error("Unexpected TLV number when decoding endorse extension packet");
+    NDN_THROW(Error("Unexpected TLV number when decoding endorse extension packet"));
 
   // EntryData
   Block::element_const_iterator i = m_wire.elements_begin();
   if (i == m_wire.elements_end())
-    throw Error("Missing Entry Data");
+    NDN_THROW(Error("Missing Entry Data"));
   if (i->type() != tlv::EntryData)
-    throw Error("Expect Entry Data but get TLV Type " + std::to_string(i->type()));
+    NDN_THROW(Error("Expect Entry Data but get TLV Type " + std::to_string(i->type())));
 
    while (i != m_wire.elements_end() && i->type() == tlv::EntryData) {
      m_entries.push_back(std::string(reinterpret_cast<const char* >(i->value()),
@@ -94,9 +94,8 @@
      ++i;
   }
 
-  if (i != m_wire.elements_end()) {
-    throw Error("Unexpected element");
-  }
+  if (i != m_wire.elements_end())
+    NDN_THROW(Error("Unexpected element"));
 }
 
 void
diff --git a/src/endorse-extension.hpp b/src/endorse-extension.hpp
index c8bd11e..56827e0 100644
--- a/src/endorse-extension.hpp
+++ b/src/endorse-extension.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -75,4 +75,4 @@
 
 } // namespace chronochat
 
-#endif //CHRONOCHAT_ENDORSE_EXTENSION_HPP
+#endif // CHRONOCHAT_ENDORSE_EXTENSION_HPP
diff --git a/src/endorse-info.cpp b/src/endorse-info.cpp
index 1aa9385..7efdfce 100644
--- a/src/endorse-info.cpp
+++ b/src/endorse-info.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -101,14 +101,14 @@
   m_endorsements.clear();
 
   if (m_wire.type() != tlv::EndorseInfo)
-    throw Error("Unexpected TLV number when decoding endorse info packet");
+    NDN_THROW(Error("Unexpected TLV number when decoding endorse info packet"));
 
   // Endorsement
   Block::element_const_iterator i = m_wire.elements_begin();
   if (i == m_wire.elements_end())
-    throw Error("Missing Endorsement");
+    NDN_THROW(Error("Missing Endorsement"));
   if (i->type() != tlv::Endorsement)
-    throw Error("Expect Endorsement but get TLV Type " + std::to_string(i->type()));
+    NDN_THROW(Error("Expect Endorsement but get TLV Type " + std::to_string(i->type())));
 
   while (i != m_wire.elements_end() && i->type() == tlv::Endorsement) {
     Endorsement endorsement;
@@ -118,9 +118,9 @@
 
     // Endorse Type
     if (j == temp.elements_end())
-      throw Error("Missing Endorse Type");
+      NDN_THROW(Error("Missing Endorse Type"));
     if (j->type() != tlv::EndorseType)
-      throw Error("Expect Endorse Type but get TLV Type " + std::to_string(j->type()));
+      NDN_THROW(Error("Expect Endorse Type but get TLV Type " + std::to_string(j->type())));
 
     endorsement.type = std::string(reinterpret_cast<const char* >(j->value()),
                                    j->value_size());;
@@ -128,9 +128,9 @@
 
     // Endorse Value
     if (j == temp.elements_end())
-      throw Error("Missing Endorse Value");
+      NDN_THROW(Error("Missing Endorse Value"));
     if (j->type() != tlv::EndorseValue)
-      throw Error("Expect Endorse Value but get TLV Type " + std::to_string(j->type()));
+      NDN_THROW(Error("Expect Endorse Value but get TLV Type " + std::to_string(j->type())));
 
     endorsement.value = std::string(reinterpret_cast<const char* >(j->value()),
                                     j->value_size());
@@ -138,23 +138,22 @@
 
     // Endorse Count
     if (j == temp.elements_end())
-      throw Error("Missing Endorse Count");
+      NDN_THROW(Error("Missing Endorse Count"));
     if (j->type() != tlv::EndorseCount)
-      throw Error("Expect Endorse Count but get TLV Type " + std::to_string(j->type()));
+      NDN_THROW(Error("Expect Endorse Count but get TLV Type " + std::to_string(j->type())));
 
     endorsement.count = std::string(reinterpret_cast<const char* >(j->value()),
                                     j->value_size());
     ++j;
-    if (j != temp.elements_end()) {
-      throw Error("Unexpected element");
-    }
+    if (j != temp.elements_end())
+      NDN_THROW(Error("Unexpected element"));
+
     m_endorsements.push_back(endorsement);
     ++i;
   }
 
-  if (i != m_wire.elements_end()) {
-      throw Error("Unexpected element");
-  }
+  if (i != m_wire.elements_end())
+      NDN_THROW(Error("Unexpected element"));
 }
 
 void
diff --git a/src/endorse-info.hpp b/src/endorse-info.hpp
index a794c63..a265dd9 100644
--- a/src/endorse-info.hpp
+++ b/src/endorse-info.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -33,7 +33,8 @@
     }
   };
 
-  class Endorsement {
+  class Endorsement
+  {
   public:
     std::string type;
     std::string value;
@@ -78,4 +79,4 @@
 
 } // namespace chronochat
 
-#endif //CHRONOCHAT_ENDORSE_INFO_HPP
+#endif // CHRONOCHAT_ENDORSE_INFO_HPP
diff --git a/src/invitation-dialog.cpp b/src/invitation-dialog.cpp
index aac02e0..b7a4725 100644
--- a/src/invitation-dialog.cpp
+++ b/src/invitation-dialog.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -65,5 +65,4 @@
 
 #if WAF
 #include "invitation-dialog.moc"
-// #include "invitation-dialog.cpp.moc"
 #endif
diff --git a/src/invitation-dialog.hpp b/src/invitation-dialog.hpp
index 030cec8..8a0f2ee 100644
--- a/src/invitation-dialog.hpp
+++ b/src/invitation-dialog.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -11,15 +11,12 @@
 #ifndef CHRONOCHAT_INVITATION_DIALOG_HPP
 #define CHRONOCHAT_INVITATION_DIALOG_HPP
 
-#include <QDialog>
-
-#ifndef Q_MOC_RUN
 #include "common.hpp"
-#endif
+#include <QDialog>
 
 namespace Ui {
 class InvitationDialog;
-}
+} // namespace Ui
 
 namespace chronochat {
 
diff --git a/src/invitation-request-dialog.cpp b/src/invitation-request-dialog.cpp
index 47b63f1..15a6726 100644
--- a/src/invitation-request-dialog.cpp
+++ b/src/invitation-request-dialog.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -67,5 +67,4 @@
 
 #if WAF
 #include "invitation-request-dialog.moc"
-// #include "invitation-request-dialog.cpp.moc"
 #endif
diff --git a/src/invitation-request-dialog.hpp b/src/invitation-request-dialog.hpp
index c15fce2..6441b4b 100644
--- a/src/invitation-request-dialog.hpp
+++ b/src/invitation-request-dialog.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -11,17 +11,14 @@
 #ifndef CHRONOCHAT_INVITATION_REQUEST_DIALOG_HPP
 #define CHRONOCHAT_INVITATION_REQUEST_DIALOG_HPP
 
-#include <QDialog>
-
-#ifndef Q_MOC_RUN
 #include "common.hpp"
-#endif
+#include <QDialog>
 
 namespace Ui {
 class InvitationRequestDialog;
-}
+} // namespace Ui
 
-namespace chronochat{
+namespace chronochat {
 
 class InvitationRequestDialog : public QDialog
 {
diff --git a/src/invitation.cpp b/src/invitation.cpp
index e7d2ac5..9af3c4d 100644
--- a/src/invitation.cpp
+++ b/src/invitation.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -12,8 +12,6 @@
 
 #include <ndn-cxx/security/signature-sha256-with-rsa.hpp>
 
-#include "logging.h"
-
 namespace chronochat {
 
 using std::string;
@@ -35,10 +33,10 @@
   size_t nameSize = interestName.size();
 
   if (nameSize < NAME_SIZE_MIN)
-    throw Error("Wrong Invitation Name: Wrong length");
+    NDN_THROW(Error("Wrong Invitation Name: Wrong length"));
 
   if (interestName.get(CHRONOCHAT_INVITATION).toUri() != "CHRONOCHAT-INVITATION")
-    throw Error("Wrong Invitation Name: Wrong application tags");
+    NDN_THROW(Error("Wrong Invitation Name: Wrong application tags"));
 
   m_interestName = interestName.getPrefix(KEY_LOCATOR);
   m_timestamp = interestName.get(TIMESTAMP).toNumber();
diff --git a/src/invitation.hpp b/src/invitation.hpp
index c9d3731..133a3aa 100644
--- a/src/invitation.hpp
+++ b/src/invitation.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -91,7 +91,7 @@
     return m_inviterCertificate;
   }
 
-  const uint64_t
+  uint64_t
   getTimestamp() const
   {
     return m_timestamp;
diff --git a/src/invite-list-dialog.cpp b/src/invite-list-dialog.cpp
index 435e2f6..23af0c9 100644
--- a/src/invite-list-dialog.cpp
+++ b/src/invite-list-dialog.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -82,5 +82,4 @@
 
 #if WAF
 #include "invite-list-dialog.moc"
-// #include "invite-list-dialog.cpp.moc"
 #endif
diff --git a/src/invite-list-dialog.hpp b/src/invite-list-dialog.hpp
index e5e8fd3..ee2561c 100644
--- a/src/invite-list-dialog.hpp
+++ b/src/invite-list-dialog.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -14,12 +14,9 @@
 #include <QDialog>
 #include <QStringListModel>
 
-#ifndef Q_MOC_RUN
-#endif
-
 namespace Ui {
 class InviteListDialog;
-}
+} // namespace Ui
 
 namespace chronochat {
 
diff --git a/src/main.cpp b/src/main.cpp
index 90f1d9d..039fa42 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -8,10 +8,11 @@
  * Author: Yingdi Yu <yingdi@cs.ucla.edu>
  */
 
+#include "controller.hpp"
+
 #include <QApplication>
 #include <QTextCodec>
 
-#include "controller.hpp"
 #include <iostream>
 #include <ndn-cxx/face.hpp>
 #include <boost/thread/thread.hpp>
@@ -28,9 +29,9 @@
   notify(QObject* receiver, QEvent* event)
   {
     try {
-        return QApplication::notify(receiver, event);
+      return QApplication::notify(receiver, event);
     }
-    catch (std::exception& e) {
+    catch (const std::exception& e) {
       std::cerr << "Exception thrown:" << e.what() << std::endl;
       return false;
     }
diff --git a/src/nfd-connection-checker.cpp b/src/nfd-connection-checker.cpp
index eda7197..e349b92 100644
--- a/src/nfd-connection-checker.cpp
+++ b/src/nfd-connection-checker.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -9,10 +9,6 @@
 
 #include "nfd-connection-checker.hpp"
 
-#ifndef Q_MOC_RUN
-
-#endif
-
 namespace chronochat {
 
 static const int CONNECTION_RETRY_TIMER = 2;
@@ -38,7 +34,9 @@
       m_nfdConnected = true;
     }
     try {
-      m_face->expressInterest(Interest("/localhost/nfd/status"),
+      Interest interest("/localhost/nfd/status");
+      interest.setCanBePrefix(true);
+      m_face->expressInterest(interest,
                               [&] (const Interest& interest, const Data& data) {
                                 m_face->shutdown();
                               },
@@ -46,7 +44,7 @@
                               [] (const Interest& interest) {});
       m_face->processEvents(time::milliseconds::zero(), true);
     }
-    catch (std::runtime_error& e) {
+    catch (const std::runtime_error& e) {
       {
         std::lock_guard<std::mutex>lock(m_nfdMutex);
         m_nfdConnected = false;
@@ -73,5 +71,4 @@
 
 #if WAF
 #include "nfd-connection-checker.moc"
-// #include "nfd-connection-checker.cpp.moc"
 #endif
diff --git a/src/nfd-connection-checker.hpp b/src/nfd-connection-checker.hpp
index 08b6085..75784f7 100644
--- a/src/nfd-connection-checker.hpp
+++ b/src/nfd-connection-checker.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -10,14 +10,12 @@
 #ifndef CHRONOCHAT_NFD_CONNECTION_CHECKER_HPP
 #define CHRONOCHAT_NFD_CONNECTION_CHECKER_HPP
 
-#include <QThread>
-
-#ifndef Q_MOC_RUN
 #include "common.hpp"
+
+#include <QThread>
 #include <mutex>
 #include <boost/thread.hpp>
 #include <ndn-cxx/face.hpp>
-#endif
 
 namespace chronochat {
 
diff --git a/src/profile-editor.cpp b/src/profile-editor.cpp
index f0b067d..fbfe105 100644
--- a/src/profile-editor.cpp
+++ b/src/profile-editor.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -14,12 +14,6 @@
 #include <QtSql/QSqlField>
 #include <QtSql/QSqlError>
 
-#ifndef Q_MOC_RUN
-#include "logging.h"
-#endif
-
-// INIT_LOGGER("ProfileEditor")
-
 namespace chronochat {
 
 ProfileEditor::ProfileEditor(QWidget *parent)
@@ -40,9 +34,7 @@
 ProfileEditor::~ProfileEditor()
 {
     delete ui;
-
-    if (m_tableModel)
-      delete m_tableModel;
+    delete m_tableModel;
 }
 
 void
@@ -109,5 +101,4 @@
 
 #if WAF
 #include "profile-editor.moc"
-// #include "profile-editor.cpp.moc"
 #endif
diff --git a/src/profile-editor.hpp b/src/profile-editor.hpp
index a18f8fc..01d5f57 100644
--- a/src/profile-editor.hpp
+++ b/src/profile-editor.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -14,12 +14,9 @@
 #include <QDialog>
 #include <QtSql/QSqlTableModel>
 
-#ifndef Q_MOC_RUN
-#endif
-
 namespace Ui {
 class ProfileEditor;
-}
+} // namespace Ui
 
 namespace chronochat {
 
@@ -58,7 +55,7 @@
 
 private:
   Ui::ProfileEditor* ui;
-  QSqlTableModel* m_tableModel;
+  QSqlTableModel* m_tableModel = 0;
   QString m_identity;
 };
 
diff --git a/src/profile.cpp b/src/profile.cpp
index dc89fa9..06cb1e5 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -10,7 +10,6 @@
  */
 
 #include "profile.hpp"
-#include "logging.h"
 #include <ndn-cxx/security/additional-description.hpp>
 
 namespace chronochat {
@@ -149,45 +148,43 @@
   m_wire.parse();
 
   if (m_wire.type() != tlv::Profile)
-    throw Error("Unexpected TLV number when decoding profile packet");
+    NDN_THROW(Error("Unexpected TLV number when decoding profile packet"));
 
   Block::element_const_iterator i = m_wire.elements_begin();
   if (i == m_wire.elements_end())
-    throw Error("Missing Profile Entry");
+    NDN_THROW(Error("Missing Profile Entry"));
   if (i->type() != tlv::ProfileEntry)
-    throw Error("Expect Profile Entry but get TLV Type " + std::to_string(i->type()));
+    NDN_THROW(Error("Expect Profile Entry but get TLV Type " + std::to_string(i->type())));
 
   while (i != m_wire.elements_end() && i->type() == tlv::ProfileEntry) {
     Block temp = *i;
     temp.parse();
     Block::element_const_iterator j = temp.elements_begin();
     if (j == temp.elements_end())
-      throw Error("Missing Oid");
+      NDN_THROW(Error("Missing Oid"));
     if (j->type() != tlv::Oid)
-      throw Error("Expect Oid but get TLV Type" + std::to_string(j->type()));
+      NDN_THROW(Error("Expect Oid but get TLV Type" + std::to_string(j->type())));
 
     string Oid = std::string(reinterpret_cast<const char* >(j->value()),
                              j->value_size());
     ++j;
     if (j == temp.elements_end())
-      throw Error("Missing EntryData");
+      NDN_THROW(Error("Missing EntryData"));
     if (j->type() != tlv::EntryData)
-      throw Error("Expect EntryData but get TLV Type " + std::to_string(j->type()));
+      NDN_THROW(Error("Expect EntryData but get TLV Type " + std::to_string(j->type())));
 
     string EntryData = std::string(reinterpret_cast<const char* >(j->value()),
                                    j->value_size());
     ++j;
-    if (j != temp.elements_end()) {
-      throw Error("Unexpected element");
-    }
+    if (j != temp.elements_end())
+      NDN_THROW(Error("Unexpected element"));
+
     m_entries[Oid] = EntryData;
     ++i;
   }
 
-  if (i != m_wire.elements_end()) {
-      throw Error("Unexpected element");
-  }
-
+  if (i != m_wire.elements_end())
+      NDN_THROW(Error("Unexpected element"));
 }
 
 bool
diff --git a/src/profile.hpp b/src/profile.hpp
index 43dba96..6692127 100644
--- a/src/profile.hpp
+++ b/src/profile.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -40,9 +40,7 @@
   typedef std::map<std::string, std::string>::iterator iterator;
   typedef std::map<std::string, std::string>::const_iterator const_iterator;
 
-  Profile()
-  {
-  }
+  Profile() = default;
 
   Profile(const ndn::security::Certificate& identityCertificate);
 
@@ -56,9 +54,8 @@
 
   Profile(const Block& profileWire);
 
-  ~Profile()
-  {
-  }
+  Profile&
+  operator=(const Profile&) = default;
 
   const Block&
   wireEncode() const;
diff --git a/src/set-alias-dialog.cpp b/src/set-alias-dialog.cpp
index ae75a2b..d241e58 100644
--- a/src/set-alias-dialog.cpp
+++ b/src/set-alias-dialog.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -56,5 +56,4 @@
 
 #if WAF
 #include "set-alias-dialog.moc"
-// #include "set-alias-dialog.cpp.moc"
 #endif
diff --git a/src/set-alias-dialog.hpp b/src/set-alias-dialog.hpp
index 7ae2438..e044bab 100644
--- a/src/set-alias-dialog.hpp
+++ b/src/set-alias-dialog.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -19,7 +19,7 @@
 
 namespace Ui {
 class SetAliasDialog;
-}
+} // namespace Ui
 
 namespace chronochat {
 
diff --git a/src/setting-dialog.cpp b/src/setting-dialog.cpp
index 9f38cac..18dd460 100644
--- a/src/setting-dialog.cpp
+++ b/src/setting-dialog.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -85,5 +85,4 @@
 
 #if WAF
 #include "setting-dialog.moc"
-// #include "setting-dialog.cpp.moc"
 #endif
diff --git a/src/setting-dialog.hpp b/src/setting-dialog.hpp
index a8cef6c..5b6ad11 100644
--- a/src/setting-dialog.hpp
+++ b/src/setting-dialog.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -13,12 +13,9 @@
 
 #include <QDialog>
 
-#ifndef Q_MOC_RUN
-#endif
-
 namespace Ui {
 class SettingDialog;
-}
+} // namespace Ui
 
 namespace chronochat {
 
diff --git a/src/start-chat-dialog.cpp b/src/start-chat-dialog.cpp
index d3949e5..160275f 100644
--- a/src/start-chat-dialog.cpp
+++ b/src/start-chat-dialog.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -56,5 +56,4 @@
 
 #if WAF
 #include "start-chat-dialog.moc"
-// #include "start-chat-dialog.cpp.moc"
 #endif
diff --git a/src/start-chat-dialog.hpp b/src/start-chat-dialog.hpp
index d0439d7..7af4994 100644
--- a/src/start-chat-dialog.hpp
+++ b/src/start-chat-dialog.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -19,7 +19,7 @@
 
 namespace Ui {
 class StartChatDialog;
-}
+} // namespace Ui
 
 namespace chronochat {
 
diff --git a/src/tree-layout.cpp b/src/tree-layout.cpp
index 9bf3627..6df61ad 100644
--- a/src/tree-layout.cpp
+++ b/src/tree-layout.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
diff --git a/src/tree-layout.hpp b/src/tree-layout.hpp
index 514b1ed..b180b83 100644
--- a/src/tree-layout.hpp
+++ b/src/tree-layout.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
diff --git a/src/trust-tree-node.hpp b/src/trust-tree-node.hpp
index dc38894..cb275b2 100644
--- a/src/trust-tree-node.hpp
+++ b/src/trust-tree-node.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
diff --git a/src/trust-tree-scene.cpp b/src/trust-tree-scene.cpp
index 3a23718..58e9861 100644
--- a/src/trust-tree-scene.cpp
+++ b/src/trust-tree-scene.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -104,9 +104,8 @@
   }
 }
 
-} //namespace chronochat
+} // namespace chronochat
 
 #if WAF
 #include "trust-tree-scene.moc"
-// #include "trust-tree-scene.cpp.moc"
 #endif
diff --git a/src/trust-tree-scene.hpp b/src/trust-tree-scene.hpp
index 0412914..1d4d0e1 100644
--- a/src/trust-tree-scene.hpp
+++ b/src/trust-tree-scene.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *                     Yingdi Yu
  *
  * BSD license, See the LICENSE file for more information
@@ -11,15 +11,15 @@
 #ifndef CHRONOCHAT_TRUST_TREE_SCENE_HPP
 #define CHRONOCHAT_TRUST_TREE_SCENE_HPP
 
-#include <QGraphicsScene>
-#include <QColor>
-#include <QMap>
-
 #ifndef Q_MOC_RUN
 #include "trust-tree-node.hpp"
 #include "tree-layout.hpp"
 #endif
 
+#include <QGraphicsScene>
+#include <QColor>
+#include <QMap>
+
 class QGraphicsTextItem;
 
 namespace chronochat {
diff --git a/test/chat-message.t.cpp b/test/chat-message.t.cpp
index 09ab127..848dfde 100644
--- a/test/chat-message.t.cpp
+++ b/test/chat-message.t.cpp
@@ -1,19 +1,19 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
  * Author: Qiuhan Ding <qiuhanding@cs.ucla.edu>
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "chat-message.hpp"
+
+#include <boost/test/unit_test.hpp>
 #include <ndn-cxx/encoding/buffer-stream.hpp>
 
-namespace chronochat{
-namespace tests{
+namespace chronochat {
+namespace tests {
 
 using std::string;
 
diff --git a/test/chatroom-info.t.cpp b/test/chatroom-info.t.cpp
index f138172..af223d4 100644
--- a/test/chatroom-info.t.cpp
+++ b/test/chatroom-info.t.cpp
@@ -1,3 +1,10 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2020, Regents of the University of California
+ *
+ * BSD license, See the LICENSE file for more information
+ */
+
 #include "chatroom-info.hpp"
 #include <boost/test/unit_test.hpp>
 #include <ndn-cxx/encoding/block.hpp>
diff --git a/test/conf.t.cpp b/test/conf.t.cpp
index 9af3e5d..fabbcfc 100644
--- a/test/conf.t.cpp
+++ b/test/conf.t.cpp
@@ -1,18 +1,18 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
  * Author: Qiuhan Ding <qiuhanding@cs.ucla.edu>
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "conf.hpp"
+
+#include <boost/test/unit_test.hpp>
 #include <ndn-cxx/encoding/buffer-stream.hpp>
 
-namespace chronochat{
+namespace chronochat {
 namespace tests {
 
 using std::string;
diff --git a/test/contact-storage.t.cpp b/test/contact-storage.t.cpp
index 07be3e7..a9265e6 100644
--- a/test/contact-storage.t.cpp
+++ b/test/contact-storage.t.cpp
@@ -1,14 +1,14 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /**
- * Copyright (C) 2013 Regents of the University of California.
+ * Copyright (C) 2020 Regents of the University of California.
  * @author: Yingdi Yu <yingdi@cs.ucla.edu>
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "contact-storage.hpp"
 #include "cryptopp.hpp"
+
+#include <boost/test/unit_test.hpp>
 #include <boost/filesystem.hpp>
 
 namespace chronochat {
diff --git a/test/endorse-certificate.t.cpp b/test/endorse-certificate.t.cpp
index baa2ecf..6fef721 100644
--- a/test/endorse-certificate.t.cpp
+++ b/test/endorse-certificate.t.cpp
@@ -1,17 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /**
- * Copyright (C) 2013 Regents of the University of California.
+ * Copyright (C) 2020 Regents of the University of California.
  * @author: Yingdi Yu <yingdi@cs.ucla.edu>
  * See COPYING for copyright and distribution information.
  */
 
-#if __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wtautological-compare"
-#pragma clang diagnostic ignored "-Wunused-function"
-#elif __GNUC__
-#pragma GCC diagnostic ignored "-Wunused-function"
-#endif
+#include "endorse-certificate.hpp"
+#include "cryptopp.hpp"
 
 #include <boost/test/unit_test.hpp>
 #include <boost/filesystem.hpp>
@@ -20,8 +15,6 @@
 #include <ndn-cxx/encoding/buffer-stream.hpp>
 #include <ndn-cxx/util/time.hpp>
 #include <ndn-cxx/util/io.hpp>
-#include "cryptopp.hpp"
-#include "endorse-certificate.hpp"
 
 namespace chronochat {
 namespace tests {
diff --git a/test/endorse-collection.t.cpp b/test/endorse-collection.t.cpp
index 1af3f6b..8448779 100644
--- a/test/endorse-collection.t.cpp
+++ b/test/endorse-collection.t.cpp
@@ -1,18 +1,18 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
  * Author: Qiuhan Ding <qiuhanding@cs.ucla.edu>
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "endorse-collection.hpp"
+
+#include <boost/test/unit_test.hpp>
 #include <ndn-cxx/encoding/buffer-stream.hpp>
 
-namespace chronochat{
+namespace chronochat {
 namespace tests {
 
 using std::string;
diff --git a/test/main.cpp b/test/main.cpp
index 6b0a14a..e418730 100644
--- a/test/main.cpp
+++ b/test/main.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -9,5 +9,6 @@
 
 #define BOOST_TEST_MAIN 1
 #define BOOST_TEST_DYN_LINK 1
+#define BOOST_TEST_MODULE chronochat
 
 #include <boost/test/unit_test.hpp>
diff --git a/test/profile.t.cpp b/test/profile.t.cpp
index 3e85f38..33ebb06 100644
--- a/test/profile.t.cpp
+++ b/test/profile.t.cpp
@@ -1,13 +1,13 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /**
- * Copyright (C) 2013 Regents of the University of California.
+ * Copyright (C) 2020 Regents of the University of California.
  * @author: Yingdi Yu <yingdi@cs.ucla.edu>
  * See COPYING for copyright and distribution information.
  */
 
-#include <boost/test/unit_test.hpp>
-
 #include "profile.hpp"
+
+#include <boost/test/unit_test.hpp>
 #include <ndn-cxx/encoding/buffer-stream.hpp>
 
 namespace chronochat {
diff --git a/waf-tools/boost.py b/waf-tools/boost.py
deleted file mode 100644
index 8c36b34..0000000
--- a/waf-tools/boost.py
+++ /dev/null
@@ -1,381 +0,0 @@
-#!/usr/bin/env python
-# encoding: utf-8
-#
-# partially based on boost.py written by Gernot Vormayr
-# written by Ruediger Sonderfeld <ruediger@c-plusplus.de>, 2008
-# modified by Bjoern Michaelsen, 2008
-# modified by Luca Fossati, 2008
-# rewritten for waf 1.5.1, Thomas Nagy, 2008
-# rewritten for waf 1.6.2, Sylvain Rouquette, 2011
-
-'''
-
-This is an extra tool, not bundled with the default waf binary.
-To add the boost tool to the waf file:
-$ ./waf-light --tools=compat15,boost
-	or, if you have waf >= 1.6.2
-$ ./waf update --files=boost
-
-When using this tool, the wscript will look like:
-
-	def options(opt):
-		opt.load('compiler_cxx boost')
-
-	def configure(conf):
-		conf.load('compiler_cxx boost')
-		conf.check_boost(lib='system filesystem')
-
-	def build(bld):
-		bld(source='main.cpp', target='app', use='BOOST')
-
-Options are generated, in order to specify the location of boost includes/libraries.
-The `check_boost` configuration function allows to specify the used boost libraries.
-It can also provide default arguments to the --boost-static and --boost-mt command-line arguments.
-Everything will be packaged together in a BOOST component that you can use.
-
-When using MSVC, a lot of compilation flags need to match your BOOST build configuration:
- - you may have to add /EHsc to your CXXFLAGS or define boost::throw_exception if BOOST_NO_EXCEPTIONS is defined.
-   Errors: C4530
- - boost libraries will try to be smart and use the (pretty but often not useful) auto-linking feature of MSVC
-   So before calling `conf.check_boost` you might want to disabling by adding:
-   	conf.env.DEFINES_BOOST += ['BOOST_ALL_NO_LIB']
-   Errors:
- - boost might also be compiled with /MT, which links the runtime statically.
-   If you have problems with redefined symbols,
-		self.env['DEFINES_%s' % var] += ['BOOST_ALL_NO_LIB']
-		self.env['CXXFLAGS_%s' % var] += ['/MD', '/EHsc']
-Passing `--boost-linkage_autodetect` might help ensuring having a correct linkage in some basic cases.
-
-'''
-
-import sys
-import re
-from waflib import Utils, Logs, Errors
-from waflib.Configure import conf
-
-BOOST_LIBS = ['/usr/lib', '/usr/local/lib', '/opt/local/lib', '/sw/lib', '/lib',
-              '/usr/lib/x86_64-linux-gnu', '/usr/lib/i386-linux-gnu',
-              '/usr/local/ndn/lib', '/opt/ndn/lib']
-BOOST_INCLUDES = ['/usr/include', '/usr/local/include', '/opt/local/include', '/sw/include',
-                  '/usr/local/ndn/include', '/opt/ndn/include']
-BOOST_VERSION_FILE = 'boost/version.hpp'
-BOOST_VERSION_CODE = '''
-#include <iostream>
-#include <boost/version.hpp>
-int main() { std::cout << BOOST_LIB_VERSION << ":" << BOOST_VERSION << std::endl; }
-'''
-BOOST_SYSTEM_CODE = '''
-#include <boost/system/error_code.hpp>
-int main() { boost::system::error_code c; }
-'''
-BOOST_THREAD_CODE = '''
-#include <boost/thread.hpp>
-int main() { boost::thread t; }
-'''
-
-# toolsets from {boost_dir}/tools/build/v2/tools/common.jam
-PLATFORM = Utils.unversioned_sys_platform()
-detect_intel = lambda env: (PLATFORM == 'win32') and 'iw' or 'il'
-detect_clang = lambda env: (PLATFORM == 'darwin') and 'clang-darwin' or 'clang'
-detect_mingw = lambda env: (re.search('MinGW', env.CXX[0])) and 'mgw' or 'gcc'
-BOOST_TOOLSETS = {
-	'borland':  'bcb',
-	'clang':	detect_clang,
-	'como':	 'como',
-	'cw':	   'cw',
-	'darwin':   'xgcc',
-	'edg':	  'edg',
-	'g++':	  detect_mingw,
-	'gcc':	  detect_mingw,
-	'icpc':	 detect_intel,
-	'intel':	detect_intel,
-	'kcc':	  'kcc',
-	'kylix':	'bck',
-	'mipspro':  'mp',
-	'mingw':	'mgw',
-	'msvc':	 'vc',
-	'qcc':	  'qcc',
-	'sun':	  'sw',
-	'sunc++':   'sw',
-	'tru64cxx': 'tru',
-	'vacpp':	'xlc'
-}
-
-
-def options(opt):
-	opt = opt.add_option_group('Boost Options')
-
-	opt.add_option('--boost-includes', type='string',
-				   default='', dest='boost_includes',
-				   help='''path to the directory where the boost includes are, e.g., /path/to/boost_1_55_0/stage/include''')
-	opt.add_option('--boost-libs', type='string',
-				   default='', dest='boost_libs',
-				   help='''path to the directory where the boost libs are, e.g., /path/to/boost_1_55_0/stage/lib''')
-	opt.add_option('--boost-static', action='store_true',
-				   default=False, dest='boost_static',
-				   help='link with static boost libraries (.lib/.a)')
-	opt.add_option('--boost-mt', action='store_true',
-				   default=False, dest='boost_mt',
-				   help='select multi-threaded libraries')
-	opt.add_option('--boost-abi', type='string', default='', dest='boost_abi',
-				   help='''select libraries with tags (dgsyp, d for debug), see doc Boost, Getting Started, chapter 6.1''')
-	opt.add_option('--boost-linkage_autodetect', action="store_true", dest='boost_linkage_autodetect',
-				   help="auto-detect boost linkage options (don't get used to it / might break other stuff)")
-	opt.add_option('--boost-toolset', type='string',
-				   default='', dest='boost_toolset',
-				   help='force a toolset e.g. msvc, vc90, gcc, mingw, mgw45 (default: auto)')
-	py_version = '%d%d' % (sys.version_info[0], sys.version_info[1])
-	opt.add_option('--boost-python', type='string',
-				   default=py_version, dest='boost_python',
-				   help='select the lib python with this version (default: %s)' % py_version)
-
-
-@conf
-def __boost_get_version_file(self, d):
-	dnode = self.root.find_dir(d)
-	if dnode:
-		return dnode.find_node(BOOST_VERSION_FILE)
-	return None
-
-@conf
-def boost_get_version(self, d):
-	"""silently retrieve the boost version number"""
-	node = self.__boost_get_version_file(d)
-	if node:
-		try:
-			txt = node.read()
-		except (OSError, IOError):
-			Logs.error("Could not read the file %r" % node.abspath())
-		else:
-			re_but1 = re.compile('^#define\\s+BOOST_LIB_VERSION\\s+"(.*)"', re.M)
-			m1 = re_but1.search(txt)
-
-			re_but2 = re.compile('^#define\\s+BOOST_VERSION\\s+(\\d*)', re.M)
-			m2 = re_but2.search(txt)
-
-			if m1 and m2:
-				return (m1.group(1), m2.group(1))
-
-	return self.check_cxx(fragment=BOOST_VERSION_CODE, includes=[d], execute=True, define_ret=True).split(":")
-
-@conf
-def boost_get_includes(self, *k, **kw):
-	includes = k and k[0] or kw.get('includes', None)
-	if includes and self.__boost_get_version_file(includes):
-		return includes
-	for d in Utils.to_list(self.environ.get('INCLUDE', '')) + BOOST_INCLUDES:
-		if self.__boost_get_version_file(d):
-			return d
-	if includes:
-		self.end_msg('headers not found in %s' % includes)
-		self.fatal('The configuration failed')
-	else:
-		self.end_msg('headers not found, please provide a --boost-includes argument (see help)')
-		self.fatal('The configuration failed')
-
-
-@conf
-def boost_get_toolset(self, cc):
-	toolset = cc
-	if not cc:
-		build_platform = Utils.unversioned_sys_platform()
-		if build_platform in BOOST_TOOLSETS:
-			cc = build_platform
-		else:
-			cc = self.env.CXX_NAME
-	if cc in BOOST_TOOLSETS:
-		toolset = BOOST_TOOLSETS[cc]
-	return isinstance(toolset, str) and toolset or toolset(self.env)
-
-
-@conf
-def __boost_get_libs_path(self, *k, **kw):
-	''' return the lib path and all the files in it '''
-	if 'files' in kw:
-		return self.root.find_dir('.'), Utils.to_list(kw['files'])
-	libs = k and k[0] or kw.get('libs', None)
-	if libs:
-		path = self.root.find_dir(libs)
-		files = path.ant_glob('*boost_*')
-	if not libs or not files:
-		for d in Utils.to_list(self.environ.get('LIB', [])) + BOOST_LIBS:
-			path = self.root.find_dir(d)
-			if path:
-				files = path.ant_glob('*boost_*')
-				if files:
-					break
-			path = self.root.find_dir(d + '64')
-			if path:
-				files = path.ant_glob('*boost_*')
-				if files:
-					break
-	if not path:
-		if libs:
-			self.end_msg('libs not found in %s' % libs)
-			self.fatal('The configuration failed')
-		else:
-			self.end_msg('libs not found, please provide a --boost-libs argument (see help)')
-			self.fatal('The configuration failed')
-
-	self.to_log('Found the boost path in %r with the libraries:' % path)
-	for x in files:
-		self.to_log('    %r' % x)
-	return path, files
-
-@conf
-def boost_get_libs(self, *k, **kw):
-	'''
-	return the lib path and the required libs
-	according to the parameters
-	'''
-	path, files = self.__boost_get_libs_path(**kw)
-	t = []
-	if kw.get('mt', False):
-		t.append('mt')
-	if kw.get('abi', None):
-		t.append(kw['abi'])
-	tags = t and '(-%s)+' % '-'.join(t) or ''
-	toolset = self.boost_get_toolset(kw.get('toolset', ''))
-	toolset_pat = '(-%s[0-9]{0,3})+' % toolset
-	version = '(-%s)+' % self.env.BOOST_VERSION
-
-	def find_lib(re_lib, files):
-		for file in files:
-			if re_lib.search(file.name):
-				self.to_log('Found boost lib %s' % file)
-				return file
-		return None
-
-	def format_lib_name(name):
-		if name.startswith('lib') and self.env.CC_NAME != 'msvc':
-			name = name[3:]
-		return name[:name.rfind('.')]
-
-	libs = []
-	for lib in Utils.to_list(k and k[0] or kw.get('lib', None)):
-		py = (lib == 'python') and '(-py%s)+' % kw['python'] or ''
-		# Trying libraries, from most strict match to least one
-		for pattern in ['boost_%s%s%s%s%s' % (lib, toolset_pat, tags, py, version),
-						'boost_%s%s%s%s' % (lib, tags, py, version),
-						'boost_%s%s%s' % (lib, tags, version),
-						# Give up trying to find the right version
-						'boost_%s%s%s%s' % (lib, toolset_pat, tags, py),
-						'boost_%s%s%s' % (lib, tags, py),
-						'boost_%s%s' % (lib, tags)]:
-			self.to_log('Trying pattern %s' % pattern)
-			file = find_lib(re.compile(pattern), files)
-			if file:
-				libs.append(format_lib_name(file.name))
-				break
-		else:
-			self.end_msg('lib %s not found in %s' % (lib, path.abspath()))
-			self.fatal('The configuration failed')
-
-	return path.abspath(), libs
-
-
-@conf
-def check_boost(self, *k, **kw):
-	"""
-	Initialize boost libraries to be used.
-
-	Keywords: you can pass the same parameters as with the command line (without "--boost-").
-	Note that the command line has the priority, and should preferably be used.
-	"""
-	if not self.env['CXX']:
-		self.fatal('load a c++ compiler first, conf.load("compiler_cxx")')
-
-	params = {'lib': k and k[0] or kw.get('lib', None)}
-	for key, value in self.options.__dict__.items():
-		if not key.startswith('boost_'):
-			continue
-		key = key[len('boost_'):]
-		params[key] = value and value or kw.get(key, '')
-
-	var = kw.get('uselib_store', 'BOOST')
-
-	self.start_msg('Checking boost includes')
-	self.env['INCLUDES_%s' % var] = inc = self.boost_get_includes(**params)
-	versions = self.boost_get_version(inc)
-	self.env.BOOST_VERSION = versions[0]
-	self.env.BOOST_VERSION_NUMBER = int(versions[1])
-	self.end_msg("%d.%d.%d" % (int(versions[1]) / 100000,
-				   int(versions[1]) / 100 % 1000,
-				   int(versions[1]) % 100))
-	if Logs.verbose:
-		Logs.pprint('CYAN', '	path : %s' % self.env['INCLUDES_%s' % var])
-
-	if not params['lib']:
-		return
-	self.start_msg('Checking boost libs')
-	suffix = params.get('static', None) and 'ST' or ''
-	path, libs = self.boost_get_libs(**params)
-	self.env['%sLIBPATH_%s' % (suffix, var)] = [path]
-	self.env['%sLIB_%s' % (suffix, var)] = libs
-	self.end_msg('ok')
-	if Logs.verbose:
-		Logs.pprint('CYAN', '	path : %s' % path)
-		Logs.pprint('CYAN', '	libs : %s' % libs)
-
-
-	def try_link():
-		if 'system' in params['lib']:
-			self.check_cxx(
-			 fragment=BOOST_SYSTEM_CODE,
-			 use=var,
-			 execute=False,
-			)
-		if 'thread' in params['lib']:
-			self.check_cxx(
-			 fragment=BOOST_THREAD_CODE,
-			 use=var,
-			 execute=False,
-			)
-
-	if params.get('linkage_autodetect', False):
-		self.start_msg("Attempting to detect boost linkage flags")
-		toolset = self.boost_get_toolset(kw.get('toolset', ''))
-		if toolset in ['vc']:
-			# disable auto-linking feature, causing error LNK1181
-			# because the code wants to be linked against
-			self.env['DEFINES_%s' % var] += ['BOOST_ALL_NO_LIB']
-
-			# if no dlls are present, we guess the .lib files are not stubs
-			has_dlls = False
-			for x in Utils.listdir(path):
-				if x.endswith(self.env.cxxshlib_PATTERN % ''):
-					has_dlls = True
-					break
-			if not has_dlls:
-				self.env['STLIBPATH_%s' % var] = [path]
-				self.env['STLIB_%s' % var] = libs
-				del self.env['LIB_%s' % var]
-				del self.env['LIBPATH_%s' % var]
-
-			# we attempt to play with some known-to-work CXXFLAGS combinations
-			for cxxflags in (['/MD', '/EHsc'], []):
-				self.env.stash()
-				self.env["CXXFLAGS_%s" % var] += cxxflags
-				try:
-					try_link()
-					self.end_msg("ok: winning cxxflags combination: %s" % (self.env["CXXFLAGS_%s" % var]))
-					e = None
-					break
-				except Errors.ConfigurationError as exc:
-					self.env.revert()
-					e = exc
-
-			if e is not None:
-				self.end_msg("Could not auto-detect boost linking flags combination, you may report it to boost.py author", ex=e)
-				self.fatal('The configuration failed')
-		else:
-			self.end_msg("Boost linkage flags auto-detection not implemented (needed ?) for this toolchain")
-			self.fatal('The configuration failed')
-	else:
-		self.start_msg('Checking for boost linkage')
-		try:
-			try_link()
-		except Errors.ConfigurationError as e:
-			self.end_msg("Could not link against boost libraries using supplied options")
-			self.fatal('The configuration failed')
-		self.end_msg('ok')
diff --git a/waf-tools/default-compiler-flags.py b/waf-tools/default-compiler-flags.py
deleted file mode 100644
index c7b4c2c..0000000
--- a/waf-tools/default-compiler-flags.py
+++ /dev/null
@@ -1,72 +0,0 @@
-# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
-
-from waflib import Logs, Configure
-
-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++14',
-                    '-Wall']
-
-    if conf.options.debug:
-        conf.define('_DEBUG', 1)
-        conf.env['_DEBUG'] = 1
-        defaultFlags += ['-O0',
-                         '-Og', # gcc >= 4.8
-                         '-g3',
-                         '-fcolor-diagnostics', # clang
-                         '-fdiagnostics-color', # gcc >= 4.9
-                         '-Werror',
-                         '-Wno-unused-variable',
-                         '-Wno-error=deprecated-register',
-                         '-Wno-error=maybe-uninitialized', # Bug #1615
-                         '-Wno-error=unneeded-internal-declaration', # Bug #1588
-                        ]
-        if areCustomCxxflagsPresent:
-            missingFlags = [x for x in defaultFlags 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)
-
-    # clang on OSX < 10.9 by default uses gcc's libstdc++, which is not C++11 compatible
-    conf.add_supported_linkflags(['-stdlib=libc++'])
-
-@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 supported CXXFLAGS')
-
-    supportedFlags = []
-    for flag in cxxflags:
-        if self.check_cxx(cxxflags=['-Werror', flag], mandatory=False):
-            supportedFlags += [flag]
-
-    self.end_msg(' '.join(supportedFlags))
-    self.env.CXXFLAGS = supportedFlags + self.env.CXXFLAGS
-
-@Configure.conf
-def add_supported_linkflags(self, linkflags):
-    """
-    Check which linkflags are supported by compiler and add them to env.LINKFLAGS variable
-    """
-    self.start_msg('Checking supported LINKFLAGS')
-
-    supportedFlags = []
-    for flag in linkflags:
-        if self.check_cxx(linkflags=['-Werror', flag], mandatory=False):
-            supportedFlags += [flag]
-
-    self.end_msg(' '.join(supportedFlags))
-    self.env.LINKFLAGS = supportedFlags + self.env.LINKFLAGS
diff --git a/waf-tools/ndn_cpp.py b/waf-tools/ndn_cpp.py
deleted file mode 100644
index d0432ab..0000000
--- a/waf-tools/ndn_cpp.py
+++ /dev/null
@@ -1,79 +0,0 @@
-#! /usr/bin/env python
-# encoding: utf-8
-
-'''
-
-When using this tool, the wscript will look like:
-
-	def options(opt):
-	        opt.tool_options('ndn_cpp', tooldir=["waf-tools"])
-
-	def configure(conf):
-		conf.load('compiler_cxx ndn_cpp')
-
-	def build(bld):
-		bld(source='main.cpp', target='app', use='NDNCPP')
-
-Options are generated, in order to specify the location of ndn-cpp includes/libraries.
-
-
-'''
-
-import sys
-import re
-from waflib import Utils,Logs,Errors
-from waflib.Configure import conf
-NDNCPP_DIR=['/usr/local/ndn', '/usr', '/usr/local', '/opt/local','/sw']
-NDNCPP_VERSION_FILE='ndn-cpp-config.h'
-NDNCPP_VERSION_CODE='''
-#include <iostream>
-#include <ndn-cpp/ndn-cpp-config.h>
-int main() { std::cout << NDN_CPP_PACKAGE_VERSION; }
-'''
-
-def options(opt):
-	opt.add_option('--ndn-cpp',type='string',default='/usr/local/ndn',dest='ndn_cpp_dir',help='''path to where ndn-cpp is installed, e.g. /usr/local/ndn''')
-@conf
-def __ndncpp_get_version_file(self,dir):
-	try:
-		return self.root.find_dir(dir).find_node('%s/%s' % ('include/ndn-cpp', NDNCPP_VERSION_FILE))
-	except:
-		return None
-@conf
-def ndncpp_get_version(self,dir):
-	val=self.check_cxx(fragment=NDNCPP_VERSION_CODE,includes=['%s/%s' % (dir, 'include')], execute=True, define_ret = True, mandatory=True)
-	return val
-@conf
-def ndncpp_get_root(self,*k,**kw):
-	root=k and k[0]or kw.get('path',None)
-	# Logs.pprint ('RED', '   %s' %root)
-	if root and self.__ndncpp_get_version_file(root):
-		return root
-	for dir in NDNCPP_DIR:
-		if self.__ndncpp_get_version_file(dir):
-			return dir
-	if root:
-		self.fatal('NDNCPP not found in %s'%root)
-	else:
-		self.fatal('NDNCPP not found, please provide a --ndn-cpp argument (see help)')
-@conf
-def check_ndncpp(self,*k,**kw):
-	if not self.env['CXX']:
-		self.fatal('load a c++ compiler first, conf.load("compiler_cxx")')
-
-	var=kw.get('uselib_store','NDNCPP')
-	self.start_msg('Checking ndn-cpp')
-	root = self.ndncpp_get_root(*k,**kw)
-	self.env.NDNCPP_VERSION=self.ndncpp_get_version(root)
-
-	self.env['INCLUDES_%s'%var]= '%s/%s' % (root, "include")
-	self.env['LIB_%s'%var] = "ndn-cpp"
-	self.env['LIBPATH_%s'%var] = '%s/%s' % (root, "lib")
-
-	self.end_msg(self.env.NDNCPP_VERSION)
-	if Logs.verbose:
-		Logs.pprint('CYAN','	NDNCPP include : %s'%self.env['INCLUDES_%s'%var])
-		Logs.pprint('CYAN','	NDNCPP lib     : %s'%self.env['LIB_%s'%var])
-		Logs.pprint('CYAN','	NDNCPP libpath : %s'%self.env['LIBPATH_%s'%var])
-
-
diff --git a/waf-tools/protoc.py b/waf-tools/protoc.py
deleted file mode 100644
index f9d871f..0000000
--- a/waf-tools/protoc.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env python
-# encoding: utf-8
-# Philipp Bender, 2012
-# Matt Clarkson, 2012
-
-from waflib.Task import Task
-from waflib.TaskGen import extension 
-
-"""
-A simple tool to integrate protocol buffers into your build system.
-
-    def configure(conf):
-        conf.load('compiler_cxx cxx protoc')
-
-    def build(bld):
-        bld(
-                features = 'cxx cxxprogram'
-                source   = 'main.cpp file1.proto proto/file2.proto', 
-                includes = '. proto',
-                target   = 'executable') 
-
-"""
-
-class protoc(Task):
-	run_str = '${PROTOC} ${PROTOC_FLAGS} ${PROTOC_ST:INCPATHS} ${SRC[0].abspath()}'
-	color   = 'BLUE'
-	ext_out = ['.h', 'pb.cc']
-
-@extension('.proto')
-def process_protoc(self, node):
-	cpp_node = node.change_ext('.pb.cc')
-	hpp_node = node.change_ext('.pb.h')
-	self.create_task('protoc', node, [cpp_node, hpp_node])
-	self.source.append(cpp_node)
-
-	if 'cxx' in self.features and not self.env.PROTOC_FLAGS:
-		self.env.PROTOC_FLAGS = '--cpp_out=%s' % node.parent.get_bld().abspath()
-
-	use = getattr(self, 'use', '')
-	if not 'PROTOBUF' in use:
-		self.use = self.to_list(use) + ['PROTOBUF']
-
-def configure(conf):
-	conf.check_cfg(package="protobuf", uselib_store="PROTOBUF", args=['--cflags', '--libs'])
-	conf.find_program('protoc', var='PROTOC')
-	conf.env.PROTOC_ST = '-I%s'
-
diff --git a/wscript b/wscript
index e65a6ba..ca889e9 100644
--- a/wscript
+++ b/wscript
@@ -7,34 +7,26 @@
 
 def options(opt):
 
-    opt.load(['compiler_c', 'compiler_cxx', 'qt5', 'gnu_dirs'])
+    opt.load(['compiler_c', 'compiler_cxx', 'gnu_dirs'])
 
-    opt.load(['default-compiler-flags', 'boost', 'protoc',
-              'doxygen', 'sphinx_build', 'qt5', 'cryptopp'],
-              tooldir=['waf-tools'])
+    opt.load(['default-compiler-flags', 'boost',
+              'doxygen', 'sphinx_build', 'qt5_custom', 'cryptopp'],
+              tooldir=['.waf-tools'])
 
-    opt = opt.add_option_group('ChronotChat Options')
+    opt = opt.add_option_group('ChronoChat Options')
 
     opt.add_option('--with-tests', action='store_true', default=False, dest='with_tests',
                    help='''build unit tests''')
 
-    opt.add_option('--with-log4cxx', action='store_true', default=False, dest='log4cxx',
-                   help='''Enable log4cxx''')
-
 def configure(conf):
-    conf.load(['compiler_c', 'compiler_cxx', 'qt5',
-               'default-compiler-flags', 'boost', 'protoc', 'gnu_dirs',
+    conf.load(['compiler_c', 'compiler_cxx', 'qt5_custom',
+               'default-compiler-flags', 'boost', 'gnu_dirs',
                'doxygen', 'sphinx_build', 'cryptopp'])
 
     conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'],
                    uselib_store='NDN_CXX', mandatory=True)
 
-    if conf.options.log4cxx:
-        conf.check_cfg(package='liblog4cxx', args=['--cflags', '--libs'],
-                       uselib_store='LOG4CXX', mandatory=True)
-        conf.define("HAVE_LOG4CXX", 1)
-
-    conf.check_cfg (package='ChronoSync', args=['ChronoSync >= 0.1', '--cflags', '--libs'],
+    conf.check_cfg (package='ChronoSync', args=['ChronoSync >= 0.5', '--cflags', '--libs'],
                     uselib_store='SYNC', mandatory=True)
 
     boost_libs = 'system random thread filesystem'
@@ -43,14 +35,18 @@
         conf.define('WITH_TESTS', 1);
         boost_libs += ' unit_test_framework'
 
-    conf.check_boost(lib=boost_libs)
-    if conf.env.BOOST_VERSION_NUMBER < 104800:
-        Logs.error("Minimum required boost version is 1.48.0")
-        Logs.error("Please upgrade your distribution or install custom boost libraries" +
-                   " (http://redmine.named-data.net/projects/nfd/wiki/Boost_FAQ)")
-        return
+    conf.check_boost(lib=boost_libs, mt=True)
+    if conf.env.BOOST_VERSION_NUMBER < 105800:
+        conf.fatal('The minimum supported version of Boost is 1.65.1.\n'
+                   'Please upgrade your distribution or manually install a newer version of Boost.\n'
+                   'For more information, see https://redmine.named-data.net/projects/nfd/wiki/Boost')
+    elif conf.env.BOOST_VERSION_NUMBER < 106501:
+        Logs.warn('WARNING: Using a version of Boost older than 1.65.1 is not officially supported and may not work.\n'
+                  'If you encounter any problems, please upgrade your distribution or manually install a newer version of Boost.\n'
+                  'For more information, see https://redmine.named-data.net/projects/nfd/wiki/Boost')
 
     conf.check_cryptopp()
+    conf.check_compiler_flags()
     conf.write_config_header('src/config.h')
 
 def build (bld):
@@ -64,9 +60,9 @@
         target = "ChronoChat",
         features = feature_list,
         defines = "WAF=1",
-        source = bld.path.ant_glob(['src/*.cpp', 'src/*.ui', '*.qrc', 'logging.cc', 'src/*.proto']),
+        source = bld.path.ant_glob(['src/*.cpp', 'src/*.ui', '*.qrc']),
         includes = "src .",
-        use = "QT5CORE QT5GUI QT5WIDGETS QT5SQL NDN_CXX BOOST LOG4CXX SYNC CRYPTOPP",
+        use = "QT5CORE QT5GUI QT5WIDGETS QT5SQL NDN_CXX BOOST SYNC CRYPTOPP",
         )
 
     # Unit tests
@@ -81,10 +77,10 @@
           )
 
     # Debug tools
-    if bld.env["_DEBUG"]:
-        for app in bld.path.ant_glob('debug-tools/*.cc'):
+    if "_DEBUG" in bld.env["DEFINES"]:
+        for app in bld.path.ant_glob('debug-tools/*.cpp'):
             bld(features=['cxx', 'cxxprogram'],
-                target = '%s' % (str(app.change_ext('','.cc'))),
+                target = '%s' % (str(app.change_ext('','.cpp'))),
                 source = app,
                 use = 'NDN_CXX',
                 includes = "src .",
