diff --git a/src/logic.cpp b/src/logic.cpp
index 9d09bbc..05defbd 100644
--- a/src/logic.cpp
+++ b/src/logic.cpp
@@ -273,10 +273,7 @@
     if (!m_isInReset) {
       CHRONO_LOG_DBG("updateSeqNo: not in Reset");
       ConstBufferPtr previousRoot = m_state.getRootDigest();
-      {
-        std::string hash = ndn::toHex(previousRoot->data(), previousRoot->size(), false);
-        CHRONO_LOG_DBG("Hash: " << hash);
-      }
+      printDigest(previousRoot);
 
       bool isInserted = false;
       bool isUpdated = false;
@@ -398,7 +395,7 @@
 void
 Logic::onSyncDataValidated(const Data& data)
 {
-  Name name = data.getName();
+  const auto& name = data.getName();
   ConstBufferPtr digest = make_shared<ndn::Buffer>(name.get(-1).value(), name.get(-1).value_size());
 
   try {
@@ -407,7 +404,7 @@
     processSyncData(name, digest, Block(std::move(contentBuffer)));
   }
   catch (const std::ios_base::failure& error) {
-    NDN_LOG_WARN("Error decompressing content of " << data.getName() << " (" << error.what() << ")");
+    NDN_LOG_WARN("Error decompressing content of " << name << " (" << error.what() << ")");
   }
 }
 
@@ -416,9 +413,8 @@
 {
   CHRONO_LOG_DBG(">> Logic::processSyncInterest");
 
-  Name name = interest.getName();
+  const auto& name = interest.getName();
   ConstBufferPtr digest = make_shared<ndn::Buffer>(name.get(-1).value(), name.get(-1).value_size());
-
   ConstBufferPtr rootDigest = m_state.getRootDigest();
 
   // If the digest of the incoming interest is the same as root digest
@@ -669,7 +665,7 @@
   syncReply.setFreshnessPeriod(m_syncReplyFreshness);
 
   auto finalizeReply = [this, &nodePrefix, &syncReply] (const State& state) {
-    auto contentBuffer = bzip2::compress(reinterpret_cast<const char*>(state.wireEncode().wire()),
+    auto contentBuffer = bzip2::compress(reinterpret_cast<const char*>(state.wireEncode().data()),
                                          state.wireEncode().size());
     syncReply.setContent(contentBuffer);
 
@@ -737,10 +733,9 @@
 }
 
 void
-Logic::printDigest(ConstBufferPtr digest)
+Logic::printDigest(const ConstBufferPtr& digest) const
 {
-  std::string hash = ndn::toHex(digest->data(), digest->size(), false);
-  CHRONO_LOG_DBG("Hash: " << hash);
+  CHRONO_LOG_DBG("Hash: " << ndn::toHex(*digest, false));
 }
 
 void
@@ -771,7 +766,7 @@
 {
   CHRONO_LOG_DBG(">> Logic::processRecoveryInterest");
 
-  Name name = interest.getName();
+  const auto& name = interest.getName();
   ConstBufferPtr digest = make_shared<ndn::Buffer>(name.get(-1).value(), name.get(-1).value_size());
   ConstBufferPtr rootDigest = m_state.getRootDigest();
 
