diff --git a/src/util/command-interest-validator.hpp b/src/util/command-interest-validator.hpp
index 689b450..b7c3494 100644
--- a/src/util/command-interest-validator.hpp
+++ b/src/util/command-interest-validator.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -60,11 +60,6 @@
   {
   }
 
-  virtual
-  ~CommandInterestValidator()
-  {
-  }
-
   /**
    * @brief add an Interest rule that allows a specific certificate
    *
@@ -105,7 +100,7 @@
               int stepCount,
               const OnDataValidated& onValidated,
               const OnDataValidationFailed& onValidationFailed,
-              std::vector<shared_ptr<ValidationRequest> >& nextSteps)
+              std::vector<shared_ptr<ValidationRequest>>& nextSteps) override
   {
     onValidationFailed(data.shared_from_this(), "No policy for data checking");
   }
@@ -115,7 +110,8 @@
               int stepCount,
               const OnInterestValidated& onValidated,
               const OnInterestValidationFailed& onValidationFailed,
-              std::vector<shared_ptr<ValidationRequest> >& nextSteps);
+              std::vector<shared_ptr<ValidationRequest>>& nextSteps) override;
+
 private:
   time::milliseconds m_graceInterval; //ms
   std::map<Name, PublicKey> m_trustAnchorsForInterest;
@@ -163,7 +159,7 @@
                                       int stepCount,
                                       const OnInterestValidated& onValidated,
                                       const OnInterestValidationFailed& onValidationFailed,
-                                      std::vector<shared_ptr<ValidationRequest> >& nextSteps)
+                                      std::vector<shared_ptr<ValidationRequest>>& nextSteps)
 {
   const Name& interestName = interest.getName();
 
@@ -255,17 +251,17 @@
           timestampIt->second = interestTime;
         }
     }
-  catch (Signature::Error& e)
+  catch (const Signature::Error&)
     {
       return onValidationFailed(interest.shared_from_this(),
                                 "No valid signature");
     }
-  catch (IdentityCertificate::Error& e)
+  catch (const IdentityCertificate::Error&)
     {
       return onValidationFailed(interest.shared_from_this(),
                                 "Cannot locate the signing key");
     }
-  catch (tlv::Error& e)
+  catch (const tlv::Error&)
     {
       return onValidationFailed(interest.shared_from_this(),
                                 "Cannot decode signature related TLVs");
diff --git a/src/util/dummy-client-face.cpp b/src/util/dummy-client-face.cpp
index bdc8764..13327c6 100644
--- a/src/util/dummy-client-face.cpp
+++ b/src/util/dummy-client-face.cpp
@@ -35,37 +35,37 @@
 {
 public:
   void
-  receive(Block block)
+  receive(Block block) const
   {
     block.encode();
-    if (static_cast<bool>(m_receiveCallback)) {
+    if (m_receiveCallback) {
       m_receiveCallback(block);
     }
   }
 
   virtual void
-  close()
+  close() override
   {
   }
 
   virtual void
-  pause()
+  pause() override
   {
   }
 
   virtual void
-  resume()
+  resume() override
   {
   }
 
   virtual void
-  send(const Block& wire)
+  send(const Block& wire) override
   {
     onSendBlock(wire);
   }
 
   virtual void
-  send(const Block& header, const Block& payload)
+  send(const Block& header, const Block& payload) override
   {
     EncodingBuffer encoder(header.size() + payload.size(), header.size() + payload.size());
     encoder.appendByteArray(header.wire(), header.size());
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);
 }
 
diff --git a/src/util/in-memory-storage-fifo.cpp b/src/util/in-memory-storage-fifo.cpp
index 5906d97..0899024 100644
--- a/src/util/in-memory-storage-fifo.cpp
+++ b/src/util/in-memory-storage-fifo.cpp
@@ -34,10 +34,6 @@
 {
 }
 
-InMemoryStorageFifo::~InMemoryStorageFifo()
-{
-}
-
 void
 InMemoryStorageFifo::afterInsert(InMemoryStorageEntry* entry)
 {
diff --git a/src/util/in-memory-storage-fifo.hpp b/src/util/in-memory-storage-fifo.hpp
index 4d522a4..3710284 100644
--- a/src/util/in-memory-storage-fifo.hpp
+++ b/src/util/in-memory-storage-fifo.hpp
@@ -43,26 +43,23 @@
   explicit
   InMemoryStorageFifo(boost::asio::io_service& ioService, size_t limit = 10);
 
-  virtual
-  ~InMemoryStorageFifo();
-
 NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED:
   /** @brief Removes one Data packet from in-memory storage based on FIFO
    *  @return{ whether the Data was removed }
    */
   virtual bool
