diff --git a/daemon/fw/best-route-strategy2.cpp b/daemon/fw/best-route-strategy2.cpp
index df6ca4d..5080d9c 100644
--- a/daemon/fw/best-route-strategy2.cpp
+++ b/daemon/fw/best-route-strategy2.cpp
@@ -195,7 +195,7 @@
     const lp::NackHeader* inNack = outR.getIncomingNack();
     if (inNack == nullptr) {
       ++nOutRecordsNotNacked;
-      lastFaceNotNacked = outR.getFace().get();
+      lastFaceNotNacked = &outR.getFace();
       continue;
     }
 
diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index 2fbc93c..ff8e451 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.cpp
@@ -196,9 +196,8 @@
 {
   NFD_LOG_DEBUG("onContentStoreMiss interest=" << interest.getName());
 
-  shared_ptr<Face> face = const_pointer_cast<Face>(inFace.shared_from_this());
   // insert in-record
-  pitEntry->insertOrUpdateInRecord(face, interest);
+  pitEntry->insertOrUpdateInRecord(const_cast<Face&>(inFace), interest);
 
   // set PIT unsatisfy timer
   this->setUnsatisfyTimer(pitEntry);
@@ -252,8 +251,8 @@
   pit::InRecordCollection::iterator pickedInRecord = std::max_element(
     pitEntry->in_begin(), pitEntry->in_end(),
     [&outFace] (const pit::InRecord& a, const pit::InRecord& b) {
-      bool isOutFaceA = a.getFace().get() == &outFace;
-      bool isOutFaceB = b.getFace().get() == &outFace;
+      bool isOutFaceA = &a.getFace() == &outFace;
+      bool isOutFaceB = &b.getFace() == &outFace;
       return (isOutFaceA > isOutFaceB) ||
              (isOutFaceA == isOutFaceB && a.getLastRenewed() < b.getLastRenewed());
     });
@@ -267,7 +266,7 @@
   }
 
   // insert out-record
-  pitEntry->insertOrUpdateOutRecord(outFace.shared_from_this(), *interest);
+  pitEntry->insertOrUpdateOutRecord(outFace, *interest);
 
   // send Interest
   outFace.sendInterest(*interest);
@@ -360,7 +359,7 @@
     // remember pending downstreams
     for (const pit::InRecord& inRecord : pitEntry->getInRecords()) {
       if (inRecord.getExpiry() > now) {
-        pendingDownstreams.insert(inRecord.getFace().get());
+        pendingDownstreams.insert(&inRecord.getFace());
       }
     }
 
diff --git a/daemon/fw/pit-algorithm.cpp b/daemon/fw/pit-algorithm.cpp
index a9ef7ea..3ff63b8 100644
--- a/daemon/fw/pit-algorithm.cpp
+++ b/daemon/fw/pit-algorithm.cpp
@@ -49,7 +49,7 @@
   if (scope_prefix::LOCALHOP.isPrefixOf(pitEntry.getName())) {
     // face is non-local, violates localhop scope unless PIT entry has local in-record
     return std::none_of(pitEntry.in_begin(), pitEntry.in_end(),
-      [] (const pit::InRecord& inRecord) { return inRecord.getFace()->getScope() == ndn::nfd::FACE_SCOPE_LOCAL; });
+      [] (const pit::InRecord& inRecord) { return inRecord.getFace().getScope() == ndn::nfd::FACE_SCOPE_LOCAL; });
   }
 
   // Name is not subject to scope control
