diff --git a/src/util/face-uri.cpp b/src/util/face-uri.cpp
index f23ae8c..4ad9dba 100644
--- a/src/util/face-uri.cpp
+++ b/src/util/face-uri.cpp
@@ -1,12 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California,
- *                      Arizona Board of Regents,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University,
- *                      Washington University in St. Louis,
- *                      Beijing Institute of Technology,
- *                      The University of Memphis
+ * Copyright (c) 2015-2016, Regents of the University of California,
+ *                          Arizona Board of Regents,
+ *                          Colorado State University,
+ *                          University Pierre & Marie Curie, Sorbonne University,
+ *                          Washington University in St. Louis,
+ *                          Beijing Institute of Technology,
+ *                          The University of Memphis.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -212,9 +212,7 @@
 {
 public:
   virtual
-  ~CanonizeProvider()
-  {
-  }
+  ~CanonizeProvider() = default;
 
   virtual std::set<std::string>
   getSchemes() const = 0;
@@ -234,7 +232,7 @@
 {
 public:
   virtual std::set<std::string>
-  getSchemes() const
+  getSchemes() const override
   {
     std::set<std::string> schemes;
     schemes.insert(m_baseScheme);
@@ -244,7 +242,7 @@
   }
 
   virtual bool
-  isCanonical(const FaceUri& faceUri) const
+  isCanonical(const FaceUri& faceUri) const override
   {
     if (faceUri.getPort().empty()) {
       return false;
@@ -272,7 +270,7 @@
   canonize(const FaceUri& faceUri,
            const FaceUri::CanonizeSuccessCallback& onSuccess,
            const FaceUri::CanonizeFailureCallback& onFailure,
-           boost::asio::io_service& io, const time::nanoseconds& timeout) const
+           boost::asio::io_service& io, const time::nanoseconds& timeout) const override
   {
     if (this->isCanonical(faceUri)) {
       onSuccess(faceUri);
@@ -300,6 +298,7 @@
   }
 
 protected:
+  explicit
   IpHostCanonizeProvider(const std::string& baseScheme,
                          uint32_t defaultUnicastPort = 6363,
                          uint32_t defaultMulticastPort = 56363)
@@ -359,7 +358,7 @@
   virtual std::pair<bool, std::string>
   checkAddress(const dns::IpAddress& ipAddress) const
   {
-    return std::make_pair(true, "");
+    return {true, ""};
   }
 
 private:
@@ -387,7 +386,6 @@
 class TcpCanonizeProvider : public IpHostCanonizeProvider<boost::asio::ip::tcp>
 {
 public:
-public:
   TcpCanonizeProvider()
     : IpHostCanonizeProvider("tcp")
   {
@@ -395,12 +393,12 @@
 
 protected:
   virtual std::pair<bool, std::string>
-  checkAddress(const dns::IpAddress& ipAddress) const
+  checkAddress(const dns::IpAddress& ipAddress) const override
   {
     if (ipAddress.is_multicast()) {
-      return std::make_pair(false, "cannot use multicast address");
+      return {false, "cannot use multicast address"};
     }
-    return std::make_pair(true, "");
+    return {true, ""};
   }
 };
 
@@ -408,7 +406,7 @@
 {
 public:
   virtual std::set<std::string>
-  getSchemes() const
+  getSchemes() const override
   {
     std::set<std::string> schemes;
     schemes.insert("ether");
@@ -416,7 +414,7 @@
   }
 
   virtual bool
-  isCanonical(const FaceUri& faceUri) const
+  isCanonical(const FaceUri& faceUri) const override
   {
     if (!faceUri.getPort().empty()) {
       return false;
@@ -433,7 +431,7 @@
   canonize(const FaceUri& faceUri,
            const FaceUri::CanonizeSuccessCallback& onSuccess,
            const FaceUri::CanonizeFailureCallback& onFailure,
-           boost::asio::io_service& io, const time::nanoseconds& timeout) const
+           boost::asio::io_service& io, const time::nanoseconds& timeout) const override
   {
     ethernet::Address addr = ethernet::Address::fromString(faceUri.getHost());
     if (addr.isNull()) {
@@ -490,9 +488,9 @@
     BOOST_ASSERT(!providerTable.empty());
   }
 
-  CanonizeProviderTable::const_iterator it = providerTable.find(scheme);
+  auto it = providerTable.find(scheme);
   if (it == providerTable.end()) {
-    return 0;
+    return nullptr;
   }
   return it->second.get();
 }
@@ -514,30 +512,25 @@
   return cp->isCanonical(*this);
 }
 
-static inline void
-nop()
-{
-}
-
 void
 FaceUri::canonize(const CanonizeSuccessCallback& onSuccess,
                   const CanonizeFailureCallback& onFailure,
                   boost::asio::io_service& io, const time::nanoseconds& timeout) const
 {
   const CanonizeProvider* cp = getCanonizeProvider(this->getScheme());
-  if (cp == 0) {
-    if (static_cast<bool>(onFailure)) {
+  if (cp == nullptr) {
+    if (onFailure) {
       onFailure("scheme not supported");
     }
     return;
   }
 
-  static CanonizeSuccessCallback successNop = bind(&nop);
-  static CanonizeFailureCallback failureNop = bind(&nop);
+  static CanonizeSuccessCallback successNop = bind([]{});
+  static CanonizeFailureCallback failureNop = bind([]{});
 
   cp->canonize(*this,
-               static_cast<bool>(onSuccess) ? onSuccess : successNop,
-               static_cast<bool>(onFailure) ? onFailure : failureNop,
+               onSuccess ? onSuccess : successNop,
+               onFailure ? onFailure : failureNop,
                io, timeout);
 }
 
