model: Removing more legacy code and make code to compile
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;