-  evictItem();
+  evictItem() override;
 
   /** @brief Update the entry after a entry is successfully inserted, add it to the cleanupIndex
    */
   virtual void
-  afterInsert(InMemoryStorageEntry* entry);
+  afterInsert(InMemoryStorageEntry* entry) override;
 
   /** @brief Update the entry or other data structures before a entry is successfully erased,
    *  erase it from the cleanupIndex
    */
   virtual void
-  beforeErase(InMemoryStorageEntry* entry);
+  beforeErase(InMemoryStorageEntry* entry) override;
 
 private:
   //multi_index_container to implement FIFO
diff --git a/src/util/in-memory-storage-lfu.cpp b/src/util/in-memory-storage-lfu.cpp
index 0450c6c..0c08f1c 100644
--- a/src/util/in-memory-storage-lfu.cpp
+++ b/src/util/in-memory-storage-lfu.cpp
@@ -34,10 +34,6 @@
 {
 }
 
-InMemoryStorageLfu::~InMemoryStorageLfu()
-{
-}
-
 void
 InMemoryStorageLfu::afterInsert(InMemoryStorageEntry* entry)
 {
diff --git a/src/util/in-memory-storage-lfu.hpp b/src/util/in-memory-storage-lfu.hpp
index f02079e..d866a29 100644
--- a/src/util/in-memory-storage-lfu.hpp
+++ b/src/util/in-memory-storage-lfu.hpp
@@ -46,40 +46,37 @@
   explicit
   InMemoryStorageLfu(boost::asio::io_service& ioService, size_t limit = 10);
 
-  virtual
-  ~InMemoryStorageLfu();
-
 NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED:
   /** @brief Removes one Data packet from in-memory storage based on LFU, i.e. evict the least
    *  frequently accessed Data packet
    *  @return{ whether the Data was removed }
    */
   virtual bool
-  evictItem();
+  evictItem() override;
 
   /** @brief Update the entry when the entry is returned by the find() function,
    *  increment the frequency according to LFU
    */
   virtual void
-  afterAccess(InMemoryStorageEntry* entry);
+  afterAccess(InMemoryStorageEntry* entry) override;
 
   /** @brief Update the entry after a entry is successfully inserted, add it to the cleanupIndex
    */
   virtual void
-  afterInsert(InMemoryStorageEntry* entry);
+  afterInsert(InMemoryStorageEntry* entry) override;
 
   /** @brief Update the entry or other data structures before a entry is successfully erased,
    *  erase it from the cleanupIndex
    */
   virtual void
-  beforeErase(InMemoryStorageEntry* entry);
+  beforeErase(InMemoryStorageEntry* entry) override;
 
 private:
-  //binds frequency and entry together
+  // binds frequency and entry together
   struct CleanupEntry
   {
     InMemoryStorageEntry* entry;
-    uint64_t frequency;//could potentially be overflowed
+    uint64_t frequency; // could potentially be overflowed
   };
 
   /** @brief Function to increment frequency of the entry in the CleanupEntry
diff --git a/src/util/in-memory-storage-lru.cpp b/src/util/in-memory-storage-lru.cpp
index 2a50644..01c8b12 100644
--- a/src/util/in-memory-storage-lru.cpp
+++ b/src/util/in-memory-storage-lru.cpp
@@ -35,10 +35,6 @@
 {
 }
 
-InMemoryStorageLru::~InMemoryStorageLru()
-{
-}
-
 void
 InMemoryStorageLru::afterInsert(InMemoryStorageEntry* entry)
 {
diff --git a/src/util/in-memory-storage-lru.hpp b/src/util/in-memory-storage-lru.hpp
index 8d7f852..4787398 100644
--- a/src/util/in-memory-storage-lru.hpp
+++ b/src/util/in-memory-storage-lru.hpp
@@ -44,33 +44,30 @@
 
   InMemoryStorageLru(boost::asio::io_service& ioService, size_t limit = 10);
 
-  virtual
-  ~InMemoryStorageLru();
-
 NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED:
   /** @brief Removes one Data packet from in-memory storage based on LRU, i.e. evict the least
    *  recently accessed Data packet
    *  @return{ whether the Data was removed }
    */
   virtual bool
-  evictItem();
+  evictItem() override;
 
   /** @brief Update the entry when the entry is returned by the find() function,
    *  update the last used time according to LRU
    */
   virtual void
-  afterAccess(InMemoryStorageEntry* entry);
+  afterAccess(InMemoryStorageEntry* entry) override;
 
   /** @brief Update the entry after a entry is successfully inserted, add it to the cleanupIndex
    */
   virtual void
-  afterInsert(InMemoryStorageEntry* entry);
+  afterInsert(InMemoryStorageEntry* entry) override;
 
   /** @brief Update the entry or other data structures before a entry is successfully erased,
    *  erase it from the cleanupIndex
    */
   virtual void
-  beforeErase(InMemoryStorageEntry* entry);
+  beforeErase(InMemoryStorageEntry* entry) override;
 
 private:
   //multi_index_container to implement LRU
diff --git a/src/util/in-memory-storage-persistent.cpp b/src/util/in-memory-storage-persistent.cpp
index 613aa7b..954e9c1 100644
--- a/src/util/in-memory-storage-persistent.cpp
+++ b/src/util/in-memory-storage-persistent.cpp
@@ -34,10 +34,6 @@
 {
 }
 
-InMemoryStoragePersistent::~InMemoryStoragePersistent()
-{
-}
-
 bool
 InMemoryStoragePersistent::evictItem()
 {
diff --git a/src/util/in-memory-storage-persistent.hpp b/src/util/in-memory-storage-persistent.hpp
index 3cd12ef..3265f52 100644
--- a/src/util/in-memory-storage-persistent.hpp
+++ b/src/util/in-memory-storage-persistent.hpp
@@ -38,9 +38,6 @@
   explicit
   InMemoryStoragePersistent(boost::asio::io_service& ioService);
 
-  virtual
-  ~InMemoryStoragePersistent();
-
 NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PROTECTED:
   /** @brief Do nothing.
    *
@@ -49,7 +46,7 @@
    *  @return false
    */
   virtual bool
-  evictItem();
+  evictItem() override;
 };
 
 } // namespace util