@@ -63,7 +63,7 @@
 
   bool hasUnexpiredOutRecord = std::any_of(pitEntry.out_begin(), pitEntry.out_end(),
     [&face, &now] (const pit::OutRecord& outRecord) {
-      return outRecord.getFace().get() == &face && outRecord.getExpiry() >= now;
+      return &outRecord.getFace() == &face && outRecord.getExpiry() >= now;
     });
   if (hasUnexpiredOutRecord) {
     return false;
@@ -71,7 +71,7 @@
 
   bool hasUnexpiredOtherInRecord = std::any_of(pitEntry.in_begin(), pitEntry.in_end(),
     [&face, &now] (const pit::InRecord& inRecord) {
-      return inRecord.getFace().get() != &face && inRecord.getExpiry() >= now;
+      return &inRecord.getFace() != &face && inRecord.getExpiry() >= now;
     });
   if (!hasUnexpiredOtherInRecord) {
     return false;
@@ -87,7 +87,7 @@
 
   for (const pit::InRecord& inRecord : pitEntry.getInRecords()) {
     if (inRecord.getLastNonce() == nonce) {
-      if (inRecord.getFace().get() == &face) {
+      if (&inRecord.getFace() == &face) {
         dnw |= DUPLICATE_NONCE_IN_SAME;
       }
       else {
@@ -98,7 +98,7 @@
 
   for (const pit::OutRecord& outRecord : pitEntry.getOutRecords()) {
     if (outRecord.getLastNonce() == nonce) {
-      if (outRecord.getFace().get() == &face) {
+      if (&outRecord.getFace() == &face) {
         dnw |= DUPLICATE_NONCE_OUT_SAME;
       }
       else {
diff --git a/daemon/fw/strategy.cpp b/daemon/fw/strategy.cpp
index 2a40517..f645369 100644
--- a/daemon/fw/strategy.cpp
+++ b/daemon/fw/strategy.cpp
@@ -75,10 +75,10 @@
   // populate downstreams with all downstreams faces
   std::unordered_set<const Face*> downstreams;
   std::transform(pitEntry->in_begin(), pitEntry->in_end(), std::inserter(downstreams, downstreams.end()),
-                 [] (const pit::InRecord& inR) { return inR.getFace().get(); });
+                 [] (const pit::InRecord& inR) { return &inR.getFace(); });
 
   // delete excluded faces
-  // .erase in a loop is more efficient than std::set_difference between that requires sorted range
+  // .erase in a loop is more efficient than std::set_difference because that requires sorted range
   for (const Face* exceptFace : exceptFaces) {
     downstreams.erase(exceptFace);
   }
diff --git a/daemon/table/pit-entry.cpp b/daemon/table/pit-entry.cpp
index d19369a..395fc90 100644
--- a/daemon/table/pit-entry.cpp
+++ b/daemon/table/pit-entry.cpp
@@ -38,14 +38,14 @@
 Entry::getInRecord(const Face& face)
 {
   return std::find_if(m_inRecords.begin(), m_inRecords.end(),
-    [&face] (const InRecord& inRecord) { return inRecord.getFace().get() == &face; });
+    [&face] (const InRecord& inRecord) { return &inRecord.getFace() == &face; });
 }
 
 InRecordCollection::iterator
-Entry::insertOrUpdateInRecord(shared_ptr<Face> face, const Interest& interest)
+Entry::insertOrUpdateInRecord(Face& face, const Interest& interest)
 {
   auto it = std::find_if(m_inRecords.begin(), m_inRecords.end(),
-    [&face] (const InRecord& inRecord) { return inRecord.getFace() == face; });
+    [&face] (const InRecord& inRecord) { return &inRecord.getFace() == &face; });
   if (it == m_inRecords.end()) {
     m_inRecords.emplace_front(face);
     it = m_inRecords.begin();
@@ -59,7 +59,7 @@
 Entry::deleteInRecord(const Face& face)
 {
   auto it = std::find_if(m_inRecords.begin(), m_inRecords.end(),
-    [&face] (const InRecord& inRecord) { return inRecord.getFace().get() == &face; });
+    [&face] (const InRecord& inRecord) { return &inRecord.getFace() == &face; });
   if (it != m_inRecords.end()) {
     m_inRecords.erase(it);
   }
@@ -75,14 +75,14 @@
 Entry::getOutRecord(const Face& face)
 {
   return std::find_if(m_outRecords.begin(), m_outRecords.end(),
-    [&face] (const OutRecord& outRecord) { return outRecord.getFace().get() == &face; });
+    [&face] (const OutRecord& outRecord) { return &outRecord.getFace() == &face; });
 }
 
 OutRecordCollection::iterator
-Entry::insertOrUpdateOutRecord(shared_ptr<Face> face, const Interest& interest)
+Entry::insertOrUpdateOutRecord(Face& face, const Interest& interest)
 {
   auto it = std::find_if(m_outRecords.begin(), m_outRecords.end(),
-    [&face] (const OutRecord& outRecord) { return outRecord.getFace() == face; });
+    [&face] (const OutRecord& outRecord) { return &outRecord.getFace() == &face; });
   if (it == m_outRecords.end()) {
     m_outRecords.emplace_front(face);
     it = m_outRecords.begin();
@@ -96,7 +96,7 @@
 Entry::deleteOutRecord(const Face& face)
 {
   auto it = std::find_if(m_outRecords.begin(), m_outRecords.end(),
-    [&face] (const OutRecord& outRecord) { return outRecord.getFace().get() == &face; });
+    [&face] (const OutRecord& outRecord) { return &outRecord.getFace() == &face; });
   if (it != m_outRecords.end()) {
     m_outRecords.erase(it);
   }
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index 5f77a4d..99832ad 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.hpp
@@ -111,7 +111,7 @@
    *  \return an iterator to the new or updated in-record
    */
   InRecordCollection::iterator
-  insertOrUpdateInRecord(shared_ptr<Face> face, const Interest& interest);
+  insertOrUpdateInRecord(Face& face, const Interest& interest);
 
   /** \brief delete the in-record for \p face if it exists
    */
@@ -160,7 +160,7 @@
    *  \return an iterator to the new or updated out-record
    */
   OutRecordCollection::iterator
-  insertOrUpdateOutRecord(shared_ptr<Face> face, const Interest& interest);
+  insertOrUpdateOutRecord(Face& face, const Interest& interest);
 
   /** \brief delete the out-record for \p face if it exists
    */
diff --git a/daemon/table/pit-face-record.cpp b/daemon/table/pit-face-record.cpp
index c62a1b5..d594cb9 100644
--- a/daemon/table/pit-face-record.cpp
+++ b/daemon/table/pit-face-record.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) 2014-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 NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -28,7 +28,7 @@
 namespace nfd {
 namespace pit {
 
-FaceRecord::FaceRecord(shared_ptr<Face> face)
+FaceRecord::FaceRecord(Face& face)
   : m_face(face)
   , m_lastNonce(0)
   , m_lastRenewed(time::steady_clock::TimePoint::min())
diff --git a/daemon/table/pit-face-record.hpp b/daemon/table/pit-face-record.hpp
index c1d6c77..90c3cdb 100644
--- a/daemon/table/pit-face-record.hpp
+++ b/daemon/table/pit-face-record.hpp
@@ -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) 2014-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 NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -41,9 +41,9 @@
 {
 public:
   explicit
-  FaceRecord(shared_ptr<Face> face);
+  FaceRecord(Face& face);
 
-  shared_ptr<Face>
+  Face&
   getFace() const;
 
   uint32_t
@@ -64,13 +64,13 @@
   update(const Interest& interest);
 
 private:
-  shared_ptr<Face> m_face;
+  Face& m_face;
   uint32_t m_lastNonce;
   time::steady_clock::TimePoint m_lastRenewed;
   time::steady_clock::TimePoint m_expiry;
 };
 
-inline shared_ptr<Face>
+inline Face&
 FaceRecord::getFace() const
 {
   return m_face;
diff --git a/daemon/table/pit-in-record.cpp b/daemon/table/pit-in-record.cpp
index b7f0edf..8167190 100644
--- a/daemon/table/pit-in-record.cpp
+++ b/daemon/table/pit-in-record.cpp
@@ -1,11 +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
+ * Copyright (c) 2014-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 NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,14 +21,14 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "pit-in-record.hpp"
 
 namespace nfd {
 namespace pit {
 
-InRecord::InRecord(shared_ptr<Face> face)
+InRecord::InRecord(Face& face)
   : FaceRecord(face)
 {
 }
diff --git a/daemon/table/pit-in-record.hpp b/daemon/table/pit-in-record.hpp
index dd6ad06..45167c3 100644
--- a/daemon/table/pit-in-record.hpp
+++ b/daemon/table/pit-in-record.hpp
@@ -37,7 +37,7 @@
 {
 public:
   explicit
-  InRecord(shared_ptr<Face> face);
+  InRecord(Face& face);
 
   void
   update(const Interest& interest);
diff --git a/daemon/table/pit-out-record.cpp b/daemon/table/pit-out-record.cpp
index 1cf303d..8b4f609 100644
--- a/daemon/table/pit-out-record.cpp
+++ b/daemon/table/pit-out-record.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,7 +28,7 @@
 namespace nfd {
 namespace pit {
 
-OutRecord::OutRecord(shared_ptr<Face> face)
+OutRecord::OutRecord(Face& face)
   : FaceRecord(face)
 {
 }
diff --git a/daemon/table/pit-out-record.hpp b/daemon/table/pit-out-record.hpp
index 4717779..4400fd4 100644
--- a/daemon/table/pit-out-record.hpp
+++ b/daemon/table/pit-out-record.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -37,7 +37,7 @@
 {
 public:
   explicit
-  OutRecord(shared_ptr<Face> face);
+  OutRecord(Face& face);
 
   /** \return last NACK returned by \p getFace()
    *
diff --git a/tests/daemon/fw/asf-measurements.t.cpp b/tests/daemon/fw/asf-measurements.t.cpp
index 2b83004..ffee3e6 100644
--- a/tests/daemon/fw/asf-measurements.t.cpp
+++ b/tests/daemon/fw/asf-measurements.t.cpp
@@ -100,7 +100,7 @@
   shared_ptr<pit::Entry> pitEntry = make_shared<pit::Entry>(*interest);
   std::shared_ptr<DummyFace> face = make_shared<DummyFace>();
 
-  pitEntry->insertOrUpdateOutRecord(face, *interest);
+  pitEntry->insertOrUpdateOutRecord(*face, *interest);
 
   RttEstimator::Duration rtt(50);
   this->advanceClocks(time::milliseconds(5), rtt);
diff --git a/tests/daemon/fw/best-route-strategy2.t.cpp b/tests/daemon/fw/best-route-strategy2.t.cpp
index ac5c3ef..3a0ed29 100644
--- a/tests/daemon/fw/best-route-strategy2.t.cpp
+++ b/tests/daemon/fw/best-route-strategy2.t.cpp
@@ -88,7 +88,7 @@
 
   // first Interest goes to nexthop with lowest FIB cost,
   // however face1 is downstream so it cannot be used
-  pitEntry->insertOrUpdateInRecord(face1, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   strategy.afterReceiveInterest(*face1, *interest, pitEntry);
   BOOST_REQUIRE_EQUAL(strategy.sendInterestHistory.size(), 1);
   BOOST_CHECK_EQUAL(strategy.sendInterestHistory.back().outFaceId, face2->getId());
@@ -100,7 +100,7 @@
   time::steady_clock::TimePoint timeSentLast = time::steady_clock::now();
   function<void()> periodicalRetxFrom4; // let periodicalRetxFrom4 lambda capture itself
   periodicalRetxFrom4 = [&] {
-    pitEntry->insertOrUpdateInRecord(face4, *interest);
+    pitEntry->insertOrUpdateInRecord(*face4, *interest);
     strategy.afterReceiveInterest(*face4, *interest, pitEntry);
 
     size_t nSent = strategy.sendInterestHistory.size();
@@ -132,7 +132,7 @@
   strategy.sendInterestHistory.clear();
   for (int i = 0; i < 3; ++i) {
     this->advanceClocks(TICK, BestRouteStrategy2::RETX_SUPPRESSION_MAX * 2);
-    pitEntry->insertOrUpdateInRecord(face5, *interest);
+    pitEntry->insertOrUpdateInRecord(*face5, *interest);
     strategy.afterReceiveInterest(*face5, *interest, pitEntry);
   }
   BOOST_REQUIRE_EQUAL(strategy.sendInterestHistory.size(), 3);
@@ -202,7 +202,7 @@
 
   shared_ptr<Interest> interest = makeInterest(scenario.getInterestName());
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
-  pitEntry->insertOrUpdateInRecord(face1, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
 
   strategy.afterReceiveInterest(*face1, *interest, pitEntry);
 
@@ -229,9 +229,9 @@
   shared_ptr<Interest> interest1 = makeInterest("/McQYjMbm", 992);
   shared_ptr<Interest> interest2 = makeInterest("/McQYjMbm", 114);
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest1).first;
-  pitEntry->insertOrUpdateInRecord(face1, *interest1);
-  pitEntry->insertOrUpdateInRecord(face2, *interest2);
-  pitEntry->insertOrUpdateOutRecord(face3, *interest1);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest1);
+  pitEntry->insertOrUpdateInRecord(*face2, *interest2);
+  pitEntry->insertOrUpdateOutRecord(*face3, *interest1);
 
   lp::Nack nack3 = makeNack("/McQYjMbm", 992, lp::NackReason::CONGESTION);
   pitEntry->getOutRecord(*face3)->setIncomingNack(nack3);
@@ -258,9 +258,9 @@
 
   shared_ptr<Interest> interest1 = makeInterest("/aS9FAyUV19", 286);
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest1).first;
-  pitEntry->insertOrUpdateInRecord(face1, *interest1);
-  pitEntry->insertOrUpdateOutRecord(face3, *interest1);
-  pitEntry->insertOrUpdateOutRecord(face4, *interest1);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest1);
+  pitEntry->insertOrUpdateOutRecord(*face3, *interest1);
+  pitEntry->insertOrUpdateOutRecord(*face4, *interest1);
 
   lp::Nack nack3 = makeNack("/aS9FAyUV19", 286, lp::NackReason::CONGESTION);
   pitEntry->getOutRecord(*face3)->setIncomingNack(nack3);
@@ -288,13 +288,13 @@
   shared_ptr<Interest> interest1 = makeInterest("/sIYw0TXWDj", 115);
   interest1->setInterestLifetime(time::milliseconds(400));
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest1).first;
-  pitEntry->insertOrUpdateInRecord(face1, *interest1);
-  pitEntry->insertOrUpdateOutRecord(face3, *interest1);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest1);
+  pitEntry->insertOrUpdateOutRecord(*face3, *interest1);
 
   this->advanceClocks(time::milliseconds(300));
   shared_ptr<Interest> interest2 = makeInterest("/sIYw0TXWDj", 223);
-  pitEntry->insertOrUpdateInRecord(face1, *interest2);
-  pitEntry->insertOrUpdateOutRecord(face4, *interest2);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest2);
+  pitEntry->insertOrUpdateOutRecord(*face4, *interest2);
 
   this->advanceClocks(time::milliseconds(200)); // face3 has timed out
 
@@ -431,9 +431,9 @@
 
   shared_ptr<Interest> interest1 = makeInterest("/F6sEwB24I", 282);
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest1).first;
-  pitEntry->insertOrUpdateInRecord(face1, *interest1);
-  pitEntry->insertOrUpdateOutRecord(face3, *interest1);
-  pitEntry->insertOrUpdateOutRecord(face4, *interest1);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest1);
+  pitEntry->insertOrUpdateOutRecord(*face3, *interest1);
+  pitEntry->insertOrUpdateOutRecord(*face4, *interest1);
 
   lp::Nack nack3 = makeNack("/F6sEwB24I", 282, combination.getX());
   pitEntry->getOutRecord(*face3)->setIncomingNack(nack3);
diff --git a/tests/daemon/fw/client-control-strategy.t.cpp b/tests/daemon/fw/client-control-strategy.t.cpp
index 0a31244..9f500e8 100644
--- a/tests/daemon/fw/client-control-strategy.t.cpp
+++ b/tests/daemon/fw/client-control-strategy.t.cpp
@@ -63,7 +63,7 @@
   shared_ptr<Interest> interest1 = makeInterest("ndn:/0z8r6yDDe");
   interest1->setTag(make_shared<lp::NextHopFaceIdTag>(face1->getId()));
   shared_ptr<pit::Entry> pitEntry1 = pit.insert(*interest1).first;
-  pitEntry1->insertOrUpdateInRecord(face4, *interest1);
+  pitEntry1->insertOrUpdateInRecord(*face4, *interest1);
 
   strategy.sendInterestHistory.clear();
   strategy.afterReceiveInterest(*face4, *interest1, pitEntry1);
@@ -73,7 +73,7 @@
   // Interest without NextHopFaceId
   shared_ptr<Interest> interest2 = makeInterest("ndn:/y6JQADGVz");
   shared_ptr<pit::Entry> pitEntry2 = pit.insert(*interest2).first;
-  pitEntry2->insertOrUpdateInRecord(face4, *interest2);
+  pitEntry2->insertOrUpdateInRecord(*face4, *interest2);
 
   strategy.sendInterestHistory.clear();
   strategy.afterReceiveInterest(*face4, *interest2, pitEntry2);
@@ -84,7 +84,7 @@
   shared_ptr<Interest> interest3 = makeInterest("ndn:/0z8r6yDDe");
   interest3->setTag(make_shared<lp::NextHopFaceIdTag>(face3->getId()));
   shared_ptr<pit::Entry> pitEntry3 = pit.insert(*interest3).first;
-  pitEntry3->insertOrUpdateInRecord(face4, *interest3);
+  pitEntry3->insertOrUpdateInRecord(*face4, *interest3);
 
   face3->close(); // face3 is closed and its FaceId becomes invalid
   strategy.sendInterestHistory.clear();
diff --git a/tests/daemon/fw/forwarder.t.cpp b/tests/daemon/fw/forwarder.t.cpp
index ad2877e..0e6741c 100644
--- a/tests/daemon/fw/forwarder.t.cpp
+++ b/tests/daemon/fw/forwarder.t.cpp
@@ -129,7 +129,7 @@
   auto interestA1 = makeInterest("/A");
   interestA1->setNonce(8378);
   shared_ptr<pit::Entry> pitA = pit.insert(*interestA1).first;
-  pit::InRecordCollection::iterator inA1 = pitA->insertOrUpdateInRecord(face1, *interestA1);
+  pit::InRecordCollection::iterator inA1 = pitA->insertOrUpdateInRecord(*face1, *interestA1);
 
   // there is only one downstream, interestA1 is used
   forwarder.onOutgoingInterest(pitA, *face3, false);
@@ -151,7 +151,7 @@
   this->advanceClocks(time::seconds(2));
   auto interestA2 = makeInterest("/A");
   interestA2->setNonce(9102);
-  pitA->insertOrUpdateInRecord(face2, *interestA2);
+  pitA->insertOrUpdateInRecord(*face2, *interestA2);
 
   // there are two downstreams, prefer newer interestA2
   forwarder.onOutgoingInterest(pitA, *face3, false);
@@ -265,7 +265,7 @@
   // local face, /localhost: OK
   shared_ptr<Interest> interestA1 = makeInterest("/localhost/A1");
   shared_ptr<pit::Entry> pitA1 = pit.insert(*interestA1).first;
-  pitA1->insertOrUpdateInRecord(face3, *interestA1);
+  pitA1->insertOrUpdateInRecord(*face3, *interestA1);
   face1->sentInterests.clear();
   forwarder.onOutgoingInterest(pitA1, *face1);
   BOOST_CHECK_EQUAL(face1->sentInterests.size(), 1);
@@ -273,7 +273,7 @@
   // non-local face, /localhost: violate
   shared_ptr<Interest> interestA2 = makeInterest("/localhost/A2");
   shared_ptr<pit::Entry> pitA2 = pit.insert(*interestA2).first;
-  pitA2->insertOrUpdateInRecord(face3, *interestA2);
+  pitA2->insertOrUpdateInRecord(*face3, *interestA2);
   face2->sentInterests.clear();
   forwarder.onOutgoingInterest(pitA2, *face2);
   BOOST_CHECK_EQUAL(face2->sentInterests.size(), 0);
@@ -281,7 +281,7 @@
   // local face, non-/localhost: OK
   shared_ptr<Interest> interestA3 = makeInterest("/A3");
   shared_ptr<pit::Entry> pitA3 = pit.insert(*interestA3).first;
-  pitA3->insertOrUpdateInRecord(face3, *interestA3);
+  pitA3->insertOrUpdateInRecord(*face3, *interestA3);
   face1->sentInterests.clear();
   forwarder.onOutgoingInterest(pitA3, *face1);
   BOOST_CHECK_EQUAL(face1->sentInterests.size(), 1);
@@ -289,7 +289,7 @@
   // non-local face, non-/localhost: OK
   shared_ptr<Interest> interestA4 = makeInterest("/A4");
   shared_ptr<pit::Entry> pitA4 = pit.insert(*interestA4).first;
-  pitA4->insertOrUpdateInRecord(face3, *interestA4);
+  pitA4->insertOrUpdateInRecord(*face3, *interestA4);
   face2->sentInterests.clear();
   forwarder.onOutgoingInterest(pitA4, *face2);
   BOOST_CHECK_EQUAL(face2->sentInterests.size(), 1);
@@ -331,7 +331,7 @@
   // from local face, to local face: OK
   shared_ptr<Interest> interest1 = makeInterest("/localhop/1");
   shared_ptr<pit::Entry> pit1 = pit.insert(*interest1).first;
-  pit1->insertOrUpdateInRecord(face1, *interest1);
+  pit1->insertOrUpdateInRecord(*face1, *interest1);
   face3->sentInterests.clear();
   forwarder.onOutgoingInterest(pit1, *face3);
   BOOST_CHECK_EQUAL(face3->sentInterests.size(), 1);
@@ -339,7 +339,7 @@
   // from non-local face, to local face: OK
   shared_ptr<Interest> interest2 = makeInterest("/localhop/2");
   shared_ptr<pit::Entry> pit2 = pit.insert(*interest2).first;
-  pit2->insertOrUpdateInRecord(face2, *interest2);
+  pit2->insertOrUpdateInRecord(*face2, *interest2);
   face3->sentInterests.clear();
   forwarder.onOutgoingInterest(pit2, *face3);
   BOOST_CHECK_EQUAL(face3->sentInterests.size(), 1);
@@ -347,7 +347,7 @@
   // from local face, to non-local face: OK
   shared_ptr<Interest> interest3 = makeInterest("/localhop/3");
   shared_ptr<pit::Entry> pit3 = pit.insert(*interest3).first;
-  pit3->insertOrUpdateInRecord(face1, *interest3);
+  pit3->insertOrUpdateInRecord(*face1, *interest3);
   face4->sentInterests.clear();
   forwarder.onOutgoingInterest(pit3, *face4);
   BOOST_CHECK_EQUAL(face4->sentInterests.size(), 1);
@@ -355,7 +355,7 @@
   // from non-local face, to non-local face: violate
   shared_ptr<Interest> interest4 = makeInterest("/localhop/4");
   shared_ptr<pit::Entry> pit4 = pit.insert(*interest4).first;
-  pit4->insertOrUpdateInRecord(face2, *interest4);
+  pit4->insertOrUpdateInRecord(*face2, *interest4);
   face4->sentInterests.clear();
   forwarder.onOutgoingInterest(pit4, *face4);
   BOOST_CHECK_EQUAL(face4->sentInterests.size(), 0);
@@ -363,8 +363,8 @@
   // from local face and non-local face, to local face: OK
   shared_ptr<Interest> interest5 = makeInterest("/localhop/5");
   shared_ptr<pit::Entry> pit5 = pit.insert(*interest5).first;
-  pit5->insertOrUpdateInRecord(face1, *interest5);
-  pit5->insertOrUpdateInRecord(face2, *interest5);
+  pit5->insertOrUpdateInRecord(*face1, *interest5);
+  pit5->insertOrUpdateInRecord(*face2, *interest5);
   face3->sentInterests.clear();
   forwarder.onOutgoingInterest(pit5, *face3);
   BOOST_CHECK_EQUAL(face3->sentInterests.size(), 1);
@@ -372,8 +372,8 @@
   // from local face and non-local face, to non-local face: OK
   shared_ptr<Interest> interest6 = makeInterest("/localhop/6");
   shared_ptr<pit::Entry> pit6 = pit.insert(*interest6).first;
-  pit6->insertOrUpdateInRecord(face1, *interest6);
-  pit6->insertOrUpdateInRecord(face2, *interest6);
+  pit6->insertOrUpdateInRecord(*face1, *interest6);
+  pit6->insertOrUpdateInRecord(*face2, *interest6);
   face4->sentInterests.clear();
   forwarder.onOutgoingInterest(pit6, *face4);
   BOOST_CHECK_EQUAL(face4->sentInterests.size(), 1);
@@ -443,15 +443,15 @@
   Pit& pit = forwarder.getPit();
   shared_ptr<Interest> interest0 = makeInterest("ndn:/");
   shared_ptr<pit::Entry> pit0 = pit.insert(*interest0).first;
-  pit0->insertOrUpdateInRecord(face1, *interest0);
+  pit0->insertOrUpdateInRecord(*face1, *interest0);
   shared_ptr<Interest> interestA = makeInterest("ndn:/A");
   shared_ptr<pit::Entry> pitA = pit.insert(*interestA).first;
-  pitA->insertOrUpdateInRecord(face1, *interestA);
-  pitA->insertOrUpdateInRecord(face2, *interestA);
+  pitA->insertOrUpdateInRecord(*face1, *interestA);
+  pitA->insertOrUpdateInRecord(*face2, *interestA);
   shared_ptr<Interest> interestC = makeInterest("ndn:/A/B/C");
   shared_ptr<pit::Entry> pitC = pit.insert(*interestC).first;
-  pitC->insertOrUpdateInRecord(face3, *interestC);
-  pitC->insertOrUpdateInRecord(face4, *interestC);
+  pitC->insertOrUpdateInRecord(*face3, *interestC);
+  pitC->insertOrUpdateInRecord(*face4, *interestC);
 
   shared_ptr<Data> dataD = makeData("ndn:/A/B/C/D");
   forwarder.onIncomingData(*face3, *dataD);
@@ -484,10 +484,10 @@
   // dispatch to the correct strategy
   shared_ptr<Interest> interest1 = makeInterest("/A/AYJqayrzF", 562);
   shared_ptr<pit::Entry> pit1 = pit.insert(*interest1).first;
-  pit1->insertOrUpdateOutRecord(face1, *interest1);
+  pit1->insertOrUpdateOutRecord(*face1, *interest1);
   shared_ptr<Interest> interest2 = makeInterest("/B/EVyP73ru", 221);
   shared_ptr<pit::Entry> pit2 = pit.insert(*interest2).first;
-  pit2->insertOrUpdateOutRecord(face1, *interest2);
+  pit2->insertOrUpdateOutRecord(*face1, *interest2);
 
   lp::Nack nack1 = makeNack("/A/AYJqayrzF", 562, lp::NackReason::CONGESTION);
   strategyP.afterReceiveNack_count = 0;
@@ -520,7 +520,7 @@
   // drop if no out-record
   shared_ptr<Interest> interest4 = makeInterest("/Etab4KpY", 157);
   shared_ptr<pit::Entry> pit4 = pit.insert(*interest4).first;
-  pit4->insertOrUpdateOutRecord(face1, *interest4);
+  pit4->insertOrUpdateOutRecord(*face1, *interest4);
 
   lp::Nack nack4a = makeNack("/Etab4KpY", 157, lp::NackReason::CONGESTION);
   strategyP.afterReceiveNack_count = 0;
@@ -538,7 +538,7 @@
   BOOST_CHECK_EQUAL(strategyQ.afterReceiveNack_count, 0);
 
   // drop if inFace is multi-access
-  pit4->insertOrUpdateOutRecord(face3, *interest4);
+  pit4->insertOrUpdateOutRecord(*face3, *interest4);
   strategyP.afterReceiveNack_count = 0;
   strategyQ.afterReceiveNack_count = 0;
   forwarder.onIncomingNack(*face3, nack4a);
@@ -567,7 +567,7 @@
   // don't send Nack if there's no in-record
   shared_ptr<Interest> interest1 = makeInterest("/fM5IVEtC", 719);
   shared_ptr<pit::Entry> pit1 = pit.insert(*interest1).first;
-  pit1->insertOrUpdateInRecord(face1, *interest1);
+  pit1->insertOrUpdateInRecord(*face1, *interest1);
 
   face2->sentNacks.clear();
   forwarder.onOutgoingNack(pit1, *face2, nackHeader);
@@ -576,9 +576,9 @@
   // send Nack with correct Nonce
   shared_ptr<Interest> interest2a = makeInterest("/Vi8tRm9MG3", 152);
   shared_ptr<pit::Entry> pit2 = pit.insert(*interest2a).first;
-  pit2->insertOrUpdateInRecord(face1, *interest2a);
+  pit2->insertOrUpdateInRecord(*face1, *interest2a);
   shared_ptr<Interest> interest2b = makeInterest("/Vi8tRm9MG3", 808);
-  pit2->insertOrUpdateInRecord(face2, *interest2b);
+  pit2->insertOrUpdateInRecord(*face2, *interest2b);
 
   face1->sentNacks.clear();
   forwarder.onOutgoingNack(pit2, *face1, nackHeader);
@@ -603,7 +603,7 @@
 
   // don't send Nack to multi-access face
   shared_ptr<Interest> interest2c = makeInterest("/Vi8tRm9MG3", 228);
-  pit2->insertOrUpdateInRecord(face3, *interest2c);
+  pit2->insertOrUpdateInRecord(*face3, *interest2c);
 
   face3->sentNacks.clear();
   forwarder.onOutgoingNack(pit1, *face3, nackHeader);
@@ -743,7 +743,7 @@
   auto interest1 = makeInterest("/net/ndnsim/www/1.html");
   interest1->setLink(link->wireEncode());
   shared_ptr<pit::Entry> pit1 = pit.insert(*interest1).first;
-  pit1->insertOrUpdateInRecord(face1, *interest1);
+  pit1->insertOrUpdateInRecord(*face1, *interest1);
 
   BOOST_CHECK_EQUAL(forwarder.lookupFib(*pit1).getPrefix(), "/");
   BOOST_CHECK_EQUAL(interest1->hasSelectedDelegation(), false);
@@ -759,7 +759,7 @@
   auto interest2 = makeInterest("/net/ndnsim/www/2.html");
   interest2->setLink(link->wireEncode());
   shared_ptr<pit::Entry> pit2 = pit.insert(*interest2).first;
-  pit2->insertOrUpdateInRecord(face1, *interest2);
+  pit2->insertOrUpdateInRecord(*face1, *interest2);
 
   BOOST_CHECK_EQUAL(forwarder.lookupFib(*pit2).getPrefix(), "/telia");
   BOOST_REQUIRE_EQUAL(interest2->hasSelectedDelegation(), true);
@@ -776,7 +776,7 @@
   auto interest3 = makeInterest("/net/ndnsim/www/3.html");
   interest3->setLink(link->wireEncode());
   shared_ptr<pit::Entry> pit3 = pit.insert(*interest3).first;
-  pit3->insertOrUpdateInRecord(face1, *interest3);
+  pit3->insertOrUpdateInRecord(*face1, *interest3);
 
   BOOST_CHECK_EQUAL(forwarder.lookupFib(*pit3).getPrefix(), "/ucla");
   BOOST_REQUIRE_EQUAL(interest3->hasSelectedDelegation(), true);
@@ -794,7 +794,7 @@
   interest4->setLink(link->wireEncode());
   interest4->setSelectedDelegation("/ucla/cs");
   shared_ptr<pit::Entry> pit4 = pit.insert(*interest4).first;
-  pit4->insertOrUpdateInRecord(face1, *interest4);
+  pit4->insertOrUpdateInRecord(*face1, *interest4);
 
   BOOST_CHECK_EQUAL(forwarder.lookupFib(*pit4).getPrefix(), "/ucla");
   BOOST_REQUIRE_EQUAL(interest4->hasSelectedDelegation(), true);
@@ -814,7 +814,7 @@
   interest5->setLink(link->wireEncode());
   interest5->setSelectedDelegation("/ucla/cs");
   shared_ptr<pit::Entry> pit5 = pit.insert(*interest5).first;
-  pit5->insertOrUpdateInRecord(face1, *interest5);
+  pit5->insertOrUpdateInRecord(*face1, *interest5);
 
   BOOST_CHECK_EQUAL(forwarder.lookupFib(*pit1).getPrefix(), "/net/ndnsim");
   BOOST_REQUIRE_EQUAL(interest5->hasSelectedDelegation(), true);
diff --git a/tests/daemon/fw/multicast-strategy.t.cpp b/tests/daemon/fw/multicast-strategy.t.cpp
index 2800dc7..1b8afcb 100644
--- a/tests/daemon/fw/multicast-strategy.t.cpp
+++ b/tests/daemon/fw/multicast-strategy.t.cpp
@@ -60,7 +60,7 @@
   shared_ptr<Interest> interest = makeInterest("ndn:/H0D6i5fc");
   Pit& pit = forwarder.getPit();
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
-  pitEntry->insertOrUpdateInRecord(face3, *interest);
+  pitEntry->insertOrUpdateInRecord(*face3, *interest);
 
   strategy.afterReceiveInterest(*face3, *interest, pitEntry);
   BOOST_CHECK_EQUAL(strategy.rejectPendingInterestHistory.size(), 0);
@@ -94,7 +94,7 @@
   shared_ptr<Interest> interest = makeInterest("ndn:/localhop/uS09bub6tm/eG3MMoP6z");
   Pit& pit = forwarder.getPit();
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
-  pitEntry->insertOrUpdateInRecord(face1, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
 
   strategy.afterReceiveInterest(*face1, *interest, pitEntry);
   BOOST_CHECK_EQUAL(strategy.rejectPendingInterestHistory.size(), 1);
@@ -117,7 +117,7 @@
   shared_ptr<Interest> interest = makeInterest("ndn:/H0D6i5fc");
   Pit& pit = forwarder.getPit();
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
-  pitEntry->insertOrUpdateInRecord(face1, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
 
   strategy.afterReceiveInterest(*face1, *interest, pitEntry);
   BOOST_CHECK_EQUAL(strategy.rejectPendingInterestHistory.size(), 1);
diff --git a/tests/daemon/fw/ncc-strategy.t.cpp b/tests/daemon/fw/ncc-strategy.t.cpp
index 9adc6ab..f3b34b6 100644
--- a/tests/daemon/fw/ncc-strategy.t.cpp
+++ b/tests/daemon/fw/ncc-strategy.t.cpp
@@ -73,7 +73,7 @@
   interest1.setInterestLifetime(time::milliseconds(8000));
   shared_ptr<pit::Entry> pitEntry1 = pit.insert(interest1).first;
 
-  pitEntry1->insertOrUpdateInRecord(face3, interest1);
+  pitEntry1->insertOrUpdateInRecord(*face3, interest1);
   strategy.afterReceiveInterest(*face3, interest1, pitEntry1);
 
   // forwards to face1 because routing says it's best
@@ -98,7 +98,7 @@
   interest2.setInterestLifetime(time::milliseconds(8000));
   shared_ptr<pit::Entry> pitEntry2 = pit.insert(interest2).first;
 
-  pitEntry2->insertOrUpdateInRecord(face3, interest2);
+  pitEntry2->insertOrUpdateInRecord(*face3, interest2);
   strategy.afterReceiveInterest(*face3, interest2, pitEntry2);
 
   // forwards to face2 because it responds previously
@@ -130,7 +130,7 @@
   interest1->setInterestLifetime(time::milliseconds(8000));
   shared_ptr<pit::Entry> pitEntry1 = pit.insert(*interest1).first;
 
-  pitEntry1->insertOrUpdateInRecord(face3, *interest1);
+  pitEntry1->insertOrUpdateInRecord(*face3, *interest1);
   strategy.afterReceiveInterest(*face3, *interest1, pitEntry1);
 
   this->advanceClocks(time::milliseconds(1));
@@ -148,7 +148,7 @@
   interest2->setInterestLifetime(time::milliseconds(8000));
   shared_ptr<pit::Entry> pitEntry2 = pit.insert(*interest2).first;
 
-  pitEntry2->insertOrUpdateInRecord(face3, *interest2);
+  pitEntry2->insertOrUpdateInRecord(*face3, *interest2);
   strategy.afterReceiveInterest(*face3, *interest2, pitEntry2);
 
   // FIB entry is changed before doPropagate executes
@@ -182,7 +182,7 @@
   interest1->setInterestLifetime(time::milliseconds(2000));
   shared_ptr<pit::Entry> pitEntry1 = pit.insert(*interest1).first;
 
-  pitEntry1->insertOrUpdateInRecord(face3, *interest1);
+  pitEntry1->insertOrUpdateInRecord(*face3, *interest1);
   strategy.afterReceiveInterest(*face3, *interest1, pitEntry1);
   limitedIo.run(2 - strategy.sendInterestHistory.size(),
                 time::milliseconds(2000), time::milliseconds(10));
@@ -204,7 +204,7 @@
   interest2->setInterestLifetime(time::milliseconds(2000));
   shared_ptr<pit::Entry> pitEntry2 = pit.insert(*interest2).first;
 
-  pitEntry2->insertOrUpdateInRecord(face3, *interest2);
+  pitEntry2->insertOrUpdateInRecord(*face3, *interest2);
   strategy.afterReceiveInterest(*face3, *interest2, pitEntry2);
   limitedIo.run(3 - strategy.sendInterestHistory.size(),
                 time::milliseconds(2000), time::milliseconds(10));
@@ -236,7 +236,7 @@
   interest1->setInterestLifetime(time::milliseconds(2000));
   shared_ptr<pit::Entry> pitEntry1 = pit.insert(*interest1).first;
 
-  pitEntry1->insertOrUpdateInRecord(face1, *interest1);
+  pitEntry1->insertOrUpdateInRecord(*face1, *interest1);
   strategy.afterReceiveInterest(*face1, *interest1, pitEntry1);
   limitedIo.run(1 - strategy.sendInterestHistory.size(),
                 time::milliseconds(2000), time::milliseconds(10));
@@ -252,7 +252,7 @@
   this->advanceClocks(time::milliseconds(10));
 
   // similar Interest: strategy should still forward it
-  pitEntry1->insertOrUpdateInRecord(face1, *interest1);
+  pitEntry1->insertOrUpdateInRecord(*face1, *interest1);
   strategy.afterReceiveInterest(*face1, *interest1, pitEntry1);
   limitedIo.run(2 - strategy.sendInterestHistory.size(),
                 time::milliseconds(2000), time::milliseconds(10));
@@ -280,7 +280,7 @@
   // Interest comes from face1, which is sole downstream
   shared_ptr<Interest> interest1 = makeInterest("ndn:/tFy5HzUzD4");
   shared_ptr<pit::Entry> pitEntry1 = pit.insert(*interest1).first;
-  pitEntry1->insertOrUpdateInRecord(face1, *interest1);
+  pitEntry1->insertOrUpdateInRecord(*face1, *interest1);
 
   strategy.afterReceiveInterest(*face1, *interest1, pitEntry1);
 
diff --git a/tests/daemon/fw/pit-algorithm.t.cpp b/tests/daemon/fw/pit-algorithm.t.cpp
index cf3eea0..0589e0d 100644
--- a/tests/daemon/fw/pit-algorithm.t.cpp
+++ b/tests/daemon/fw/pit-algorithm.t.cpp
@@ -62,7 +62,7 @@
   shared_ptr<Interest> interest = makeInterest("ndn:/ieWRzDsCu");
   pit::Entry entry(*interest);
 
-  entry.insertOrUpdateInRecord(nonLocalFace1, *interest);
+  entry.insertOrUpdateInRecord(*nonLocalFace1, *interest);
   BOOST_CHECK_EQUAL(violatesScope(entry, *nonLocalFace2), false);
   BOOST_CHECK_EQUAL(violatesScope(entry, *localFace4), false);
 }
@@ -72,7 +72,7 @@
   shared_ptr<Interest> interest = makeInterest("ndn:/localhost/5n1LzIt3");
   pit::Entry entry(*interest);
 
-  entry.insertOrUpdateInRecord(localFace3, *interest);
+  entry.insertOrUpdateInRecord(*localFace3, *interest);
   BOOST_CHECK_EQUAL(violatesScope(entry, *nonLocalFace2), true);
   BOOST_CHECK_EQUAL(violatesScope(entry, *localFace4), false);
 }
@@ -82,7 +82,7 @@
   shared_ptr<Interest> interest = makeInterest("ndn:/localhop/YcIKWCRYJ");
   pit::Entry entry(*interest);
 
-  entry.insertOrUpdateInRecord(localFace3, *interest);
+  entry.insertOrUpdateInRecord(*localFace3, *interest);
   BOOST_CHECK_EQUAL(violatesScope(entry, *nonLocalFace2), false);
   BOOST_CHECK_EQUAL(violatesScope(entry, *localFace4), false);
 }
@@ -92,7 +92,7 @@
   shared_ptr<Interest> interest = makeInterest("ndn:/localhop/x5uFr5IpqY");
   pit::Entry entry(*interest);
 
-  entry.insertOrUpdateInRecord(nonLocalFace1, *interest);
+  entry.insertOrUpdateInRecord(*nonLocalFace1, *interest);
   BOOST_CHECK_EQUAL(violatesScope(entry, *nonLocalFace2), true);
   BOOST_CHECK_EQUAL(violatesScope(entry, *localFace4), false);
 }
@@ -102,8 +102,8 @@
   shared_ptr<Interest> interest = makeInterest("ndn:/localhop/gNn2MJAXt");
   pit::Entry entry(*interest);
 
-  entry.insertOrUpdateInRecord(nonLocalFace1, *interest);
-  entry.insertOrUpdateInRecord(localFace3, *interest);
+  entry.insertOrUpdateInRecord(*nonLocalFace1, *interest);
+  entry.insertOrUpdateInRecord(*localFace3, *interest);
   BOOST_CHECK_EQUAL(violatesScope(entry, *nonLocalFace2), false);
   BOOST_CHECK_EQUAL(violatesScope(entry, *localFace4), false);
 }
@@ -118,15 +118,15 @@
   auto face1 = make_shared<DummyFace>();
   auto face2 = make_shared<DummyFace>();
 
-  entry.insertOrUpdateInRecord(face1, *interest);
+  entry.insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face1), false);
   BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face2), true);
 
-  entry.insertOrUpdateInRecord(face2, *interest);
+  entry.insertOrUpdateInRecord(*face2, *interest);
   BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face1), true);
   BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face2), true);
 
-  entry.insertOrUpdateOutRecord(face1, *interest);
+  entry.insertOrUpdateOutRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face1), false);
   BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face2), true);
 }
@@ -146,22 +146,22 @@
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry0, 19004, *face2), DUPLICATE_NONCE_NONE);
 
   pit::Entry entry1(*interest);
-  entry1.insertOrUpdateInRecord(face1, *interest);
+  entry1.insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry1, 25559, *face1), DUPLICATE_NONCE_IN_SAME);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry1, 25559, *face2), DUPLICATE_NONCE_IN_OTHER);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry1, 19004, *face1), DUPLICATE_NONCE_NONE);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry1, 19004, *face2), DUPLICATE_NONCE_NONE);
 
   pit::Entry entry2(*interest);
-  entry2.insertOrUpdateOutRecord(face1, *interest);
+  entry2.insertOrUpdateOutRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry2, 25559, *face1), DUPLICATE_NONCE_OUT_SAME);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry2, 25559, *face2), DUPLICATE_NONCE_OUT_OTHER);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry2, 19004, *face1), DUPLICATE_NONCE_NONE);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry2, 19004, *face2), DUPLICATE_NONCE_NONE);
 
   pit::Entry entry3(*interest);
-  entry3.insertOrUpdateInRecord(face1, *interest);
-  entry3.insertOrUpdateOutRecord(face1, *interest);
+  entry3.insertOrUpdateInRecord(*face1, *interest);
+  entry3.insertOrUpdateOutRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry3, 25559, *face1),
                     DUPLICATE_NONCE_IN_SAME | DUPLICATE_NONCE_OUT_SAME);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry3, 25559, *face2),
@@ -170,8 +170,8 @@
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry3, 19004, *face2), DUPLICATE_NONCE_NONE);
 
   pit::Entry entry4(*interest);
-  entry4.insertOrUpdateInRecord(face1, *interest);
-  entry4.insertOrUpdateInRecord(face2, *interest);
+  entry4.insertOrUpdateInRecord(*face1, *interest);
+  entry4.insertOrUpdateInRecord(*face2, *interest);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry4, 25559, *face1),
                     DUPLICATE_NONCE_IN_SAME | DUPLICATE_NONCE_IN_OTHER);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry4, 25559, *face2),
@@ -180,8 +180,8 @@
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry4, 19004, *face2), DUPLICATE_NONCE_NONE);
 
   pit::Entry entry5(*interest);
-  entry5.insertOrUpdateOutRecord(face1, *interest);
-  entry5.insertOrUpdateOutRecord(face2, *interest);
+  entry5.insertOrUpdateOutRecord(*face1, *interest);
+  entry5.insertOrUpdateOutRecord(*face2, *interest);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry5, 25559, *face1),
                     DUPLICATE_NONCE_OUT_SAME | DUPLICATE_NONCE_OUT_OTHER);
   BOOST_CHECK_EQUAL(findDuplicateNonce(entry5, 25559, *face2),
@@ -203,13 +203,13 @@
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);
 
   // Interest-Data
-  entry.insertOrUpdateOutRecord(face1, *interest);
+  entry.insertOrUpdateOutRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), true);
   entry.deleteOutRecord(*face1);
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);
 
   // Interest-Nack
-  entry.insertOrUpdateOutRecord(face2, *interest);
+  entry.insertOrUpdateOutRecord(*face2, *interest);
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), true);
   pit::OutRecordCollection::iterator outR = entry.getOutRecord(*face2);
   BOOST_REQUIRE(outR != entry.out_end());
@@ -219,7 +219,7 @@
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);
 
   // Interest-timeout
-  entry.insertOrUpdateOutRecord(face3, *interest);
+  entry.insertOrUpdateOutRecord(*face3, *interest);
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), true);
   this->advanceClocks(ndn::DEFAULT_INTEREST_LIFETIME, 2);
   BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);
diff --git a/tests/daemon/fw/retx-suppression.t.cpp b/tests/daemon/fw/retx-suppression.t.cpp
index 266f168..7013aef 100644
--- a/tests/daemon/fw/retx-suppression.t.cpp
+++ b/tests/daemon/fw/retx-suppression.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2015,  Regents of the University of California,
+ * Copyright (c) 2014-2016,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -59,31 +59,31 @@
       time::duration_cast<time::nanoseconds>(MIN_RETX_INTERVAL * 0.1);
 
   // @ time 0
-  pitEntry->insertOrUpdateInRecord(face1, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(rs.decide(*face1, *interest, *pitEntry), RetxSuppression::NEW);
-  pitEntry->insertOrUpdateOutRecord(face3, *interest);
+  pitEntry->insertOrUpdateOutRecord(*face3, *interest);
 
   this->advanceClocks(RETRANSMISSION_10P, 5); // @ time 0.5 interval
-  pitEntry->insertOrUpdateInRecord(face1, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(rs.decide(*face1, *interest, *pitEntry), RetxSuppression::SUPPRESS);
-  pitEntry->insertOrUpdateInRecord(face2, *interest);
+  pitEntry->insertOrUpdateInRecord(*face2, *interest);
   BOOST_CHECK_EQUAL(rs.decide(*face2, *interest, *pitEntry), RetxSuppression::SUPPRESS);
 
   this->advanceClocks(RETRANSMISSION_10P, 6); // @ time 1.1 interval
-  pitEntry->insertOrUpdateInRecord(face2, *interest);
+  pitEntry->insertOrUpdateInRecord(*face2, *interest);
   BOOST_CHECK_EQUAL(rs.decide(*face2, *interest, *pitEntry), RetxSuppression::FORWARD);
   // but strategy decides not to forward
 
   this->advanceClocks(RETRANSMISSION_10P, 1); // @ time 1.2 interval
-  pitEntry->insertOrUpdateInRecord(face1, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(rs.decide(*face1, *interest, *pitEntry), RetxSuppression::FORWARD);
   // retransmission suppress shall still give clearance for forwarding
-  pitEntry->insertOrUpdateOutRecord(face3, *interest); // and strategy forwards
+  pitEntry->insertOrUpdateOutRecord(*face3, *interest); // and strategy forwards
 
   this->advanceClocks(RETRANSMISSION_10P, 2); // @ time 1.4 interval
-  pitEntry->insertOrUpdateInRecord(face1, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(rs.decide(*face1, *interest, *pitEntry), RetxSuppression::SUPPRESS);
-  pitEntry->insertOrUpdateInRecord(face2, *interest);
+  pitEntry->insertOrUpdateInRecord(*face2, *interest);
   BOOST_CHECK_EQUAL(rs.decide(*face2, *interest, *pitEntry), RetxSuppression::SUPPRESS);
 }
 
@@ -102,13 +102,13 @@
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
 
   // @ 0ms
-  pitEntry->insertOrUpdateInRecord(face1, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(rs.decide(*face1, *interest, *pitEntry), RetxSuppression::NEW);
-  pitEntry->insertOrUpdateOutRecord(face2, *interest);
+  pitEntry->insertOrUpdateOutRecord(*face2, *interest);
   // suppression interval is 10ms, until 10ms
 
   this->advanceClocks(time::milliseconds(5)); // @ 5ms
-  pitEntry->insertOrUpdateInRecord(face1, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(rs.decide(*face1, *interest, *pitEntry), RetxSuppression::SUPPRESS);
   // suppression interval is 10ms, until 10ms
 
@@ -116,42 +116,42 @@
   // note: what happens at *exactly* 10ms does not matter so it's untested,
   // because in reality network timing won't be exact:
   // incoming Interest is processed either before or after 10ms point
-  pitEntry->insertOrUpdateInRecord(face1, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(rs.decide(*face1, *interest, *pitEntry), RetxSuppression::FORWARD);
-  pitEntry->insertOrUpdateOutRecord(face2, *interest);
+  pitEntry->insertOrUpdateOutRecord(*face2, *interest);
   // suppression interval is 30ms, until 41ms
 
   this->advanceClocks(time::milliseconds(25)); // @ 36ms
-  pitEntry->insertOrUpdateInRecord(face1, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(rs.decide(*face1, *interest, *pitEntry), RetxSuppression::SUPPRESS);
   // suppression interval is 30ms, until 41ms
 
   this->advanceClocks(time::milliseconds(6)); // @ 42ms
-  pitEntry->insertOrUpdateInRecord(face1, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(rs.decide(*face1, *interest, *pitEntry), RetxSuppression::FORWARD);
   // strategy decides not to forward, but suppression interval is increased nevertheless
   // suppression interval is 90ms, until 101ms
 
   this->advanceClocks(time::milliseconds(58)); // @ 100ms
-  pitEntry->insertOrUpdateInRecord(face1, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(rs.decide(*face1, *interest, *pitEntry), RetxSuppression::SUPPRESS);
   // suppression interval is 90ms, until 101ms
 
   this->advanceClocks(time::milliseconds(3)); // @ 103ms
-  pitEntry->insertOrUpdateInRecord(face1, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(rs.decide(*face1, *interest, *pitEntry), RetxSuppression::FORWARD);
-  pitEntry->insertOrUpdateOutRecord(face2, *interest);
+  pitEntry->insertOrUpdateOutRecord(*face2, *interest);
   // suppression interval is 100ms, until 203ms
 
   this->advanceClocks(time::milliseconds(99)); // @ 202ms
-  pitEntry->insertOrUpdateInRecord(face1, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(rs.decide(*face1, *interest, *pitEntry), RetxSuppression::SUPPRESS);
   // suppression interval is 100ms, until 203ms
 
   this->advanceClocks(time::milliseconds(2)); // @ 204ms
-  pitEntry->insertOrUpdateInRecord(face1, *interest);
+  pitEntry->insertOrUpdateInRecord(*face1, *interest);
   BOOST_CHECK_EQUAL(rs.decide(*face1, *interest, *pitEntry), RetxSuppression::FORWARD);
-  pitEntry->insertOrUpdateOutRecord(face2, *interest);
+  pitEntry->insertOrUpdateOutRecord(*face2, *interest);
   // suppression interval is 100ms, until 304ms
 }
 
diff --git a/tests/daemon/fw/strategy-tester.hpp b/tests/daemon/fw/strategy-tester.hpp
index da79517..3840438 100644
--- a/tests/daemon/fw/strategy-tester.hpp
+++ b/tests/daemon/fw/strategy-tester.hpp
@@ -96,7 +96,7 @@
 {
   SendInterestArgs args{pitEntry, outFace.getId(), wantNewNonce};
   sendInterestHistory.push_back(args);
-  pitEntry->insertOrUpdateOutRecord(outFace.shared_from_this(), pitEntry->getInterest());
+  pitEntry->insertOrUpdateOutRecord(outFace, pitEntry->getInterest());
   afterAction();
 }
 
diff --git a/tests/daemon/table/cleanup.t.cpp b/tests/daemon/table/cleanup.t.cpp
index 0df019c..20638ab 100644
--- a/tests/daemon/table/cleanup.t.cpp
+++ b/tests/daemon/table/cleanup.t.cpp
@@ -55,10 +55,10 @@
     shared_ptr<Interest> interest = makeInterest(name);
     shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
     if ((i & 0x01) != 0) {
-      pitEntry->insertOrUpdateInRecord(face1, *interest);
+      pitEntry->insertOrUpdateInRecord(*face1, *interest);
     }
     if ((i & 0x02) != 0) {
-      pitEntry->insertOrUpdateOutRecord(face1, *interest);
+      pitEntry->insertOrUpdateOutRecord(*face1, *interest);
     }
   }
   BOOST_CHECK_EQUAL(fib.size(), 300);
@@ -144,22 +144,22 @@
 
   shared_ptr<Interest> interestA = makeInterest("/A");
   shared_ptr<pit::Entry> entryA = pit.insert(*interestA).first;
-  entryA->insertOrUpdateInRecord(face1, *interestA);
-  entryA->insertOrUpdateInRecord(face2, *interestA);
-  entryA->insertOrUpdateOutRecord(face1, *interestA);
-  entryA->insertOrUpdateOutRecord(face2, *interestA);
+  entryA->insertOrUpdateInRecord(*face1, *interestA);
+  entryA->insertOrUpdateInRecord(*face2, *interestA);
+  entryA->insertOrUpdateOutRecord(*face1, *interestA);
+  entryA->insertOrUpdateOutRecord(*face2, *interestA);
   // {'/A':[1,2]}
 
   shared_ptr<Interest> interestB = makeInterest("/B");
   shared_ptr<pit::Entry> entryB = pit.insert(*interestB).first;
-  entryB->insertOrUpdateInRecord(face1, *interestB);
-  entryB->insertOrUpdateOutRecord(face1, *interestB);
+  entryB->insertOrUpdateInRecord(*face1, *interestB);
+  entryB->insertOrUpdateOutRecord(*face1, *interestB);
   // {'/A':[1,2], '/B':[1]}
 
   shared_ptr<Interest> interestC = makeInterest("/C");
   shared_ptr<pit::Entry> entryC = pit.insert(*interestC).first;
-  entryC->insertOrUpdateInRecord(face2, *interestC);
-  entryC->insertOrUpdateOutRecord(face2, *interestC);
+  entryC->insertOrUpdateInRecord(*face2, *interestC);
+  entryC->insertOrUpdateOutRecord(*face2, *interestC);
   // {'/A':[1,2], '/B':[1], '/C':[2]}
   BOOST_CHECK_EQUAL(pit.size(), 3);
 
@@ -172,9 +172,9 @@
   shared_ptr<pit::Entry> foundA = pit.find(*interestA);
   BOOST_REQUIRE(foundA != nullptr);
   BOOST_REQUIRE_EQUAL(foundA->getInRecords().size(), 1);
-  BOOST_CHECK_EQUAL(foundA->getInRecords().front().getFace(), face2);
+  BOOST_CHECK_EQUAL(&foundA->getInRecords().front().getFace(), face2.get());
   BOOST_REQUIRE_EQUAL(foundA->getOutRecords().size(), 1);
-  BOOST_CHECK_EQUAL(foundA->getOutRecords().front().getFace(), face2);
+  BOOST_CHECK_EQUAL(&foundA->getOutRecords().front().getFace(), face2.get());
 }
 
 BOOST_AUTO_TEST_SUITE_END() // FaceRemovalCleanup
diff --git a/tests/daemon/table/pit.t.cpp b/tests/daemon/table/pit.t.cpp
index 0418f7e..6135502 100644
--- a/tests/daemon/table/pit.t.cpp
+++ b/tests/daemon/table/pit.t.cpp
@@ -70,12 +70,12 @@
 
   // insert in-record
   time::steady_clock::TimePoint before1 = time::steady_clock::now();
-  InRecordCollection::iterator in1 = entry.insertOrUpdateInRecord(face1, *interest1);
+  InRecordCollection::iterator in1 = entry.insertOrUpdateInRecord(*face1, *interest1);
   time::steady_clock::TimePoint after1 = time::steady_clock::now();
   const InRecordCollection& inRecords2 = entry.getInRecords();
   BOOST_CHECK_EQUAL(inRecords2.size(), 1);
   BOOST_CHECK(in1 == inRecords2.begin());
-  BOOST_CHECK_EQUAL(in1->getFace(), face1);
+  BOOST_CHECK_EQUAL(&in1->getFace(), face1.get());
   BOOST_CHECK_EQUAL(in1->getLastNonce(), interest1->getNonce());
   BOOST_CHECK_GE(in1->getLastRenewed(), before1);
   BOOST_CHECK_LE(in1->getLastRenewed(), after1);
@@ -86,12 +86,12 @@
 
   // insert out-record
   time::steady_clock::TimePoint before2 = time::steady_clock::now();
-  OutRecordCollection::iterator out1 = entry.insertOrUpdateOutRecord(face1, *interest1);
+  OutRecordCollection::iterator out1 = entry.insertOrUpdateOutRecord(*face1, *interest1);
   time::steady_clock::TimePoint after2 = time::steady_clock::now();
   const OutRecordCollection& outRecords2 = entry.getOutRecords();
   BOOST_CHECK_EQUAL(outRecords2.size(), 1);
   BOOST_CHECK(out1 == outRecords2.begin());
-  BOOST_CHECK_EQUAL(out1->getFace(), face1);
+  BOOST_CHECK_EQUAL(&out1->getFace(), face1.get());
   BOOST_CHECK_EQUAL(out1->getLastNonce(), interest1->getNonce());
   BOOST_CHECK_GE(out1->getLastRenewed(), before2);
   BOOST_CHECK_LE(out1->getLastRenewed(), after2);
@@ -102,27 +102,27 @@
 
   // update in-record
   time::steady_clock::TimePoint before3 = time::steady_clock::now();
-  InRecordCollection::iterator in2 = entry.insertOrUpdateInRecord(face1, *interest2);
+  InRecordCollection::iterator in2 = entry.insertOrUpdateInRecord(*face1, *interest2);
   time::steady_clock::TimePoint after3 = time::steady_clock::now();
   const InRecordCollection& inRecords3 = entry.getInRecords();
   BOOST_CHECK_EQUAL(inRecords3.size(), 1);
   BOOST_CHECK(in2 == inRecords3.begin());
-  BOOST_CHECK_EQUAL(in2->getFace(), face1);
+  BOOST_CHECK_EQUAL(&in2->getFace(), face1.get());
   BOOST_CHECK_EQUAL(in2->getLastNonce(), interest2->getNonce());
   BOOST_CHECK_LE(in2->getExpiry() - in2->getLastRenewed()
                  - interest2->getInterestLifetime(),
                  (after3 - before3));
 
   // insert another in-record
-  InRecordCollection::iterator in3 = entry.insertOrUpdateInRecord(face2, *interest3);
+  InRecordCollection::iterator in3 = entry.insertOrUpdateInRecord(*face2, *interest3);
   const InRecordCollection& inRecords4 = entry.getInRecords();
   BOOST_CHECK_EQUAL(inRecords4.size(), 2);
-  BOOST_CHECK_EQUAL(in3->getFace(), face2);
+  BOOST_CHECK_EQUAL(&in3->getFace(), face2.get());
 
   // get in-record
   InRecordCollection::iterator in4 = entry.getInRecord(*face1);
   BOOST_REQUIRE(in4 != entry.in_end());
-  BOOST_CHECK_EQUAL(in4->getFace(), face1);
+  BOOST_CHECK_EQUAL(&in4->getFace(), face1.get());
 
   // clear in-records
   entry.clearInRecords();
@@ -132,21 +132,21 @@
 
   // insert another out-record
   OutRecordCollection::iterator out2 =
-    entry.insertOrUpdateOutRecord(face2, *interest4);
+    entry.insertOrUpdateOutRecord(*face2, *interest4);
   const OutRecordCollection& outRecords3 = entry.getOutRecords();
   BOOST_CHECK_EQUAL(outRecords3.size(), 2);
-  BOOST_CHECK_EQUAL(out2->getFace(), face2);
+  BOOST_CHECK_EQUAL(&out2->getFace(), face2.get());
 
   // get out-record
   OutRecordCollection::iterator out3 = entry.getOutRecord(*face1);
   BOOST_REQUIRE(out3 != entry.out_end());
-  BOOST_CHECK_EQUAL(out3->getFace(), face1);
+  BOOST_CHECK_EQUAL(&out3->getFace(), face1.get());
 
   // delete out-record
   entry.deleteOutRecord(*face2);
   const OutRecordCollection& outRecords4 = entry.getOutRecords();
   BOOST_REQUIRE_EQUAL(outRecords4.size(), 1);
-  BOOST_CHECK_EQUAL(outRecords4.begin()->getFace(), face1);
+  BOOST_CHECK_EQUAL(&outRecords4.begin()->getFace(), face1.get());
   BOOST_CHECK(entry.getOutRecord(*face2) == entry.out_end());
 }
 
@@ -159,17 +159,17 @@
   shared_ptr<Face> face = make_shared<DummyFace>();
   Entry entry(*interest);
 
-  InRecordCollection::iterator inIt = entry.insertOrUpdateInRecord(face, *interest);
+  InRecordCollection::iterator inIt = entry.insertOrUpdateInRecord(*face, *interest);
   BOOST_CHECK_GT(inIt->getExpiry(), time::steady_clock::now());
 
-  OutRecordCollection::iterator outIt = entry.insertOrUpdateOutRecord(face, *interest);
+  OutRecordCollection::iterator outIt = entry.insertOrUpdateOutRecord(*face, *interest);
   BOOST_CHECK_GT(outIt->getExpiry(), time::steady_clock::now());
 }
 
 BOOST_AUTO_TEST_CASE(OutRecordNack)
 {
   shared_ptr<Face> face1 = make_shared<DummyFace>();
-  OutRecord outR(face1);
+  OutRecord outR(*face1);
   BOOST_CHECK(outR.getIncomingNack() == nullptr);
 
   shared_ptr<Interest> interest1 = makeInterest("ndn:/uWiapGjYL");
