diff --git a/src/clients/response.cpp b/src/clients/response.cpp
index 5f223d3..3da172b 100644
--- a/src/clients/response.cpp
+++ b/src/clients/response.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -26,7 +26,7 @@
 Response::Response()
   : m_contentType(NDNS_BLOB)
   , m_freshnessPeriod(DEFAULT_RR_FRESHNESS_PERIOD)
-  , m_appContent(makeBinaryBlock(ndn::tlv::Content, reinterpret_cast<const uint8_t*>(0), 0))
+  , m_appContent(makeEmptyBlock(ndn::tlv::Content))
 {
 }
 
@@ -35,12 +35,12 @@
   , m_queryType(queryType)
   , m_contentType(NDNS_BLOB)
   , m_freshnessPeriod(DEFAULT_RR_FRESHNESS_PERIOD)
-  , m_appContent(makeBinaryBlock(ndn::tlv::Content, reinterpret_cast<const uint8_t*>(0), 0))
+  , m_appContent(makeEmptyBlock(ndn::tlv::Content))
 {
 }
 
 template<encoding::Tag T>
-inline size_t
+size_t
 Response::wireEncode(EncodingImpl<T>& block) const
 {
   if (m_contentType == NDNS_BLOB || m_contentType == NDNS_KEY) {
@@ -52,8 +52,7 @@
   //              Block*
 
   size_t totalLength = 0;
-  for (std::vector<Block>::const_reverse_iterator iter = m_rrs.rbegin();
-       iter != m_rrs.rend(); ++iter) {
+  for (auto iter = m_rrs.rbegin(); iter != m_rrs.rend(); ++iter) {
     totalLength += block.prependBlock(*iter);
   }
 
@@ -176,7 +175,7 @@
 bool
 Response::removeRr(const Block& rr)
 {
-  for (std::vector<Block>::iterator iter = m_rrs.begin(); iter != m_rrs.end(); ++iter) {
+  for (auto iter = m_rrs.begin(); iter != m_rrs.end(); ++iter) {
     if (*iter == rr) {
       m_rrs.erase(iter);
       return true;
@@ -207,14 +206,13 @@
               getRrType() == other.getRrType() && getVersion() == other.getVersion() &&
               getContentType() == other.getContentType());
 
-  if (tmp == false)
-    return tmp;
+  if (!tmp)
+    return false;
 
-  if (m_contentType == NDNS_BLOB || m_contentType == NDNS_KEY) {
-    return tmp && (getAppContent() == other.getAppContent());
-  }
+  if (m_contentType == NDNS_BLOB || m_contentType == NDNS_KEY)
+    return getAppContent() == other.getAppContent();
   else
-    return tmp && getRrs() == other.getRrs();
+    return getRrs() == other.getRrs();
 }
 
 std::ostream&
@@ -229,15 +227,16 @@
      << " NdnsContentType=" << response.getContentType();
   if (response.getContentType() == NDNS_BLOB
       || response.getContentType() == NDNS_KEY) {
-    if (response.getAppContent().empty())
-      os << " appContent=NULL";
-    else
+    if (response.getAppContent().isValid())
       os << " appContentSize=" << response.getAppContent().size();
+    else
+      os << " appContent=NULL";
   }
   else {
     os << " rrs.size=" << response.getRrs().size();
   }
   return os;
 }
+
 } // namespace ndns
 } // namespace ndn
diff --git a/src/mgmt/management-tool.cpp b/src/mgmt/management-tool.cpp
index 3832561..3119840 100644
--- a/src/mgmt/management-tool.cpp
+++ b/src/mgmt/management-tool.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -447,7 +447,7 @@
       os << "; rrset=" << rrset.getLabel().toUri()
          << " type=" << rrset.getType().toUri()
          << " version=" << rrset.getVersion().toUri()
-         << " signed-by=" << data.getSignature().getKeyLocator().getName().toUri()
+         << " signed-by=" << data.getKeyLocator()->getName().toUri()
          << std::endl;
     }
 
@@ -494,7 +494,7 @@
       os.width();
       os << "; content-type=" << re.getContentType()
          << " version=" << rrset.getVersion().toUri()
-         << " signed-by=" << data.getSignature().getKeyLocator().getName().toUri();
+         << " signed-by=" << data.getKeyLocator()->getName().toUri();
       os << std::endl;
 
       if (printRaw && (re.getContentType() == NDNS_BLOB
diff --git a/src/util/util.cpp b/src/util/util.cpp
index 7d350a5..8466733 100644
--- a/src/util/util.cpp
+++ b/src/util/util.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -64,8 +64,11 @@
     bufferSource(block.wire(), block.size()) >> base64Encode() >> streamSink(os);
   }
   else {
-    os << "Name: " << data.getName().toUri() << std::endl;
-    os << "KeyLocator: " << data.getSignature().getKeyLocator().getName().toUri() << std::endl;
+    os << "Name: " << data.getName() << std::endl;
+    auto kl = data.getKeyLocator();
+    if (kl) {
+      os << "KeyLocator: " << kl->getName() << std::endl;
+    }
     bufferSource(block.wire(), block.size()) >> base64Encode() >> streamSink(os);
     os << std::endl;
   }
