diff --git a/utils/ndn-limits-rate.cpp b/utils/ndn-limits-rate.cpp
deleted file mode 100644
index 8729231..0000000
--- a/utils/ndn-limits-rate.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2011 University of California, Los Angeles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- */
-
-#include "ndn-limits-rate.hpp"
-
-#include "ns3/log.h"
-#include "ns3/simulator.h"
-#include "ns3/random-variable.h"
-#include "ns3/ndn-face.hpp"
-#include "ns3/node.h"
-
-NS_LOG_COMPONENT_DEFINE("ndn.Limits.Rate");
-
-namespace ns3 {
-namespace ndn {
-
-NS_OBJECT_ENSURE_REGISTERED(LimitsRate);
-
-TypeId
-LimitsRate::GetTypeId()
-{
-  static TypeId tid =
-    TypeId("ns3::ndn::Limits::Rate")
-      .SetGroupName("Ndn")
-      .SetParent<Limits>()
-      .AddConstructor<LimitsRate>()
-
-      .AddAttribute("RandomizeLeak", "Randomize start time for token bucket leakage. May be "
-                                     "helpful to prevent leak synchronizations",
-                    TimeValue(Seconds(0.001)),
-                    MakeTimeAccessor(&LimitsRate::m_leakRandomizationInteral), MakeTimeChecker())
-
-    ;
-  return tid;
-}
-
-void
-LimitsRate::NotifyNewAggregate()
-{
-  super::NotifyNewAggregate();
-
-  if (!m_isLeakScheduled) {
-    if (GetObject<Face>() != 0) {
-      NS_ASSERT_MSG(GetObject<Face>()->GetNode() != 0, "Node object should exist on the face");
-
-      m_isLeakScheduled = true;
-
-      if (!m_leakRandomizationInteral.IsZero()) {
-        UniformVariable r(0.0, m_leakRandomizationInteral.ToDouble(Time::S));
-        Simulator::ScheduleWithContext(GetObject<Face>()->GetNode()->GetId(), Seconds(r.GetValue()),
-                                       &LimitsRate::LeakBucket, this, 0.0);
-      }
-      else {
-        Simulator::ScheduleWithContext(GetObject<Face>()->GetNode()->GetId(), Seconds(0),
-                                       &LimitsRate::LeakBucket, this, 0.0);
-      }
-    }
-  }
-}
-
-void
-LimitsRate::SetLimits(double rate, double delay)
-{
-  super::SetLimits(rate, delay);
-
-  // maximum allowed burst
-  m_bucketMax = GetMaxRate() * GetMaxDelay();
-
-  // amount of packets allowed every second (leak rate)
-  m_bucketLeak = GetMaxRate();
-}
-
-void
-LimitsRate::UpdateCurrentLimit(double limit)
-{
-  NS_ASSERT_MSG(limit >= 0.0, "Limit should be greater or equal to zero");
-
-  m_bucketLeak = std::min(limit, GetMaxRate());
-  m_bucketMax = m_bucketLeak * GetMaxDelay();
-}
-
-bool
-LimitsRate::IsBelowLimit()
-{
-  if (!IsEnabled())
-    return true;
-
-  return (m_bucketMax - m_bucket >= 1.0);
-}
-
-void
-LimitsRate::BorrowLimit()
-{
-  if (!IsEnabled())
-    return;
-
-  NS_ASSERT_MSG(m_bucketMax - m_bucket >= 1.0,
-                "Should not be possible, unless we IsBelowLimit was not checked correctly");
-  m_bucket += 1;
-}
-
-void
-LimitsRate::ReturnLimit()
-{
-  // do nothing
-}
-
-void
-LimitsRate::LeakBucket(double interval)
-{
-  const double leak = m_bucketLeak * interval;
-
-#ifdef NS3_LOG_ENABLE
-  if (m_bucket > 1) {
-    NS_LOG_DEBUG("Leak from " << m_bucket << " to " << std::max(0.0, m_bucket - leak));
-  }
-#endif
-
-  double bucketOld = m_bucket;
-
-  m_bucket = std::max(0.0, m_bucket - leak);
-
-  // calculate interval so next time we will leak by 1.001, unless such interval would be more than
-  // 1 second
-  double newInterval = 1.0;
-  if (m_bucketLeak > 1.0) {
-    newInterval = 1.001 / m_bucketLeak;
-  }
-
-  if (m_bucketMax - bucketOld < 1.0
-      && m_bucketMax - m_bucket >= 1.0) // limit number of times this stuff is called
-  {
-    this->FireAvailableSlotCallback();
-  }
-
-  Simulator::Schedule(Seconds(newInterval), &LimitsRate::LeakBucket, this, newInterval);
-}
-
-} // namespace ndn
-} // namespace ns3
diff --git a/utils/ndn-limits-rate.hpp b/utils/ndn-limits-rate.hpp
deleted file mode 100644
index a476247..0000000
--- a/utils/ndn-limits-rate.hpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2011 University of California, Los Angeles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- */
-
-#ifndef _NDN_LIMITS_RATE_H_
-#define _NDN_LIMITS_RATE_H_
-
-#include "ndn-limits.hpp"
-#include <ns3/nstime.h>
-
-namespace ns3 {
-namespace ndn {
-
-/**
- * \ingroup ndn-fw
- * \brief Structure to manage limits for outstanding interests
- */
-class LimitsRate : public Limits {
-public:
-  typedef Limits super;
-
-  static TypeId
-  GetTypeId();
-
-  /**
-   * \brief Constructor
-   * \param prefix smart pointer to the prefix for the FIB entry
-   */
-  LimitsRate()
-    : m_isLeakScheduled(false)
-    , m_bucketMax(0)
-    , m_bucketLeak(1)
-    , m_bucket(0)
-  {
-  }
-
-  virtual ~LimitsRate()
-  {
-  }
-
-  virtual void
-  SetLimits(double rate, double delay);
-
-  virtual double
-  GetMaxLimit() const
-  {
-    return GetMaxRate();
-  }
-
-  /**
-   * @brief Check if Interest limit is reached (token bucket is not empty)
-   */
-  virtual bool
-  IsBelowLimit();
-
-  /**
-   * @brief Get token from the bucket
-   */
-  virtual void
-  BorrowLimit();
-
-  /**
-   * @brief Does nothing (token bucket leakage is time-dependent only)
-   */
-  virtual void
-  ReturnLimit();
-
-  /**
-   * @brief Update normalized amount that should be leaked every second (token bucket leak rate) and
-   * leak rate
-   */
-  virtual void
-  UpdateCurrentLimit(double limit);
-
-  /**
-   * @brief Get normalized amount that should be leaked every second (token bucket leak rate)
-   */
-  virtual double
-  GetCurrentLimit() const
-  {
-    return m_bucketLeak;
-  }
-
-  virtual double
-  GetCurrentLimitRate() const
-  {
-    return m_bucketLeak;
-  }
-
-protected:
-  // from Node
-  void
-  NotifyNewAggregate();
-
-private:
-  /**
-   * @brief Leak bucket, assuming `interval' seconds between leakages
-   *
-   * @param interval Time interval for leakage. Used to calculate size of the leak
-   */
-  void
-  LeakBucket(double interval);
-
-private:
-  bool m_isLeakScheduled;
-
-  double m_bucketMax; ///< \brief Maximum Interest allowance for this face (maximum tokens that can
-  /// be issued at the same time)
-  double m_bucketLeak; ///< \brief Normalized amount that should be leaked every second (token
-  /// bucket leak rate)
-  double m_bucket; ///< \brief Value representing current size of the Interest allowance for this
-  /// face (current size of token bucket)
-
-  Time m_leakRandomizationInteral;
-};
-
-} // namespace ndn
-} // namespace ns3
-
-#endif // _NDN_LIMITS_RATE_H_
diff --git a/utils/ndn-limits-window.cpp b/utils/ndn-limits-window.cpp
deleted file mode 100644
index c5c5098..0000000
--- a/utils/ndn-limits-window.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2011 University of California, Los Angeles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- */
-
-#include "ndn-limits-window.hpp"
-
-#include "ns3/log.h"
-
-NS_LOG_COMPONENT_DEFINE("ndn.Limits.Window");
-
-namespace ns3 {
-namespace ndn {
-
-NS_OBJECT_ENSURE_REGISTERED(LimitsWindow);
-
-TypeId
-LimitsWindow::GetTypeId()
-{
-  static TypeId tid = TypeId("ns3::ndn::Limits::Window")
-                        .SetGroupName("Ndn")
-                        .SetParent<Limits>()
-                        .AddConstructor<LimitsWindow>()
-
-                        .AddTraceSource("CurMaxLimit", "Current maximum limit",
-                                        MakeTraceSourceAccessor(&LimitsWindow::m_curMaxLimit))
-
-                        .AddTraceSource("Outstanding", "Number of outstanding interests",
-                                        MakeTraceSourceAccessor(&LimitsWindow::m_outstanding));
-  return tid;
-}
-
-void
-LimitsWindow::UpdateCurrentLimit(double limit)
-{
-  NS_ASSERT_MSG(limit >= 0.0, "Limit should be greater or equal to zero");
-
-  m_curMaxLimit = std::min(limit, GetMaxRate() * GetMaxDelay());
-}
-
-bool
-LimitsWindow::IsBelowLimit()
-{
-  if (!IsEnabled())
-    return true;
-
-  return (m_curMaxLimit - m_outstanding >= 1.0);
-}
-
-void
-LimitsWindow::BorrowLimit()
-{
-  if (!IsEnabled())
-    return;
-
-  NS_ASSERT_MSG(m_curMaxLimit - m_outstanding >= 1.0,
-                "Should not be possible, unless we IsBelowLimit was not checked correctly");
-  m_outstanding += 1;
-}
-
-void
-LimitsWindow::ReturnLimit()
-{
-  if (!IsEnabled())
-    return;
-
-  NS_ASSERT_MSG(m_outstanding >= (uint32_t)1,
-                "Should not be possible, unless we decreasing this number twice somewhere");
-  m_outstanding -= 1;
-
-  FireAvailableSlotCallback();
-}
-
-} // namespace ndn
-} // namespace ns3
diff --git a/utils/ndn-limits-window.hpp b/utils/ndn-limits-window.hpp
deleted file mode 100644
index b407e02..0000000
--- a/utils/ndn-limits-window.hpp
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2011 University of California, Los Angeles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- */
-
-#ifndef _NDN_LIMITS_WINDOW_H_
-#define _NDN_LIMITS_WINDOW_H_
-
-#include "ndn-limits.hpp"
-
-namespace ns3 {
-namespace ndn {
-
-/**
- * \ingroup ndn-fw
- * \brief Structure to manage limits for outstanding interests (window-based limiting)
- */
-class LimitsWindow : public Limits {
-public:
-  typedef Limits super;
-
-  static TypeId
-  GetTypeId();
-
-  /**
-   * @brief Default Constructor
-   */
-  LimitsWindow()
-    : m_outstanding(0)
-  {
-  }
-
-  /**
-   * @brief Virtual destructor
-   */
-  virtual ~LimitsWindow()
-  {
-  }
-
-  // from ndn::Limits
-
-  virtual void
-  SetLimits(double rate, double delay)
-  {
-    super::SetLimits(rate, delay);
-
-    m_curMaxLimit = GetMaxRate() * GetMaxDelay();
-  }
-
-  virtual double
-  GetMaxLimit() const
-  {
-    return GetMaxRate() * GetMaxDelay();
-  }
-
-  virtual void
-  UpdateCurrentLimit(double limit);
-
-  virtual double
-  GetCurrentLimit() const
-  {
-    return m_curMaxLimit;
-  }
-
-  virtual double
-  GetCurrentLimitRate() const
-  {
-    return m_curMaxLimit / GetMaxDelay();
-  }
-
-  /**
-   * @brief Check if current interest window (number of pending interests) if less than maximum
-   */
-  virtual bool
-  IsBelowLimit();
-
-  /**
-   * @brief Increase current window of outstanding interests
-   */
-  virtual void
-  BorrowLimit();
-
-  /**
-   * @brief Decrease current window of outstanding interests
-   */
-  virtual void
-  ReturnLimit();
-
-private:
-  TracedValue<double> m_curMaxLimit;
-  TracedValue<double> m_outstanding;
-};
-
-} // namespace ndn
-} // namespace ns3
-
-#endif // _NDN_LIMITS_WINDOW_H_
diff --git a/utils/ndn-limits.cpp b/utils/ndn-limits.cpp
deleted file mode 100644
index 037b313..0000000
--- a/utils/ndn-limits.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2011 University of California, Los Angeles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- */
-
-#include "ndn-limits.hpp"
-
-#include "ns3/log.h"
-#include "ns3/simulator.h"
-#include "ns3/random-variable.h"
-
-NS_LOG_COMPONENT_DEFINE("ndn.Limits");
-
-namespace ns3 {
-namespace ndn {
-
-TypeId
-Limits::GetTypeId()
-{
-  static TypeId tid = TypeId("ns3::ndn::Limits").SetGroupName("Ndn").SetParent<Object>()
-
-    ;
-  return tid;
-}
-
-Limits::Limits()
-  : m_maxRate(-1)
-  , m_maxDelay(1.0)
-  , m_handler(MakeNullCallback<void>())
-  , m_linkDelay(0)
-{
-}
-
-void
-Limits::RegisterAvailableSlotCallback(CallbackHandler handler)
-{
-  m_handler = handler;
-}
-
-void
-Limits::FireAvailableSlotCallback()
-{
-  if (!m_handler.IsNull())
-    m_handler();
-}
-
-} // namespace ndn
-} // namespace ns3
diff --git a/utils/ndn-limits.hpp b/utils/ndn-limits.hpp
deleted file mode 100644
index ebb8d15..0000000
--- a/utils/ndn-limits.hpp
+++ /dev/null
@@ -1,200 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
-/*
- * Copyright (c) 2011 University of California, Los Angeles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- */
-
-#ifndef _NDN_LIMITS_H_
-#define _NDN_LIMITS_H_
-
-#include "ns3/ptr.h"
-#include "ns3/object.h"
-#include "ns3/traced-value.h"
-
-namespace ns3 {
-namespace ndn {
-
-/**
- * \ingroup ndn-fw
- * \brief Abstract class to manage Interest limits
- */
-class Limits : public Object {
-public:
-  typedef Callback<void> CallbackHandler;
-
-  static TypeId
-  GetTypeId();
-
-  /**
-   * @brief Default constructor
-   */
-  Limits();
-
-  /**
-   * @brief Virtual destructor
-   */
-  virtual ~Limits()
-  {
-  }
-
-  /**
-   * @brief Set limit for the number of outstanding interests
-   * @param rate   Maximum rate that needs to be enforced
-   * @param delay  Maximum delay for BDP product for window-based limits
-   */
-  virtual void
-  SetLimits(double rate, double delay)
-  {
-    m_maxRate = rate;
-    m_maxDelay = delay;
-  }
-
-  /**
-   * @brief Get maximum rate that needs to be enforced
-   */
-  virtual double
-  GetMaxRate() const
-  {
-    return m_maxRate;
-  }
-
-  /**
-   * @brief Get maximum delay for BDP product for window-based limits
-   */
-  virtual double
-  GetMaxDelay() const
-  {
-    return m_maxDelay;
-  }
-
-  /**
-   * @brief Get maximum limit (interpretation of the limit depends on realization)
-   */
-  virtual double
-  GetMaxLimit() const = 0;
-
-  /**
-   * @brief Check whether limits are enabled or not
-   */
-  virtual inline bool
-  IsEnabled() const
-  {
-    return m_maxRate > 0.0;
-  }
-
-  /**
-   * @brief Update a current value of the limit
-   * @param limit Value of current limit.
-   *
-   * Note that interpretation of this value may be different in different ndn::Limit realizations
-   *
-   * All realizations will try to guarantee that if limit is larger than previously set value of
-   *maximum limit,
-   * then the current limit will be limited to that maximum value
-   */
-  virtual void
-  UpdateCurrentLimit(double limit) = 0;
-
-  /**
-   * @brief Get value of the current limit
-   *
-   * Note that interpretation of this value may be different in different ndn::Limit realizations
-   */
-  virtual double
-  GetCurrentLimit() const = 0;
-
-  /**
-   * @brief Get value of the current limit in terms of maximum rate that needs to be enforced
-   *
-   * Compared to GetCurrentLimit, this method guarantees that the returned value is maximum number
-   *of packets
-   * that can be send out within one second (max "rate")
-   */
-  virtual double
-  GetCurrentLimitRate() const = 0;
-
-  ////////////////////////////////////////////////////////////////////////////
-  ////////////////////////////////////////////////////////////////////////////
-  ////////////////////////////////////////////////////////////////////////////
-
-  /**
-   * @brief Realization-specific method called to check availability of the limit
-   */
-  virtual bool
-  IsBelowLimit() = 0;
-
-  /**
-   * @brief "Borrow" limit
-   *
-   * IsBelowLimit **must** be true, otherwise assert fail
-   */
-  virtual void
-  BorrowLimit() = 0;
-
-  /**
-   * @brief "Return" limit
-   */
-  virtual void
-  ReturnLimit() = 0;
-
-  /**
-   * @brief Set link delay (in seconds)
-   *
-   * This is a supplementary information that may or may not be useful for limits
-   */
-  virtual void
-  SetLinkDelay(double delay)
-  {
-    m_linkDelay = delay;
-  }
-
-  /**
-   * @brief Get link delay (in seconds)
-   */
-  virtual double
-  GetLinkDelay() const
-  {
-    return m_linkDelay;
-  }
-
-  ////////////////////////////////////////////////////////////////////////////
-  ////////////////////////////////////////////////////////////////////////////
-  ////////////////////////////////////////////////////////////////////////////
-
-  /**
-   * @brief Set callback which will be called when exhausted limit gets a new slot
-   */
-  void
-  RegisterAvailableSlotCallback(CallbackHandler handler);
-
-protected:
-  void
-  FireAvailableSlotCallback();
-
-private:
-  double m_maxRate;
-  double m_maxDelay;
-
-  CallbackHandler m_handler;
-
-  double m_linkDelay;
-};
-
-} // namespace ndn
-} // namespace ns3
-
-#endif // _NDN_LIMITS_H_
diff --git a/utils/tracers/ndn-l3-aggregate-tracer.cpp b/utils/tracers/ndn-l3-aggregate-tracer.cpp
index 708640b..5f0dca6 100644
--- a/utils/tracers/ndn-l3-aggregate-tracer.cpp
+++ b/utils/tracers/ndn-l3-aggregate-tracer.cpp
@@ -24,9 +24,8 @@
 #include "ns3/packet.h"
 #include "ns3/config.h"
 #include "ns3/callback.h"