diff --git a/src/util/indented-stream.hpp b/src/util/indented-stream.hpp
index 0ab76a2..31e5839 100644
--- a/src/util/indented-stream.hpp
+++ b/src/util/indented-stream.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -56,7 +56,8 @@
 public:
   IndentedStream(std::ostream& os, const std::string& indent);
 
-  ~IndentedStream();
+  virtual
+  ~IndentedStream() override;
 
 private:
   // Write a stream buffer that prefixes each line
@@ -66,7 +67,7 @@
     StreamBuf(std::ostream& os, const std::string& indent);
 
     virtual int
-    sync();
+    sync() override;
 
   private:
     std::ostream& m_output;
diff --git a/src/util/time-custom-clock.hpp b/src/util/time-custom-clock.hpp
index 066d3e9..57579e5 100644
--- a/src/util/time-custom-clock.hpp
+++ b/src/util/time-custom-clock.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -37,9 +37,8 @@
 class CustomClock
 {
 public:
-  virtual ~CustomClock()
-  {
-  }
+  virtual
+  ~CustomClock() = default;
 
   virtual typename BaseClock::time_point
   getNow() const = 0;
diff --git a/src/util/time-unit-test-clock.hpp b/src/util/time-unit-test-clock.hpp
index d1bbe7d..253e1e7 100644
--- a/src/util/time-unit-test-clock.hpp
+++ b/src/util/time-unit-test-clock.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -27,7 +27,6 @@
 namespace ndn {
 namespace time {
 
-
 /**
  * @brief Traits for UnitTestClock, defining default behavior for different clocks
  *
@@ -42,7 +41,7 @@
   getDefaultStartTime()
   {
     return nanoseconds::zero();
-  };
+  }
 };
 
 /**
@@ -59,7 +58,7 @@
   getDefaultStartTime()
   {
     return seconds(1415684132);
-  };
+  }
 };
 
 /**
@@ -75,8 +74,7 @@
 {
 public:
   explicit
-  UnitTestClock(const nanoseconds& startTime =
-                UnitTestClockTraits<BaseClock>::getDefaultStartTime());
+  UnitTestClock(const nanoseconds& startTime = UnitTestClockTraits<BaseClock>::getDefaultStartTime());
 
   /**
    * @brief Advance unit test clock by @p duration
@@ -91,15 +89,14 @@
   setNow(const nanoseconds& timeSinceEpoch);
 
 public: // CustomClock<BaseClock>
-
   virtual std::string
-  getSince() const;
+  getSince() const override;
 
   virtual typename BaseClock::time_point
-  getNow() const;
+  getNow() const override;
 
   virtual boost::posix_time::time_duration
-  toPosixDuration(const typename BaseClock::duration& duration) const;
+  toPosixDuration(const typename BaseClock::duration& duration) const override;
 
 private:
   nanoseconds m_currentTime;
