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()) {