-#include "ns3/ndn-app.hpp"
-#include "ns3/ndn-face.hpp"
-#include "ns3/ndn-pit-entry.hpp"
+#include "apps/ndn-app.hpp"
+#include "model/ndn-face.hpp"
 
 #include "ns3/simulator.h"
 #include "ns3/node-list.h"
@@ -233,7 +232,7 @@
 void
 L3AggregateTracer::Reset()
 {
-  for (std::map<Ptr<const Face>, boost::tuple<Stats, Stats>>::iterator stats = m_stats.begin();
+  for (std::map<shared_ptr<const Face>, boost::tuple<Stats, Stats>>::iterator stats = m_stats.begin();
        stats != m_stats.end(); stats++) {
     stats->second.get<0>().Reset();
     stats->second.get<1>().Reset();
@@ -257,7 +256,7 @@
 {
   Time time = Simulator::Now();
 
-  for (std::map<Ptr<const Face>, boost::tuple<Stats, Stats>>::iterator stats = m_stats.begin();
+  for (std::map<shared_ptr<const Face>, boost::tuple<Stats, Stats>>::iterator stats = m_stats.begin();
        stats != m_stats.end(); stats++) {
     if (!stats->first)
       continue;
@@ -276,8 +275,8 @@
   }
 
   {
-    std::map<Ptr<const Face>, boost::tuple<Stats, Stats>>::iterator stats =
-      m_stats.find(Ptr<const Face>(0));
+    std::map<shared_ptr<const Face>, boost::tuple<Stats, Stats>>::iterator stats =
+      m_stats.find(shared_ptr<const Face>(0));
     if (stats != m_stats.end()) {
       PRINTER("SatisfiedInterests", m_satisfiedInterests);
       PRINTER("TimedOutInterests", m_timedOutInterests);
@@ -286,7 +285,7 @@
 }
 
 void
-L3AggregateTracer::OutInterests(shared_ptr<const Interest> interest, Ptr<const Face> face)
+L3AggregateTracer::OutInterests(shared_ptr<const Interest> interest, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_outInterests++;
   if (interest->GetWire()) {
@@ -295,7 +294,7 @@
 }
 
 void
-L3AggregateTracer::InInterests(shared_ptr<const Interest> interest, Ptr<const Face> face)
+L3AggregateTracer::InInterests(shared_ptr<const Interest> interest, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_inInterests++;
   if (interest->GetWire()) {
@@ -304,7 +303,7 @@
 }
 
 void
-L3AggregateTracer::DropInterests(shared_ptr<const Interest> interest, Ptr<const Face> face)
+L3AggregateTracer::DropInterests(shared_ptr<const Interest> interest, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_dropInterests++;
   if (interest->GetWire()) {
@@ -313,7 +312,7 @@
 }
 
 void
-L3AggregateTracer::OutNacks(shared_ptr<const Interest> nack, Ptr<const Face> face)
+L3AggregateTracer::OutNacks(shared_ptr<const Interest> nack, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_outNacks++;
   if (nack->GetWire()) {
@@ -322,7 +321,7 @@
 }
 
 void
-L3AggregateTracer::InNacks(shared_ptr<const Interest> nack, Ptr<const Face> face)
+L3AggregateTracer::InNacks(shared_ptr<const Interest> nack, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_inNacks++;
   if (nack->GetWire()) {
@@ -331,7 +330,7 @@
 }
 
 void
-L3AggregateTracer::DropNacks(shared_ptr<const Interest> nack, Ptr<const Face> face)
+L3AggregateTracer::DropNacks(shared_ptr<const Interest> nack, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_dropNacks++;
   if (nack->GetWire()) {
@@ -340,7 +339,7 @@
 }
 
 void
-L3AggregateTracer::OutData(shared_ptr<const Data> data, bool fromCache, Ptr<const Face> face)
+L3AggregateTracer::OutData(shared_ptr<const Data> data, bool fromCache, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_outData++;
   if (data->GetWire()) {
@@ -349,7 +348,7 @@
 }
 
 void
-L3AggregateTracer::InData(shared_ptr<const Data> data, Ptr<const Face> face)
+L3AggregateTracer::InData(shared_ptr<const Data> data, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_inData++;
   if (data->GetWire()) {
@@ -358,7 +357,7 @@
 }
 
 void
-L3AggregateTracer::DropData(shared_ptr<const Data> data, Ptr<const Face> face)
+L3AggregateTracer::DropData(shared_ptr<const Data> data, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_dropData++;
   if (data->GetWire()) {
diff --git a/utils/tracers/ndn-l3-aggregate-tracer.hpp b/utils/tracers/ndn-l3-aggregate-tracer.hpp
index aa5d82f..35bf917 100644
--- a/utils/tracers/ndn-l3-aggregate-tracer.hpp
+++ b/utils/tracers/ndn-l3-aggregate-tracer.hpp
@@ -143,31 +143,31 @@
   Print(std::ostream& os) const;
 
   virtual void
-  OutInterests(shared_ptr<const Interest>, Ptr<const Face>);
+  OutInterests(shared_ptr<const Interest>, shared_ptr<const Face>);
 
   virtual void
-  InInterests(shared_ptr<const Interest>, Ptr<const Face>);
+  InInterests(shared_ptr<const Interest>, shared_ptr<const Face>);
 
   virtual void
-  DropInterests(shared_ptr<const Interest>, Ptr<const Face>);
+  DropInterests(shared_ptr<const Interest>, shared_ptr<const Face>);
 
   virtual void
-  OutNacks(shared_ptr<const Interest>, Ptr<const Face>);
+  OutNacks(shared_ptr<const Interest>, shared_ptr<const Face>);
 
   virtual void
-  InNacks(shared_ptr<const Interest>, Ptr<const Face>);
+  InNacks(shared_ptr<const Interest>, shared_ptr<const Face>);
 
   virtual void
-  DropNacks(shared_ptr<const Interest>, Ptr<const Face>);
+  DropNacks(shared_ptr<const Interest>, shared_ptr<const Face>);
 
   virtual void
-  OutData(shared_ptr<const Data>, bool fromCache, Ptr<const Face>);
+  OutData(shared_ptr<const Data>, bool fromCache, shared_ptr<const Face>);
 
   virtual void
-  InData(shared_ptr<const Data>, Ptr<const Face>);
+  InData(shared_ptr<const Data>, shared_ptr<const Face>);
 
   virtual void
-  DropData(shared_ptr<const Data>, Ptr<const Face>);
+  DropData(shared_ptr<const Data>, shared_ptr<const Face>);
 
   virtual void
   SatisfiedInterests(Ptr<const pit::Entry>);
@@ -191,7 +191,7 @@
   Time m_period;
   EventId m_printEvent;
 
-  mutable std::map<Ptr<const Face>, boost::tuple<Stats, Stats>> m_stats;
+  mutable std::map<shared_ptr<const Face>, boost::tuple<Stats, Stats>> m_stats;
 };
 
 } // namespace ndn
diff --git a/utils/tracers/ndn-l3-rate-tracer.cpp b/utils/tracers/ndn-l3-rate-tracer.cpp
index 6bba93b..1b91c46 100644
--- a/utils/tracers/ndn-l3-rate-tracer.cpp
+++ b/utils/tracers/ndn-l3-rate-tracer.cpp
@@ -240,7 +240,7 @@
 void
 L3RateTracer::Reset()
 {
-  for (std::map<Ptr<const Face>, boost::tuple<Stats, Stats, Stats, Stats>>::iterator stats =
+  for (std::map<shared_ptr<const Face>, boost::tuple<Stats, Stats, Stats, Stats>>::iterator stats =
          m_stats.begin();
        stats != m_stats.end(); stats++) {
     stats->second.get<0>().Reset();
@@ -274,7 +274,7 @@
 {
   Time time = Simulator::Now();
 
-  for (std::map<Ptr<const Face>, boost::tuple<Stats, Stats, Stats, Stats>>::iterator stats =
+  for (std::map<shared_ptr<const Face>, boost::tuple<Stats, Stats, Stats, Stats>>::iterator stats =
          m_stats.begin();
        stats != m_stats.end(); stats++) {
     if (!stats->first)
@@ -300,8 +300,8 @@
   }
 
   {
-    std::map<Ptr<const Face>, boost::tuple<Stats, Stats, Stats, Stats>>::iterator stats =
-      m_stats.find(Ptr<const Face>(0));
+    std::map<shared_ptr<const Face>, boost::tuple<Stats, Stats, Stats, Stats>>::iterator stats =
+      m_stats.find(shared_ptr<const Face>(0));
     if (stats != m_stats.end()) {
       PRINTER("SatisfiedInterests", m_satisfiedInterests);
       PRINTER("TimedOutInterests", m_timedOutInterests);
@@ -310,7 +310,7 @@
 }
 
 void
-L3RateTracer::OutInterests(shared_ptr<const Interest> interest, Ptr<const Face> face)
+L3RateTracer::OutInterests(shared_ptr<const Interest> interest, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_outInterests++;
   if (interest->GetWire()) {
@@ -319,7 +319,7 @@
 }
 
 void
-L3RateTracer::InInterests(shared_ptr<const Interest> interest, Ptr<const Face> face)
+L3RateTracer::InInterests(shared_ptr<const Interest> interest, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_inInterests++;
   if (interest->GetWire()) {
@@ -328,7 +328,7 @@
 }
 
 void
-L3RateTracer::DropInterests(shared_ptr<const Interest> interest, Ptr<const Face> face)
+L3RateTracer::DropInterests(shared_ptr<const Interest> interest, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_dropInterests++;
   if (interest->GetWire()) {
@@ -337,7 +337,7 @@
 }
 
 void
-L3RateTracer::OutNacks(shared_ptr<const Interest> interest, Ptr<const Face> face)
+L3RateTracer::OutNacks(shared_ptr<const Interest> interest, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_outNacks++;
   if (interest->GetWire()) {
@@ -346,7 +346,7 @@
 }
 
 void
-L3RateTracer::InNacks(shared_ptr<const Interest> interest, Ptr<const Face> face)
+L3RateTracer::InNacks(shared_ptr<const Interest> interest, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_inNacks++;
   if (interest->GetWire()) {
@@ -355,7 +355,7 @@
 }
 
 void
-L3RateTracer::DropNacks(shared_ptr<const Interest> interest, Ptr<const Face> face)
+L3RateTracer::DropNacks(shared_ptr<const Interest> interest, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_dropNacks++;
   if (interest->GetWire()) {
@@ -364,7 +364,7 @@
 }
 
 void
-L3RateTracer::OutData(shared_ptr<const Data> data, bool fromCache, Ptr<const Face> face)
+L3RateTracer::OutData(shared_ptr<const Data> data, bool fromCache, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_outData++;
   if (data->GetWire()) {
@@ -373,7 +373,7 @@
 }
 
 void
-L3RateTracer::InData(shared_ptr<const Data> data, Ptr<const Face> face)
+L3RateTracer::InData(shared_ptr<const Data> data, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_inData++;
   if (data->GetWire()) {
@@ -382,7 +382,7 @@
 }
 
 void
-L3RateTracer::DropData(shared_ptr<const Data> data, Ptr<const Face> face)
+L3RateTracer::DropData(shared_ptr<const Data> data, shared_ptr<const Face> face)
 {
   m_stats[face].get<0>().m_dropData++;
   if (data->GetWire()) {
diff --git a/utils/tracers/ndn-l3-rate-tracer.hpp b/utils/tracers/ndn-l3-rate-tracer.hpp
index 41adf26..1dc8118 100644
--- a/utils/tracers/ndn-l3-rate-tracer.hpp
+++ b/utils/tracers/ndn-l3-rate-tracer.hpp
@@ -130,31 +130,31 @@
 protected:
   // from L3Tracer
   virtual void
-  OutInterests(shared_ptr<const Interest>, Ptr<const Face>);
+  OutInterests(shared_ptr<const Interest>, shared_ptr<const Face>);
 
   virtual void
-  InInterests(shared_ptr<const Interest>, Ptr<const Face>);
+  InInterests(shared_ptr<const Interest>, shared_ptr<const Face>);
 
   virtual void
-  DropInterests(shared_ptr<const Interest>, Ptr<const Face>);
+  DropInterests(shared_ptr<const Interest>, shared_ptr<const Face>);
 
   virtual void
-  OutNacks(shared_ptr<const Interest>, Ptr<const Face>);
+  OutNacks(shared_ptr<const Interest>, shared_ptr<const Face>);
 
   virtual void
-  InNacks(shared_ptr<const Interest>, Ptr<const Face>);
+  InNacks(shared_ptr<const Interest>, shared_ptr<const Face>);
 
   virtual void
-  DropNacks(shared_ptr<const Interest>, Ptr<const Face>);
+  DropNacks(shared_ptr<const Interest>, shared_ptr<const Face>);
 
   virtual void
-  OutData(shared_ptr<const Data>, bool fromCache, Ptr<const Face>);
+  OutData(shared_ptr<const Data>, bool fromCache, shared_ptr<const Face>);
 
   virtual void
-  InData(shared_ptr<const Data>, Ptr<const Face>);
+  InData(shared_ptr<const Data>, shared_ptr<const Face>);
 
   virtual void
-  DropData(shared_ptr<const Data>, Ptr<const Face>);
+  DropData(shared_ptr<const Data>, shared_ptr<const Face>);
 
   virtual void
   SatisfiedInterests(Ptr<const pit::Entry>);
@@ -177,7 +177,7 @@
   Time m_period;
   EventId m_printEvent;
 
-  mutable std::map<Ptr<const Face>, boost::tuple<Stats, Stats, Stats, Stats>> m_stats;
+  mutable std::map<shared_ptr<const Face>, boost::tuple<Stats, Stats, Stats, Stats>> m_stats;
 };
 
 } // namespace ndn
diff --git a/utils/tracers/ndn-l3-tracer.hpp b/utils/tracers/ndn-l3-tracer.hpp
index f916bd4..4b2cc5a 100644
--- a/utils/tracers/ndn-l3-tracer.hpp
+++ b/utils/tracers/ndn-l3-tracer.hpp
@@ -88,31 +88,16 @@
   Connect();
 
   virtual void
-  OutInterests(shared_ptr<const Interest>, Ptr<const Face>) = 0;
+  OutInterests(shared_ptr<const Interest>, shared_ptr<const Face>) = 0;
 
   virtual void
-  InInterests(shared_ptr<const Interest>, Ptr<const Face>) = 0;
+  InInterests(shared_ptr<const Interest>, shared_ptr<const Face>) = 0;
 
   virtual void
-  DropInterests(shared_ptr<const Interest>, Ptr<const Face>) = 0;
+  OutData(shared_ptr<const Data>, bool fromCache, shared_ptr<const Face>) = 0;
 
   virtual void
-  OutNacks(shared_ptr<const Interest>, Ptr<const Face>) = 0;
-
-  virtual void
-  InNacks(shared_ptr<const Interest>, Ptr<const Face>) = 0;
-
-  virtual void
-  DropNacks(shared_ptr<const Interest>, Ptr<const Face>) = 0;
-
-  virtual void
-  OutData(shared_ptr<const Data>, bool fromCache, Ptr<const Face>) = 0;
-
-  virtual void
-  InData(shared_ptr<const Data>, Ptr<const Face>) = 0;
-
-  virtual void
-  DropData(shared_ptr<const Data>, Ptr<const Face>) = 0;
+  InData(shared_ptr<const Data>, shared_ptr<const Face>) = 0;
 
   virtual void
   SatisfiedInterests(Ptr<const pit::Entry>) = 0;
@@ -130,13 +115,8 @@
     {
       m_inInterests = 0;
       m_outInterests = 0;
-      m_dropInterests = 0;
-      m_inNacks = 0;
-      m_outNacks = 0;
-      m_dropNacks = 0;
       m_inData = 0;
       m_outData = 0;
-      m_dropData = 0;
       m_satisfiedInterests = 0;
       m_timedOutInterests = 0;
 
@@ -146,13 +126,8 @@
 
     double m_inInterests;
     double m_outInterests;
-    double m_dropInterests;
-    double m_inNacks;
-    double m_outNacks;
-    double m_dropNacks;
     double m_inData;
     double m_outData;
-    double m_dropData;
     double m_satisfiedInterests;
     double m_timedOutInterests;
     double m_outSatisfiedInterests;
