Additional cleaning. Repairing tests.
diff --git a/model/fw/fw-stats.cc b/model/fw/fw-stats.cc
deleted file mode 100644
index e7be6bb..0000000
--- a/model/fw/fw-stats.cc
+++ /dev/null
@@ -1,248 +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>
- *         Ilya Moiseenko <iliamo@cs.ucla.edu>
- */
-
-#include "fw-stats.h"
-
-#include "ns3/ndn-interest-header.h"
-#include "ns3/ndn-content-object-header.h"
-#include "ns3/ndn-pit.h"
-#include "ns3/ndn-pit-entry.h"
-
-#include "ns3/assert.h"
-#include "ns3/log.h"
-#include "ns3/simulator.h"
-
-
-#include <boost/foreach.hpp>
-#include <boost/lambda/lambda.hpp>
-#include <boost/lambda/bind.hpp>
-namespace ll = boost::lambda;
-
-NS_LOG_COMPONENT_DEFINE ("ndn.fw.Stats");
-
-namespace ns3 {
-namespace ndn {
-
-using namespace ndnSIM;
-
-namespace fw {
-
-NS_OBJECT_ENSURE_REGISTERED (FwStats);
-  
-TypeId
-FwStats::GetTypeId (void)
-{
-  static TypeId tid = TypeId ("ns3::ndn::fw::Stats")
-    .SetGroupName ("Ndn")
-    .SetParent <super> ()
-    .AddConstructor <FwStats> ()
-
-    .AddTraceSource ("Stats", "Fired every time stats tree is updated",
-                     MakeTraceSourceAccessor (&FwStats::m_statsTrace))
-    ;
-  return tid;
-}
-    
-FwStats::FwStats ()
-{
-}
-
-void
-FwStats::DoDispose ()
-{
-  BestRoute::DoDispose ();
-  m_statsRefreshEvent.Cancel ();
-}
-
-void
-FwStats::OnInterest (Ptr<Face> face,
-                     Ptr<const InterestHeader> header,
-                     Ptr<const Packet> origPacket)
-{
-  super::OnInterest (face, header, origPacket);
-  
-  m_stats.Rx (header->GetName ().cut (1), face, origPacket->GetSize ());
-
-  ScheduleRefreshingIfNecessary ();
-}
-
-void
-FwStats::OnData (Ptr<Face> face,
-                 Ptr<const ContentObjectHeader> header,
-                 Ptr<Packet> payload,
-                 Ptr<const Packet> origPacket)
-{
-  super::OnData (face, header, payload, origPacket);
-  
-  m_stats.Rx (header->GetName ().cut (1), face, origPacket->GetSize ());
-
-  ScheduleRefreshingIfNecessary ();
-}
-
-
-void
-FwStats::FailedToCreatePitEntry (Ptr<Face> inFace,
-                                 Ptr<const InterestHeader> header,
-                                 Ptr<const Packet> origPacket)
-{
-  super::FailedToCreatePitEntry (inFace, header, origPacket);
-
-  // Kind of cheating... But at least this way we will have some statistics
-  m_stats.NewPitEntry (header->GetName ().cut (1));
-  m_stats.Incoming (header->GetName ().cut (1), inFace);
-  m_stats.Timeout (header->GetName ().cut (1));
-
-  ScheduleRefreshingIfNecessary ();
-}
-
-void
-FwStats::DidCreatePitEntry (Ptr<Face> inFace,
-                            Ptr<const InterestHeader> header,
-                            Ptr<const Packet> origPacket,
-                            Ptr<pit::Entry> pitEntry)
-{
-  super::DidCreatePitEntry (inFace, header, origPacket, pitEntry);
-  
-  m_stats.NewPitEntry (header->GetName ().cut (1));
-  m_stats.Incoming (header->GetName ().cut (1), inFace);
-  
-  ScheduleRefreshingIfNecessary ();
-}
-
-void
-FwStats::WillSatisfyPendingInterest (Ptr<Face> inFace,
-                                     Ptr<pit::Entry> pitEntry)
-{
-  super::WillSatisfyPendingInterest (inFace, pitEntry);
-  
-  m_stats.Satisfy (pitEntry->GetPrefix ().cut (1));
-  
-  ScheduleRefreshingIfNecessary ();
-}
-
-void
-FwStats::DidSendOutInterest (Ptr<Face> outFace,
-                             Ptr<const InterestHeader> header,
-                             Ptr<const Packet> origPacket,
-                             Ptr<pit::Entry> pitEntry)
-{
-  super::DidSendOutInterest (outFace, header, origPacket, pitEntry);
-
-  m_stats.Outgoing (header->GetName ().cut (1), outFace);
-  m_stats.Tx (header->GetName ().cut (1), outFace, origPacket->GetSize ());
-  
-  ScheduleRefreshingIfNecessary ();
-}
-
-void
-FwStats::DidSendOutData (Ptr<Face> outFace,
-                         Ptr<const ContentObjectHeader> header,
-                         Ptr<const Packet> payload,
-                         Ptr<const Packet> origPacket,
-                         Ptr<pit::Entry> pitEntry)
-{
-  super::DidSendOutData (outFace, header, payload, origPacket, pitEntry);
-
-  m_stats.Tx (header->GetName ().cut (1), outFace, origPacket->GetSize ());
-  
-  ScheduleRefreshingIfNecessary ();
-}
-
-
-void
-FwStats::WillEraseTimedOutPendingInterest (Ptr<pit::Entry> pitEntry)
-{
-  super::WillEraseTimedOutPendingInterest (pitEntry);
-
-  m_stats.Timeout (pitEntry->GetPrefix ().cut (1));
-  
-  ScheduleRefreshingIfNecessary ();
-}
-
-void
-FwStats::DidExhaustForwardingOptions (Ptr<Face> inFace,
-                                      Ptr<const InterestHeader> header,
-                                      Ptr<const Packet> origPacket,
-                                      Ptr<pit::Entry> pitEntry)
-{
-  super::DidExhaustForwardingOptions (inFace, header, origPacket, pitEntry);
-  
-  if (pitEntry->GetOutgoing ().size () == 0)
-    {
-      m_stats.Timeout (pitEntry->GetPrefix ().cut (1));
-  
-      ScheduleRefreshingIfNecessary ();
-    }
-}
-
-void
-FwStats::ScheduleRefreshingIfNecessary ()
-{
-  if (m_statsRefreshEvent.IsRunning ()) return;
-  m_statsRefreshEvent = Simulator::Schedule (Seconds (1.0), &FwStats::RefreshStats, this);
-}
-
-void
-FwStats::RefreshStats ()
-{
-  m_stats.Step ();
-  m_statsTrace (this, m_stats);
-  
-  NS_LOG_DEBUG (m_stats["/"]);
-
-  if (!m_stats["/"].IsZero ())
-    {
-      m_statsRefreshEvent = Simulator::Schedule (Seconds (1.0), &FwStats::RefreshStats, this);
-    }
-}
-
-void
-FwStats::RemoveFace (Ptr<Face> face)
-{
-  m_stats.RemoveFace (face);
-
-  super::RemoveFace (face);
-}
-
-void
-FwStats::DidReceiveValidNack (Ptr<Face> inFace,
-                              uint32_t nackCode,
-                              Ptr<pit::Entry> pitEntry)
-{
-  // m_stats.Satisfy (pitEntry->GetPrefix ().cut (1));
-  m_stats.RemoveFromStats (pitEntry->GetPrefix ().cut (1));
-  ScheduleRefreshingIfNecessary ();
-  
-  // m_stats.UndoNewPitEntry (header->GetName ().cut (1));
-  // m_stats.UndoOutgoing (header->GetName ().cut (1), inFace);
-
-  // for (pit::Enty::in_container::iterator item = pitEntry->GetIncoming ().begin ();
-  //      item != pitEntry->GetIncoming ().end ();
-  //      item ++)
-  //   {
-  //     m_stats.UndoIncoming (header->GetName ().cut (1), item->m_face);
-  //   }
-}
-
-
-} // namespace fw
-} // namespace ndn
-} // namespace ns3
diff --git a/model/fw/fw-stats.h b/model/fw/fw-stats.h
deleted file mode 100644
index 6ad7ff0..0000000
--- a/model/fw/fw-stats.h
+++ /dev/null
@@ -1,142 +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 NDNSIM_FW_STATS_H
-#define NDNSIM_FW_STATS_H
-
-#include "ns3/event-id.h"
-
-#include "best-route.h"
-#include "../../utils/stats/stats-tree.h"
-
-namespace ns3 {
-namespace ndn {
-namespace fw {
-
-/**
- * \ingroup ndn
- * \brief Strategy based on best route and adding statistics gathering capabilities
- */
-class FwStats :
-    public BestRoute
-{
-public:
-  static TypeId
-  GetTypeId ();
-
-  /**
-   * @brief Default constructor
-   */
-  FwStats ();
-
-  inline
-  const ndnSIM::StatsTree &
-  GetStatsTree () const;  
-
-  virtual void
-  OnInterest (Ptr<Face> face,
-              Ptr<const InterestHeader> header,
-              Ptr<const Packet> origPacket);
-
-  virtual void
-  OnData (Ptr<Face> face,
-          Ptr<const ContentObjectHeader> header,
-          Ptr<Packet> payload,
-          Ptr<const Packet> origPacket);
-
-  virtual void
-  RemoveFace (Ptr<Face> face);
-
-protected:
-  virtual void
-  DidCreatePitEntry (Ptr<Face> inFace,
-                     Ptr<const InterestHeader> header,
-                     Ptr<const Packet> packet,
-                     Ptr<pit::Entry> pitEntry);
-
-  virtual void
-  FailedToCreatePitEntry (Ptr<Face> inFace,
-                          Ptr<const InterestHeader> header,
-                          Ptr<const Packet> packet);
-
-  virtual void
-  WillSatisfyPendingInterest (Ptr<Face> inFace,
-                              Ptr<pit::Entry> pitEntry);
-
-  virtual void
-  DidSendOutInterest (Ptr<Face> outFace,
-                      Ptr<const InterestHeader> header,
-                      Ptr<const Packet> origPacket,
-                      Ptr<pit::Entry> pitEntry);
-
-  virtual void
-  DidSendOutData (Ptr<Face> outFace,
-                  Ptr<const ContentObjectHeader> header,
-                  Ptr<const Packet> payload,
-                  Ptr<const Packet> origPacket,
-                  Ptr<pit::Entry> pitEntry);
-
-  virtual void
-  WillEraseTimedOutPendingInterest (Ptr<pit::Entry> pitEntry);
-
-  virtual void
-  DidExhaustForwardingOptions (Ptr<Face> inFace,
-                               Ptr<const InterestHeader> header,
-                               Ptr<const Packet> origPacket,
-                               Ptr<pit::Entry> pitEntry);
-
-  virtual void
-  DidReceiveValidNack (Ptr<Face> inFace,
-                       uint32_t nackCode,
-                       Ptr<pit::Entry> pitEntry);
-  
-  // from Object
-  void
-  DoDispose ();
-  
-private:
-  void
-  RefreshStats ();
-
-  void
-  ScheduleRefreshingIfNecessary ();
-  
-private:
-  ndnSIM::StatsTree m_stats;
-  EventId m_statsRefreshEvent;
-
-  TracedCallback< Ptr<ForwardingStrategy>,
-                  const ndnSIM::StatsTree & > m_statsTrace;
-  
-  typedef BestRoute super;
-};
-
-const ndnSIM::StatsTree &
-FwStats::GetStatsTree () const
-{
-  return m_stats;
-}
-
-} // namespace fw
-} // namespace ndn
-} // namespace ns3
-
-#endif // NDNSIM_FW_STATS_H
diff --git a/test/fw-per-fib-limits.cc b/test/fw-per-fib-limits.cc
deleted file mode 100644
index 555aca6..0000000
--- a/test/fw-per-fib-limits.cc
+++ /dev/null
@@ -1,166 +0,0 @@
-/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2011,2012 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 "fw-per-fib-limits.h"
-#include "ns3/core-module.h"
-#include "ns3/ndnSIM-module.h"
-#include "ns3/point-to-point-module.h"
-
-#include <boost/lexical_cast.hpp>
-
-NS_LOG_COMPONENT_DEFINE ("ndn.test.fw.PerFibLimits");
-
-namespace ns3 {
-namespace ndn {
-
-void Decay (Ptr<fib::Entry> entry)
-{
-  entry->GetLimits ().DecayCurrentLimit ();
-}
-
-
-template<class T>
-void
-PrintTracedValue (std::string context, T oldValue, T newValue)
-{
-  NS_LOG_DEBUG (context << ": " <<
-                oldValue << " => " << newValue);
-}
-
-void
-Test1 (Ptr<fib::Entry> entry)
-{
-  entry->GetLimits ().IsBelowLimit ();
-  entry->GetLimits ().DecreaseLimit ();
-}
-
-void
-Test2 (Ptr<fib::Entry> entry)
-{
-  entry->GetLimits ().RemoveOutstanding ();
-  for (uint32_t i = 0; i < 40; i++)
-    entry->GetLimits ().IncreaseLimit ();
-}
-
-void
-FwPerFibLimits::CheckCurMaxLimit (Ptr<fib::Entry> entry, double amount)
-{
-  NS_TEST_ASSERT_MSG_EQ_TOL ((double)entry->GetLimits ().m_curMaxLimit, amount, 0.1, "");
-}
-
-void
-FwPerFibLimits::CheckOutstanding (Ptr<fib::Entry> entry, uint32_t amount)
-{
-  NS_TEST_ASSERT_MSG_EQ ((double)entry->GetLimits ().m_outstanding, amount, "");
-}
-
-// void 
-// FwPerFibLimits::Check2 (Ptr<fib::Entry> entry)
-// {
-//   NS_TEST_ASSERT_MSG_EQ ((double)entry->GetLimits ().m_outstanding, 0, "");
-// }
-
-void
-FwPerFibLimits::DoRun ()
-{
-  Simulator::Destroy ();
-
-  NodeContainer nodes;
-  nodes.Create (2);
-
-  PointToPointHelper p2pHelper;
-  p2pHelper.Install (nodes);
-  
-  StackHelper ndn;
-  ndn.SetForwardingStrategy ("ns3::ndn::fw::PerFibLimits");
-  ndn.Install (nodes);
-
-  Ptr<Fib> fib = nodes.Get (0)->GetObject<Fib> ();
-  ndn.AddRoute (nodes.Get (0), "/bla", 0, 10);
-
-  Ptr<fib::Entry> entry = fib->Begin ();
-  
-  bool ok = entry->GetLimits ().TraceConnect ("CurMaxLimit", "fibEntry.curMax", MakeCallback (PrintTracedValue<double>));
-  NS_TEST_ASSERT_MSG_EQ (ok, true, "");
-
-  ok = entry->GetLimits ().TraceConnect ("Outstanding", "fibEntry.out", MakeCallback (PrintTracedValue<uint32_t>));
-  NS_TEST_ASSERT_MSG_EQ (ok, true, "");
-
-  ok = nodes.Get (0)->GetObject<L3Protocol> ()->GetFace (0)->GetLimits ().TraceConnect ("CurMaxLimit", "face.curMax", MakeCallback (PrintTracedValue<double>));
-  NS_TEST_ASSERT_MSG_EQ (ok, true, "");
-  nodes.Get (0)->GetObject<L3Protocol> ()->GetFace (0)->GetLimits ().TraceDisconnect ("CurMaxLimit", "face.curMax", MakeCallback (PrintTracedValue<double>));
-
-  ok = nodes.Get (0)->GetObject<L3Protocol> ()->GetFace (0)->GetLimits ().TraceConnect ("Outstanding", "face.out",    MakeCallback (PrintTracedValue<uint32_t>));
-  NS_TEST_ASSERT_MSG_EQ (ok, true, "");
-  nodes.Get (0)->GetObject<L3Protocol> ()->GetFace (0)->GetLimits ().TraceDisconnect ("Outstanding", "face.out",    MakeCallback (PrintTracedValue<uint32_t>));
-
-  Config::Connect ("/NodeList/0/$ns3::ndn::L3Protocol/FaceList/*/Limits/CurMaxLimit", MakeCallback (PrintTracedValue<double>));
-  Config::Connect ("/NodeList/0/$ns3::ndn::L3Protocol/FaceList/*/Limits/Outstanding", MakeCallback (PrintTracedValue<uint32_t>));
-
-  nodes.Get (0)->GetObject<L3Protocol> ()->GetFace (0)->GetLimits ().SetMaxLimit (100);
-  
-  entry->GetLimits ().SetMaxLimit (100);
-  NS_TEST_ASSERT_MSG_EQ_TOL ((double)entry->GetLimits ().m_curMaxLimit, 100, 0.1, "");
-  
-  entry->GetLimits ().DecreaseLimit ();
-  NS_TEST_ASSERT_MSG_EQ_TOL ((double)entry->GetLimits ().m_curMaxLimit, 50, 0.1, "");
-
-  entry = fib->Begin ();
-
-  NS_LOG_DEBUG (entry);
-  Simulator::Schedule (Seconds (0.1), Decay, entry);
-  Simulator::Schedule (Seconds (25.0), Decay, entry);
-  Simulator::Schedule (Seconds (28.0), Decay, entry);
-  Simulator::Schedule (Seconds (40.0), Decay, entry);
-  Simulator::Schedule (Seconds (60.0), Decay, entry);
-  Simulator::Schedule (Seconds (100.0), Decay, entry);
-
-  Simulator::Schedule (Seconds (100.1), &FwPerFibLimits::CheckCurMaxLimit, this, entry, 81.5);
-
-  Simulator::Schedule (Seconds (100.5), &FwPerFibLimits::CheckOutstanding, this, entry, 0);
-  Simulator::Schedule (Seconds (101.0), Test1, entry);
-  Simulator::Schedule (Seconds (101.5), &FwPerFibLimits::CheckOutstanding, this, entry, 1);
-  Simulator::Schedule (Seconds (101.5), &FwPerFibLimits::CheckCurMaxLimit, this, entry, 40.75);
-
-  Simulator::Schedule (Seconds (102.0), Test2, entry);
-  Simulator::Schedule (Seconds (102.5), &FwPerFibLimits::CheckOutstanding, this, entry, 0);
-  Simulator::Schedule (Seconds (102.5), &FwPerFibLimits::CheckCurMaxLimit, this, entry, 41.75);
-
-  AppHelper consumer ("ns3::ndn::ConsumerBatches");
-  consumer.SetPrefix ("/bla");
-  consumer.SetAttribute ("Batches", StringValue ("105 1"));
-  consumer.SetAttribute ("LifeTime", StringValue ("1s"));
-  consumer.Install (nodes.Get (0))
-    .Stop (Seconds (110.0));
-
-  Simulator::Schedule (Seconds (105.1), &FwPerFibLimits::CheckOutstanding, this, entry, 1);
-  Simulator::Schedule (Seconds (106.7), &FwPerFibLimits::CheckOutstanding, this, entry, 0);
-
-  Simulator::Schedule (Seconds (109.0), &FwPerFibLimits::CheckCurMaxLimit, this, entry, 14.27);
-  Simulator::Schedule (Seconds (119.9), &FwPerFibLimits::CheckCurMaxLimit, this, entry, 16.32);
-  
-  Simulator::Stop (Seconds (120.0));
-  Simulator::Run ();
- 
-  Simulator::Destroy ();
-}
-
-} // namespace ndn
-} // namespace ns3
diff --git a/test/fw-per-fib-limits.h b/test/fw-per-fib-limits.h
deleted file mode 100644
index 51bd0c4..0000000
--- a/test/fw-per-fib-limits.h
+++ /dev/null
@@ -1,52 +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 NDNSIM_TEST_FW_PER_FIB_LIMITS_H
-#define NDNSIM_TEST_FW_PER_FIB_LIMITS_H
-
-#include "ns3/test.h"
-#include "ns3/ptr.h"
-
-namespace ns3 {
-namespace ndn {
-
-class Fib;
-namespace fib { class Entry; }
-  
-class FwPerFibLimits : public TestCase
-{
-public:
-  FwPerFibLimits ()
-    : TestCase ("Test for ndn::fw::PerFibLimits")
-  {
-  }
-    
-private:
-  virtual void DoRun ();
-
-  void CheckCurMaxLimit (Ptr<fib::Entry> entry, double amount);
-  void CheckOutstanding (Ptr<fib::Entry> entry, uint32_t amount);
-  // void Check2 (Ptr<fib::Entry> entry);
-};
-  
-} // namespace ndn
-} // namespace ns3
-
-#endif // NDNSIM_TEST_FW_PER_FIB_LIMITS_H
diff --git a/test/generic-tests.cc b/test/generic-tests.cc
deleted file mode 100644
index 6fdc1a7..0000000
--- a/test/generic-tests.cc
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2011,2012 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 "generic-tests.h"
-#include "ns3/core-module.h"
-#include "ns3/ndnSIM-module.h"
-#include "ns3/point-to-point-module.h"
-
-#include "../model/pit/ndn-pit-impl.h"
-#include "../utils/trie/persistent-policy.h"
-#include "../apps/ndn-producer.h"
-
-#include <boost/lexical_cast.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/make_shared.hpp>
-
-using namespace std;
-using namespace boost;
-
-NS_LOG_COMPONENT_DEFINE ("ndn.test.Generic");
-
-namespace ns3 {
-namespace ndn {
-
-struct Bla {
-};
-
-void
-GenericTests::DoRun ()
-{
-  NodeContainer nodes;
-  nodes.Create (2);
-
-  PointToPointHelper p2p;
-  p2p.Install (nodes);
-  
-  StackHelper ndn;
-  ndn.SetDefaultRoutes (true);
-  ndn.Install (nodes);
-
-  Ptr<Node> node = nodes.Get (0);
-  
-  Ptr<Pit> pit = node->GetObject<Pit> ();
-  
-  Ptr<InterestHeader> header = Create<InterestHeader> ();
-  header->SetName (Create<NameComponents> ("/bla"));
-  header->SetInterestLifetime (Seconds (100));
-
-  Ptr<pit::Entry> e1 = pit->Create (header);
-  NS_ASSERT (e1 != 0);
-
-  header = Create<InterestHeader> ();
-  header->SetName (Create<NameComponents> ("/foo"));
-  header->SetInterestLifetime (Seconds (100));
-
-  Ptr<pit::Entry> e2 = pit->Create (header);
-  NS_ASSERT (e2 != 0);
-
-  list< Ptr< pit::Entry > > l;
-
-  l.push_back (e1);
-  l.push_back (e2);
-
-  BOOST_FOREACH (Ptr<pit::Entry> entry, l)
-    {
-      cout << "* " << entry->GetPrefix () << endl;
-    }
-
-  l.remove (e2);
-  
-  BOOST_FOREACH (Ptr<pit::Entry> entry, l)
-    {
-      cout << "* " << entry->GetPrefix () << endl;
-    }
-
-
-  cerr << "===========\n\n";
-
-  shared_ptr<Bla> p1 = make_shared <Bla> ();
-  shared_ptr<Bla> p2 = make_shared <Bla> ();
-
-  if (p1 < p2)
-    {
-      cerr << "They are equal\n";
-    }
-
-
-  Time x = Seconds (-1);
-  cout << x << endl;
-}
-
-} // namespace ndn
-} // namespace ns3
diff --git a/test/generic-tests.h b/test/generic-tests.h
deleted file mode 100644
index 56b1775..0000000
--- a/test/generic-tests.h
+++ /dev/null
@@ -1,46 +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 GENERIC_TESTS_H
-#define GENERIC_TESTS_H
-
-#include "ns3/test.h"
-#include "ns3/ptr.h"
-
-namespace ns3 {
-namespace ndn {
-
-class GenericTests :
-    public TestCase
-{
-public:
-  GenericTests ()
-    : TestCase ("Generic tests")
-  {
-  }
-    
-private:
-  virtual void DoRun ();
-};
-  
-} // namespace ndn
-} // namespace ns3
-
-#endif // GENERIC_TESTS_H
diff --git a/test/ndnSIM-stats-tree.cc b/test/ndnSIM-stats-tree.cc
deleted file mode 100644
index ee7c235..0000000
--- a/test/ndnSIM-stats-tree.cc
+++ /dev/null
@@ -1,222 +0,0 @@
-/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2011,2012 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 "ndnSIM-stats-tree.h"
-#include "ns3/core-module.h"
-#include "ns3/point-to-point-module.h"
-#include "ns3/ndnSIM-module.h"
-#include "../utils/stats/stats-tree.h"
-#include "../apps/ndn-producer.h"
-
-#include <boost/lexical_cast.hpp>
-
-NS_LOG_COMPONENT_DEFINE ("ndn.StatsTreeTest");
-
-namespace ns3 {
-
-using namespace ndn;
-using namespace ndn::ndnSIM;
-
-void
-StatsTreeTest::DoRun ()
-{
-  BasicTests ();
-  SimpleScenario ();
-}
-
-
-void
-StatsTreeTest::BasicTests ()
-{
-  StackHelper ndn;
-
-  Ptr<Node> node1   = CreateObject<Node> ();
-  Ptr<App> app1 = CreateObject<Producer> ();
-  node1->AddApplication (app1);
-  ndn.Install (node1);
-
-  Ptr<Face> face1 = CreateObject<AppFace> (app1);
-  Ptr<Face> face2 = CreateObject<AppFace> (app1);
-  Ptr<Face> face3 = CreateObject<AppFace> (app1);
-
-  node1->GetObject<L3Protocol> ()->AddFace (face1);
-  node1->GetObject<L3Protocol> ()->AddFace (face2);
-  node1->GetObject<L3Protocol> ()->AddFace (face3);
-
-  // NS_LOG_DEBUG (*face1 << ", " << *face2 << ", " << *face3);
-  
-  NS_TEST_ASSERT_MSG_NE (*face1, *face2, "Face1 should not be equal to Face2");
-  NS_TEST_ASSERT_MSG_NE (face1, face2, "&Face1 should not be equal to &Face2");
-  NS_TEST_ASSERT_MSG_NE (*face2, *face3, "Face2 should not be equal to Face3");
-  NS_TEST_ASSERT_MSG_NE (face2, face3, "&Face2 should not be equal to &Face3");
-
-  // hack
-  face3->SetId (0);
-  NS_TEST_ASSERT_MSG_EQ (*face1, *face3, "Face1 should be now equal to Face3");
-  NS_TEST_ASSERT_MSG_NE (face1, face3, "&Face1 should not be equal to &Face3");
-
-  LoadStatsNode::stats_container bla;
-  bla[face1].Step (); 
-  bla[face2].Step ();
-
-  NS_TEST_ASSERT_MSG_EQ (bla.size (), 2, "Should be two entries in the container");
-
-  bla[face3].Step ();
-  NS_TEST_ASSERT_MSG_EQ (bla.size (), 2, "Should be still two entries in the container");
-
-  LoadStatsNode node;
-  node.AddIncoming (face1);
-  node.AddIncoming (face1);
-  node.AddIncoming (face2);
-  node.AddIncoming (face3);
-
-  NS_TEST_ASSERT_MSG_EQ (node.incoming ().size (), 2, "Incoming should have two entries again");
-  NS_TEST_ASSERT_MSG_EQ (node.outgoing ().size (), 0, "Outgoing should have 0 entries");
-
-  node.Satisfy ();
-  node.Satisfy ();
-  NS_TEST_ASSERT_MSG_EQ (node.incoming ().size (), 2, "Incoming should have two entries again");
-  NS_TEST_ASSERT_MSG_EQ (node.outgoing ().size (), 0, "Outgoing should have 0 entries");
-
-  node.Timeout ();
-  NS_TEST_ASSERT_MSG_EQ (node.incoming ().size (), 2, "Incoming should have two entries again");
-  NS_TEST_ASSERT_MSG_EQ (node.outgoing ().size (), 0, "Outgoing should have 0 entries");
-
-  // NS_LOG_DEBUG ("count:      " << node.incoming ().find (face1)->second.count ());
-  // NS_LOG_DEBUG ("satisfied:  " << node.incoming ().find (face1)->second.satisfied ());
-  // NS_LOG_DEBUG ("unsatisfied:" << node.incoming ().find (face1)->second.unsatisfied ());
-
-  node.Step ();
-  
-  // NS_LOG_DEBUG ("count:      " << node.incoming ().find (face1)->second.count ());
-  // NS_LOG_DEBUG ("satisfied:  " << node.incoming ().find (face1)->second.satisfied ());
-  // NS_LOG_DEBUG ("unsatisfied:" << node.incoming ().find (face1)->second.unsatisfied ());
-  
-  LoadStats::stats_tuple tuple = node.incoming ().find (face1)->second.GetSatisfiedRatio ();
-  // NS_LOG_DEBUG ("In, face1, satisfied ratio: " << tuple.get<0> () << ", " << tuple.get<1> () << ", " << tuple.get<2> ());
-
-  NS_TEST_ASSERT_MSG_EQ_TOL (tuple.get<0> (), 0.667, 0.01, "Satisfied ratio should be ~ 2/3");
-  NS_TEST_ASSERT_MSG_LT     (tuple.get<1> (), 0,           "Satisfied ratio should be less 0 (invalid)");
-  NS_TEST_ASSERT_MSG_LT     (tuple.get<2> (), 0,           "Satisfied ratio should be less 0 (invalid)");
-  
-  tuple = node.incoming ().find (face1)->second.GetUnsatisfiedRatio ();
-  // NS_LOG_DEBUG ("In, face1, unsatisfied ratio: " << tuple.get<0> () << ", " << tuple.get<1> () << ", " << tuple.get<2> ());
-
-  NS_TEST_ASSERT_MSG_EQ_TOL (tuple.get<0> (), 0.333, 0.01, "Satisfied ratio should be ~ 1/3");
-  NS_TEST_ASSERT_MSG_LT     (tuple.get<1> (), 0,           "Satisfied ratio should be less 0 (invalid)");
-  NS_TEST_ASSERT_MSG_LT     (tuple.get<2> (), 0,           "Satisfied ratio should be less 0 (invalid)");
-
-  node.AddIncoming (face1);
-  node.Timeout ();
-  node.Step ();
-
-  // NS_LOG_DEBUG ("After decaying");
-  
-  tuple = node.incoming ().find (face1)->second.GetSatisfiedRatio ();
-  // NS_LOG_DEBUG ("In, face1, satisfied ratio: " << tuple.get<0> () << ", " << tuple.get<1> () << ", " << tuple.get<2> ());
-
-  NS_TEST_ASSERT_MSG_EQ_TOL (tuple.get<0> (), 0.473776, 0.01, "");
-  // NS_TEST_ASSERT_MSG_EQ_TOL (tuple.get<1> (), 0.489, 0.01, "");
-  // NS_TEST_ASSERT_MSG_LT     (tuple.get<2> (), 0,           "");
-  
-  tuple = node.incoming ().find (face1)->second.GetUnsatisfiedRatio ();
-  // NS_LOG_DEBUG ("In, face1, unsatisfied ratio: " << tuple.get<0> () << ", " << tuple.get<1> () << ", " << tuple.get<2> ());
-
-  NS_TEST_ASSERT_MSG_EQ_TOL (tuple.get<0> (), 0.526, 0.01, "");
-  // NS_TEST_ASSERT_MSG_EQ_TOL (tuple.get<1> (), 0.504, 0.01, "");
-  // NS_TEST_ASSERT_MSG_LT     (tuple.get<2> (), 0,           "");  
-
-  for (uint32_t i = 0; i < 10; i++ )
-    node.Step ();
-
-  // NS_LOG_DEBUG ("After more decaying");
-
-  tuple = node.incoming ().find (face1)->second.GetSatisfiedRatio ();
-  // NS_LOG_DEBUG ("In, face1, satisfied ratio: " << tuple.get<0> () << ", " << tuple.get<1> () << ", " << tuple.get<2> ());
-
-  NS_TEST_ASSERT_MSG_LT (tuple.get<0> (), 0, "");
-  // NS_TEST_ASSERT_MSG_LT (tuple.get<1> (), 0, "");
-  // NS_TEST_ASSERT_MSG_LT (tuple.get<2> (), 0, "");
-  
-  tuple = node.incoming ().find (face1)->second.GetUnsatisfiedRatio ();
-  // NS_LOG_DEBUG ("In, face1, unsatisfied ratio: " << tuple.get<0> () << ", " << tuple.get<1> () << ", " << tuple.get<2> ());
-
-  NS_TEST_ASSERT_MSG_LT (tuple.get<0> (), 0, "");
-  // NS_TEST_ASSERT_MSG_LT (tuple.get<1> (), 0, "");
-  // NS_TEST_ASSERT_MSG_LT (tuple.get<2> (), 0, "");
-
-  /////////////////////////////////////////////////////
-  //              Actual tree testing                //
-  /////////////////////////////////////////////////////
-
-  StatsTree tree;
-  tree.NewPitEntry ("/bla/bla/bla");
-  tree.NewPitEntry ("/bla/bla/bla");
-  tree.NewPitEntry ("/bla/bla/bla");
-  tree.NewPitEntry ("/foo/bar");
-  tree.NewPitEntry ("/bar/foo");
-  tree.NewPitEntry ("/tra/la/la");
-
-  tree.Incoming ("/bla/bla/bla", face1);
-  tree.Outgoing ("/foo/bar", face2);
-  tree.Satisfy  ("/bar/foo");
-  tree.Satisfy  ("/tra/la/la");
-  tree.Timeout  ("/tra/la/la");
-
-  tree.Step ();
-
-  // NS_TEST_ASSERT_MSG_EQ (boost::lexical_cast<std::string> (tree ["/"]),
-  //                        // "PIT: 0.479734, 0.0991713, 0.0332409/0.159911, 0.0330571, 0.0110803/0.0799556, 0.0165285, 0.00554015",
-  //                        "PIT: ration satisfied: 0.333333 0.333333 -1 / unsatisfied: 0.166667 0.166667 -1 ",
-  //                        "Something wrong with stats tree");
-  NS_TEST_ASSERT_MSG_EQ (boost::lexical_cast<std::string> (tree ["/"]),
-                         // "PIT: 0.479734, 0.0991713, 0.0332409/0.159911, 0.0330571, 0.0110803/0.0799556, 0.0165285, 0.00554015",
-                         "PIT: ration satisfied: 0.333333 -1 -1 / unsatisfied: 0.166667 -1 -1 ",
-                         "Something wrong with stats tree");
-
-  NS_TEST_ASSERT_MSG_NE (&tree ["/bla/bla/bla"],
-                         &tree ["/"],
-                         "The stats tree should not be empty");
-  for (uint32_t i = 0; i < 9; i++)
-    {
-      tree.Step ();
-    }
-  NS_LOG_DEBUG (tree ["/bla/bla/bla"]);
-  NS_LOG_DEBUG (tree ["/"]);
-  NS_TEST_ASSERT_MSG_EQ (&tree ["/bla/bla/bla"],
-                         &tree ["/"],
-                         "The stats tree should be empty (only root node)");
-}
-
-
-
-void
-StatsTreeTest::SimpleScenario ()
-{
-  NodeContainer nodes;
-  nodes.Create (2);
-  PointToPointHelper p2pHelper;
-  p2pHelper.Install (nodes);
-
-
-  
-}
-
-}
diff --git a/test/ndnSIM-stats-tree.h b/test/ndnSIM-stats-tree.h
deleted file mode 100644
index a98a79f..0000000
--- a/test/ndnSIM-stats-tree.h
+++ /dev/null
@@ -1,50 +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 NDNSIM_TEST_STATS_TREE_H
-#define NDNSIM_TEST_STATS_TREE_H
-
-#include "ns3/test.h"
-#include "ns3/ptr.h"
-
-namespace ns3
-{
-
-class StatsTreeTest : public TestCase
-{
-public:
-  StatsTreeTest ()
-    : TestCase ("StatsTree test")
-  {
-  }
-    
-private:
-  virtual void DoRun ();
-
-  void
-  BasicTests ();
-
-  void
-  SimpleScenario ();
-};
-  
-}
-
-#endif // NDNSIM_TEST_STATS_TREE_H
diff --git a/test/ndnSIM-tests.cc b/test/ndnSIM-tests.cc
index 7242d98..004f761 100644
--- a/test/ndnSIM-tests.cc
+++ b/test/ndnSIM-tests.cc
@@ -23,9 +23,6 @@
 
 #include "ndnSIM-serialization.h"
 #include "ndnSIM-pit.h"
-#include "ndnSIM-stats-tree.h"
-#include "fw-per-fib-limits.h"
-#include "generic-tests.h"
 
 namespace ns3
 {
@@ -38,13 +35,9 @@
   {
     SetDataDir (NS_TEST_SOURCEDIR);
     
-    // AddTestCase (new InterestSerializationTest ());
-    // AddTestCase (new ContentObjectSerializationTest ());
-    // AddTestCase (new PitTest ());
-    // AddTestCase (new StatsTreeTest ());
-
-    // AddTestCase (new ndn::FwPerFibLimits ());
-    AddTestCase (new ndn::GenericTests ());
+    AddTestCase (new InterestSerializationTest ());
+    AddTestCase (new ContentObjectSerializationTest ());
+    AddTestCase (new PitTest ());
   }
 };
 
diff --git a/utils/stats/load-stats-face.cc b/utils/stats/load-stats-face.cc
deleted file mode 100644
index df48f2b..0000000
--- a/utils/stats/load-stats-face.cc
+++ /dev/null
@@ -1,152 +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 "load-stats-face.h"
-
-#include "ns3/log.h"
-
-#include <boost/mpl/for_each.hpp>
-#include <boost/mpl/range_c.hpp>
-
-using namespace boost::mpl;
-using namespace boost::tuples;
-
-NS_LOG_COMPONENT_DEFINE ("ndn.LoadStatsFace");
-
-namespace ns3 {
-namespace ndn {
-namespace ndnSIM {
-
-std::ostream &
-operator << (std::ostream &os, const LoadStats::stats_tuple &tuple);
-
-void
-LoadStatsFace::Step ()
-{
-  m_count.Step ();
-  m_satisfied.Step ();
-  m_unsatisfied.Step ();
-  m_tx.Step ();
-  m_rx.Step ();
-}
-
-struct update_retval
-{
-  update_retval (const LoadStats &count, const LoadStats &other, LoadStats::stats_tuple &tuple)
-    : count_ (count)
-    , other_ (other)
-    , tuple_ (tuple) {}
-  const LoadStats &count_;
-  const LoadStats &other_;
-  LoadStats::stats_tuple &tuple_;
-    
-  template< typename U >
-  void operator () (U)
-  {
-    if (count_.GetStats ().get<U::value> () < LoadStats::PRECISION)
-      tuple_.get<U::value> () = -1;
-    else
-      tuple_.get<U::value> () = other_.GetStats ().get<U::value> () / count_.GetStats ().get<U::value> ();
-  }
-};
-
-LoadStats::stats_tuple
-LoadStatsFace::GetSatisfiedRatio () const
-{
-  LoadStats::stats_tuple retval;
-  for_each< range_c<int, 0, length<LoadStats::stats_tuple>::value> >
-    (update_retval (m_count, m_satisfied, retval));
-
-  // NS_LOG_DEBUG (retval.get<0> () << ", " << retval.get<1> () << ", " << retval.get<2> ());
-  return retval;
-}
-
-LoadStats::stats_tuple
-LoadStatsFace::GetUnsatisfiedRatio () const
-{
-  LoadStats::stats_tuple retval;
-  for_each< range_c<int, 0, length<LoadStats::stats_tuple>::value> >
-    (update_retval (m_count, m_unsatisfied, retval));
-
-  // NS_LOG_DEBUG (retval.get<0> () << ", " << retval.get<1> () << ", " << retval.get<2> ());
-  return retval;
-}
-  
-LoadStatsFace &
-LoadStatsFace::operator += (const LoadStatsFace &load)
-{
-  m_count       += load.m_count;
-  m_satisfied   += load.m_satisfied;
-  m_unsatisfied += load.m_unsatisfied;
-  m_tx          += load.m_tx;
-  m_rx          += load.m_rx;
-
-  return *this;
-}
-
-bool
-LoadStatsFace::IsZero () const
-{
-  return m_count.IsZero () && m_satisfied.IsZero () && m_unsatisfied.IsZero () && m_tx.IsZero () && m_rx.IsZero ();
-}
-
-struct print_tuple
-{
-  print_tuple (const LoadStats::stats_tuple &tuple, std::ostream &os)
-    : tuple_ (tuple)
-    , os_ (os)
-  {
-  }
-  
-  const LoadStats::stats_tuple &tuple_;
-  std::ostream &os_;
-    
-  template< typename U >
-  void operator () (U)
-  {
-    os_ << tuple_.get< U::value > () << " ";
-  }
-};
-
-
-std::ostream &
-operator << (std::ostream &os, const LoadStats::stats_tuple &tuple)
-{
-  for_each< range_c<int, 0, length<LoadStats::stats_tuple>::value> >
-    (print_tuple (tuple, os));
-  
-  return os;
-}
-
-std::ostream &
-operator << (std::ostream &os, const LoadStatsFace &stats)
-{
-  LoadStats::stats_tuple
-    satisfied   = stats.GetSatisfiedRatio (),
-    unsatisfied = stats.GetUnsatisfiedRatio ();
-
-  os << "ration satisfied: " << satisfied << "/ unsatisfied: " << unsatisfied;
-  return os;
-}
-
-} // namespace ndnSIM
-} // namespace ndn
-} // namespace ns3
-
diff --git a/utils/stats/load-stats-face.h b/utils/stats/load-stats-face.h
deleted file mode 100644
index 70a4c36..0000000
--- a/utils/stats/load-stats-face.h
+++ /dev/null
@@ -1,138 +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 LOAD_STATS_FACE_H
-#define LOAD_STATS_FACE_H
-
-#include "load-stats.h"
-
-namespace ns3 {
-namespace ndn {
-namespace ndnSIM {
-
-class LoadStatsFace
-{
-public:
-  void
-  Step ();
-
-  inline LoadStats&
-  count ();
-
-  inline const LoadStats&
-  count () const;
-
-  inline LoadStats&
-  satisfied ();
-
-  inline const LoadStats&
-  satisfied () const;
-  
-  inline LoadStats&
-  unsatisfied ();
-
-  inline const LoadStats&
-  unsatisfied () const;
-
-  inline LoadStats&
-  tx ();
-
-  inline const LoadStats&
-  tx () const;
-
-  inline LoadStats&
-  rx ();
-
-  inline const LoadStats&
-  rx () const;
-  
-  //
-  LoadStats::stats_tuple
-  GetSatisfiedRatio () const;
-
-  LoadStats::stats_tuple
-  GetUnsatisfiedRatio () const;
-
-  LoadStatsFace &
-  operator += (const LoadStatsFace &load);
-
-  bool
-  IsZero () const;
-  
-private:
-  LoadStats m_count;
-  LoadStats m_satisfied;
-  LoadStats m_unsatisfied;
-  LoadStats m_rx;
-  LoadStats m_tx;
-
-  friend std::ostream &
-  operator << (std::ostream &os, const LoadStatsFace &stats);
-};
-
-inline LoadStats&
-LoadStatsFace::count ()
-{ return m_count; }
-
-inline const LoadStats&
-LoadStatsFace::count () const
-{ return m_count; }
-
-inline LoadStats&
-LoadStatsFace::satisfied ()
-{ return m_satisfied; }
-
-inline const LoadStats&
-LoadStatsFace::satisfied () const
-{ return m_satisfied; }
-
-inline LoadStats&
-LoadStatsFace::unsatisfied ()
-{ return m_unsatisfied; }
-
-inline const LoadStats&
-LoadStatsFace::unsatisfied () const
-{ return m_unsatisfied; }
-
-inline LoadStats&
-LoadStatsFace::tx ()
-{ return m_tx; }
-
-inline const LoadStats&
-LoadStatsFace::tx () const
-{ return m_tx; }
-
-inline LoadStats&
-LoadStatsFace::rx ()
-{ return m_rx; }
-
-inline const LoadStats&
-LoadStatsFace::rx () const
-{ return m_rx; }
-
-
-std::ostream &
-operator << (std::ostream &os, const LoadStatsFace &stats);
-
-} // namespace ndnSIM
-} // namespace ndn
-} // namespace ns3
-
-#endif // LOAD_STATS_FACE_H
diff --git a/utils/stats/load-stats-node.cc b/utils/stats/load-stats-node.cc
deleted file mode 100644
index 743f764..0000000
--- a/utils/stats/load-stats-node.cc
+++ /dev/null
@@ -1,237 +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 "load-stats-node.h"
-#include "ns3/ndn-face.h"
-#include "ns3/log.h"
-#include <boost/lambda/lambda.hpp>
-#include <boost/lambda/bind.hpp>
-
-namespace ll = boost::lambda;
-
-NS_LOG_COMPONENT_DEFINE ("ndn.LoadStatsNode");
-
-namespace ns3 {
-namespace ndn {
-namespace ndnSIM {
-
-void
-LoadStatsNode::Step ()
-{
-  NS_LOG_FUNCTION (this);
-  
-  m_pit.Step ();
-  
-  for (stats_container::iterator item = m_incoming.begin ();
-       item != m_incoming.end ();
-       item ++)
-    {
-      item->second.Step ();
-    }
-  
-  for (stats_container::iterator item = m_outgoing.begin ();
-       item != m_outgoing.end ();
-       item ++)
-    {
-      item->second.Step ();
-    }
-}
-
-void
-LoadStatsNode::NewPitEntry ()
-{
-  m_pit.count ()++;
-}
-
-void
-LoadStatsNode::AddIncoming (ns3::Ptr<Face> face)
-{
-  m_incoming [face].count ()++;
-}
-
-void
-LoadStatsNode::AddOutgoing (ns3::Ptr<Face> face)
-{
-  m_outgoing [face].count ()++;
-}
-
-void
-LoadStatsNode::Satisfy ()
-{
-  m_pit.satisfied ()++;
-  
-  for (stats_container::iterator item = m_incoming.begin ();
-       item != m_incoming.end ();
-       item ++)
-    {
-      item->second.satisfied ()++;
-    }
-
-  for (stats_container::iterator item = m_outgoing.begin ();
-       item != m_outgoing.end ();
-       item ++)
-    {
-      item->second.satisfied ()++;
-    }
-}
-
-void
-LoadStatsNode::RemoveFromStats ()
-{
-  m_pit.count ()--;
-  
-  for (stats_container::iterator item = m_incoming.begin ();
-       item != m_incoming.end ();
-       item ++)
-    {
-      item->second.count ()--;
-    }
-
-  for (stats_container::iterator item = m_outgoing.begin ();
-       item != m_outgoing.end ();
-       item ++)
-    {
-      item->second.count ()--;
-    }
-}
-
-void
-LoadStatsNode::Timeout ()
-{
-  m_pit.unsatisfied ()++;
-  
-  for (stats_container::iterator item = m_incoming.begin ();
-       item != m_incoming.end ();
-       item ++)
-    {
-      item->second.unsatisfied ()++;
-    }
-
-  for (stats_container::iterator item = m_outgoing.begin ();
-       item != m_outgoing.end ();
-       item ++)
-    {
-      item->second.unsatisfied ()++;
-    }
-}
-
-void
-LoadStatsNode::Rx (ns3::Ptr<Face> face, uint32_t amount)
-{
-  m_pit.rx () += amount;
-  m_incoming [face].rx () += amount;
-}
-
-void
-LoadStatsNode::Tx (ns3::Ptr<Face> face, uint32_t amount)
-{
-  m_pit.tx () += amount;
-  m_outgoing [face].tx () += amount;
-}
-
-
-LoadStatsNode &
-LoadStatsNode::operator += (const LoadStatsNode &stats)
-{
-  NS_LOG_FUNCTION (this << &stats);
-  
-  m_pit += stats.m_pit;
-  
-  // aggregate incoming
-  for (stats_container::const_iterator item = stats.m_incoming.begin ();
-       item != stats.m_incoming.end ();
-       item ++)
-    {
-      m_incoming [item->first] += item->second;
-    }
-  
-  // aggregate outgoing
-  for (stats_container::const_iterator item = stats.m_outgoing.begin ();
-       item != stats.m_outgoing.end ();
-       item ++)
-    {
-      m_outgoing [item->first] += item->second;
-    }
-
-  return *this;
-}
-
-bool
-LoadStatsNode::IsZero () const
-{
-  bool zero = true;
-  for (stats_container::const_iterator item = m_incoming.begin ();
-       item != m_incoming.end ();
-       item ++)
-    {
-      zero &= item->second.IsZero ();
-    }
-
-  for (stats_container::const_iterator item = m_outgoing.begin ();
-       item != m_outgoing.end ();
-       item ++)
-    {
-      zero &= item->second.IsZero ();
-    }
-
-//  std::for_each (m_incoming.begin (), m_incoming.end (),
-//                 zero &= ll::bind (&LoadStatsFace::IsZero,
-//                                   ll::bind (&stats_container::value_type::second, ll::_1)));
-//
-//  std::for_each (m_outgoing.begin (), m_outgoing.end (),
-//                 zero &= ll::bind (&LoadStatsFace::IsZero,
-//                                   ll::bind (&stats_container::value_type::second, ll::_1)));
-  
-  zero &= m_pit.IsZero ();
-  
-  return zero;  
-}
-
-
-void
-LoadStatsNode::RemoveFace (ns3::Ptr<Face> face)
-{
-  NS_LOG_FUNCTION (this);
-  m_incoming.erase (face);
-  m_outgoing.erase (face);
-}
-
-bool
-LoadStatsNode::operator == (const LoadStatsNode &other) const
-{
-  if (other.m_incoming.size () > 0 ||
-      other.m_outgoing.size () > 0 ||
-      !other.m_pit.IsZero ())
-    return false;
-
-  return IsZero ();
-}
-
-std::ostream&
-operator << (std::ostream &os, const LoadStatsNode &node)
-{
-  os << "PIT: " << node.m_pit;// << std::endl;
-  return os;
-}
-
-
-} // namespace ndnSIM
-} // namespace ndn
-} // namespace ns3
diff --git a/utils/stats/load-stats-node.h b/utils/stats/load-stats-node.h
deleted file mode 100644
index 135c5f0..0000000
--- a/utils/stats/load-stats-node.h
+++ /dev/null
@@ -1,165 +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 LOAD_STATS_NODE_H
-#define LOAD_STATS_NODE_H
-
-#include "load-stats-face.h"
-#include <map>
-#include "ns3/ptr.h"
-
-namespace ns3 {
-namespace ndn {
-
-class Face;
-
-namespace ndnSIM
-{
-
-// this thing is actually put into a tree node, associated with each "name entry"
-
-class LoadStatsNode
-{
-public:
-  typedef std::map< ns3::Ptr<Face>, LoadStatsFace > stats_container;
-
-  LoadStatsNode () {}
-  LoadStatsNode (const LoadStatsNode &) {}
-
-  void
-  Step ();
-
-  /**
-   * Increment face-independent counter
-   */
-  void
-  NewPitEntry ();
-  
-  /**
-   * Increment counter to incoming list
-   */
-  void
-  AddIncoming (ns3::Ptr<Face> face);
-
-  /**
-   * Increment counter to outgoing list
-   */
-  void
-  AddOutgoing (ns3::Ptr<Face> face);
-
-  /**
-   * Increment counter to both incoming and outgoing lists, for all faces
-   */
-  void
-  Satisfy ();
-
-  /**
-   * Remove a packet from all stats
-   */
-  void
-  RemoveFromStats ();
-
-  /**
-   * Increment counter to both incoming and outgoing lists, for all faces
-   */
-  void
-  Timeout ();
-
-  /**
-   * Increment counter for Tx amount
-   */
-  void
-  Rx (ns3::Ptr<Face> face, uint32_t amount);
-
-  /**
-   * Increment counter for Tx amount
-   */
-  void
-  Tx (ns3::Ptr<Face> face, uint32_t amount);
-
-  LoadStatsNode &
-  operator += (const LoadStatsNode &stats);
-
-  inline const stats_container &
-  incoming () const;
-  
-  inline const stats_container &
-  outgoing () const;
-
-  inline const LoadStatsFace &
-  pit () const;
-
-  bool
-  IsZero () const;
-  
-  bool
-  operator == (const LoadStatsNode &other) const;
-  
-  bool
-  operator != (const LoadStatsNode &other) const
-  {
-    return !(*this == other);
-  }
-
-  LoadStatsNode &
-  operator = (const LoadStatsNode &other)
-  {
-    // don't do any copying at all
-    return *this;
-  }
-
-  void
-  RemoveFace (ns3::Ptr<Face> face);
-  
-private:
-  LoadStatsFace   m_pit;
-  stats_container m_incoming;
-  stats_container m_outgoing;
-
-  friend std::ostream&
-  operator << (std::ostream &os, const LoadStatsNode &node);
-};
-
-inline const LoadStatsNode::stats_container &
-LoadStatsNode::incoming () const
-{
-  return m_incoming;
-}
-  
-inline const LoadStatsNode::stats_container &
-LoadStatsNode::outgoing () const
-{
-  return m_outgoing;
-}
-
-inline const LoadStatsFace &
-LoadStatsNode::pit () const
-{
-  return m_pit;
-}
-
-std::ostream&
-operator << (std::ostream &os, const LoadStatsNode &node);
-
-} // ndnSIM
-} // ndn
-} // ns3
-
-#endif
diff --git a/utils/stats/load-stats.cc b/utils/stats/load-stats.cc
deleted file mode 100644
index 4bc1e5b..0000000
--- a/utils/stats/load-stats.cc
+++ /dev/null
@@ -1,115 +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 "load-stats.h"
-#include "ns3/log.h"
-
-// const double EXP_1  = (1-2.0/6.0);//exp (-1.0/5.0);  /* 1/exp(1sec/5sec) */
-// const double EXP_2  = (1-2.0/31.0);//exp (-1.0/30.0); /* 1/exp(1sec/30sec) */
-// const double EXP_3 = (1-2.0/61.0);//exp (-1.0/60.0); /* 1/exp(1sec/60sec) */
-
-const double EXP_1 = exp (-1.0/5.0);  /* 1/exp(1sec/5sec) */
-const double EXP_2 = exp (-1.0/30.0); /* 1/exp(1sec/30sec) */
-const double EXP_3 = exp (-1.0/60.0); /* 1/exp(1sec/60sec) */
-
-NS_LOG_COMPONENT_DEFINE ("ndn.LoadStats");
-
-namespace ns3 {
-namespace ndn {
-namespace ndnSIM {
-
-const double LoadStats::PRECISION = 0.1;
-
-LoadStats::LoadStats ()
-  : counter_ (0)
-  , avg1_ (0)
-  , avg2_ (0)
-  , avg3_ (0)
-{
-}
-
-void
-LoadStats::Step ()
-{
-  // NS_LOG_FUNCTION (this);
-
-  // do magic
-  avg1_ = EXP_1 * avg1_ + (1 - EXP_1) * counter_;
-  // avg2_ = EXP_2 * avg2_ + (1 - EXP_2) * counter_;
-  // avg3_ = EXP_3 * avg3_ + (1 - EXP_3) * counter_;
-
-  counter_ = 0;
-}
-
-LoadStats &
-LoadStats::operator ++ (int)
-{
-  counter_ ++;
-  return *this;
-}
-
-LoadStats &
-LoadStats::operator -- (int)
-{
-  counter_ --;
-  return *this;
-}
-
-LoadStats &
-LoadStats::operator += (uint32_t amount)
-{
-  counter_ += amount;
-  return *this;
-}
-
-LoadStats &
-LoadStats::operator += (const LoadStats &stats)
-{
-  // NS_LOG_FUNCTION (this << &stats << stats.counter_);
-
-  counter_ += stats.counter_;
-  return *this;
-}
-
-LoadStats::stats_tuple
-LoadStats::GetStats () const
-{
-  return stats_tuple (avg1_, avg2_, avg3_);
-}
-
-bool
-LoadStats::IsZero () const
-{
-  return (counter_ == 0 &&
-          avg1_ < PRECISION &&
-	  avg2_ < PRECISION &&
-	  avg3_ < PRECISION);
-}
-
-std::ostream &
-operator << (std::ostream &os, const LoadStats &stats)
-{
-  os << stats.avg1_ << ", " << stats.avg2_ << ", " << stats.avg3_;
-  return os;
-}
-
-} // namespace ndnSIM
-} // namespace ndn
-} // namespace ns3
diff --git a/utils/stats/load-stats.h b/utils/stats/load-stats.h
deleted file mode 100644
index d07c548..0000000
--- a/utils/stats/load-stats.h
+++ /dev/null
@@ -1,85 +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 LOAD_STATS_H
-#define LOAD_STATS_H
-
-#include "ns3/nstime.h"
-#include <boost/tuple/tuple.hpp>
-
-namespace ns3 {
-namespace ndn {
-namespace ndnSIM {
-
-class LoadStats
-{
-public:
-  typedef boost::tuple<double, double, double> stats_tuple;
-
-  static const double PRECISION;
-
-  LoadStats ();
-  
-  void
-  Step ();
-
-  // void
-  // Increment (uint32_t amount);
-
-  LoadStats &
-  operator ++ (int);
-
-  LoadStats &
-  operator -- (int);
-  
-  // uint32_t
-  // GetCounter () const;
-
-  LoadStats &
-  operator += (const LoadStats &stats);
-
-  LoadStats &
-  operator += (uint32_t amount);
-
-  stats_tuple
-  GetStats () const;
-
-  bool
-  IsZero () const;
-  
-private:
-  uint32_t counter_;
-
-  double avg1_;
-  double avg2_;
-  double avg3_;
-
-  friend std::ostream &
-  operator << (std::ostream &os, const LoadStats &stats);
-};
-
-std::ostream &
-operator << (std::ostream &os, const LoadStats &stats);
-
-} // namespace ndnSIM
-} // namespace ndn
-} // namespace ns3
-
-#endif // LOAD_STATS_H
diff --git a/utils/stats/stats-tree.cc b/utils/stats/stats-tree.cc
deleted file mode 100644
index f27281a..0000000
--- a/utils/stats/stats-tree.cc
+++ /dev/null
@@ -1,169 +0,0 @@
-/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2012 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 "stats-tree.h"
-#include "ns3/ndn-face.h"
-#include "ns3/log.h"
-
-NS_LOG_COMPONENT_DEFINE ("ndn.StatsTree");
-
-namespace ns3 {
-namespace ndn {
-namespace ndnSIM {
-
-StatsTree::StatsTree ()
-  : m_tree ("")
-{
-}
-
-void
-StatsTree::Step ()
-{
-  NS_LOG_FUNCTION (this);
-
-  // walking the tree, aggregating and stepping on every node, starting the leaves
-  // for (trie_type::
-
-  WalkLeftRightRoot (&m_tree);
-  m_tree.payload ().Step ();
-  NS_LOG_DEBUG ("[" << m_tree.key () << "] " << m_tree.payload ());  
-}
-
-void
-StatsTree::NewPitEntry (const NameComponents &key)
-{
-  std::pair<tree_type::iterator, bool> item = m_tree.insert (key, LoadStatsNode ());
-
-  item.first->payload ().NewPitEntry ();
-}
-
-void
-StatsTree::Incoming (const NameComponents &key, Ptr<Face> face)
-{
-  std::pair<tree_type::iterator, bool> item = m_tree.insert (key, LoadStatsNode ());
-
-  item.first->payload ().AddIncoming (face);
-}
-
-void
-StatsTree::Outgoing (const NameComponents &key, Ptr<Face> face)
-{
-  std::pair<tree_type::iterator, bool> item = m_tree.insert (key, LoadStatsNode ());
-
-  item.first->payload ().AddOutgoing (face);
-}
-
-void
-StatsTree::Satisfy (const NameComponents &key)
-{
-  std::pair<tree_type::iterator, bool> item = m_tree.insert (key, LoadStatsNode ());
-
-  item.first->payload ().Satisfy ();
-}
-
-void
-StatsTree::RemoveFromStats (const NameComponents &key)
-{
-  std::pair<tree_type::iterator, bool> item = m_tree.insert (key, LoadStatsNode ());
-
-  item.first->payload ().RemoveFromStats ();
-}
-
-void
-StatsTree::Timeout (const NameComponents &key)
-{
-  std::pair<tree_type::iterator, bool> item = m_tree.insert (key, LoadStatsNode ());
-
-  item.first->payload ().Timeout ();
-}
-
-void
-StatsTree::Rx (const NameComponents &key, Ptr<Face> face, uint32_t amount)
-{
-  std::pair<tree_type::iterator, bool> item = m_tree.insert (key, LoadStatsNode ());
-
-  item.first->payload ().Rx (face, amount);
-}
-
-void
-StatsTree::Tx (const NameComponents &key, Ptr<Face> face, uint32_t amount)
-{
-  std::pair<tree_type::iterator, bool> item = m_tree.insert (key, LoadStatsNode ());
-
-  item.first->payload ().Tx (face, amount);
-}
-
-// const LoadStatsNode &
-// StatsTree::Get (const NameComponents &key) const
-const LoadStatsNode &
-StatsTree::operator [] (const NameComponents &key) const
-{
-  tree_type::iterator foundItem, lastItem;
-  bool reachLast;
-  boost::tie (foundItem, reachLast, lastItem) = const_cast<tree_type&> (m_tree).find (key);
-
-  return lastItem->payload ();
-}
-
-const LoadStatsNode&
-StatsTree::WalkLeftRightRoot (tree_type *node)
-{
-  tree_type::point_iterator item (*node), end;
-
-  while (item != end)
-    {
-      node->payload () += WalkLeftRightRoot (&*item);
-      item->payload ().Step ();
-
-      NS_LOG_DEBUG ("[" << item->key () << "] " << item->payload ());
-      // item->prune (); // will do only if necessary
-
-      tree_type::point_iterator prune_iterator = item;
-      item++;
-
-      prune_iterator->prune_node ();
-    }
-  
-  return node->payload ();
-}
-
-void
-StatsTree::RemoveFace (Ptr<Face> face)
-{
-  tree_type::recursive_iterator item (&m_tree), end;
-  for (; item != end; item ++)
-    {
-      item->payload ().RemoveFace (face);
-    }
-}
-
-std::ostream &
-operator << (std::ostream &os, const StatsTree &tree)
-{
-  // os << "[" << tree.m_tree.key () << "]: " << tree.m_tree.payload ();
-  os << tree.m_tree;
-  return os;
-}
-
-
-} // namespace ndnSIM
-} // namespace ndn
-} // namespace ns3
-
diff --git a/utils/stats/stats-tree.h b/utils/stats/stats-tree.h
deleted file mode 100644
index bcab66d..0000000
--- a/utils/stats/stats-tree.h
+++ /dev/null
@@ -1,95 +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 STATS_TREE_H
-#define STATS_TREE_H
-
-#include "../trie/trie.h"
-#include "load-stats-node.h"
-#include "ns3/ndn-name-components.h"
-#include "ns3/ptr.h"
-
-namespace ns3 {
-namespace ndn {
-namespace ndnSIM {
-
-class StatsTree
-{
-public:
-  typedef trie< NameComponents,
-                non_pointer_traits< LoadStatsNode >, void* > tree_type;
-  
-  StatsTree ();
-
-  void
-  Step ();
-  
-  void
-  NewPitEntry (const NameComponents &key);
-
-  void
-  Incoming (const NameComponents &key, Ptr<Face> face);
-
-  void
-  Outgoing (const NameComponents &key, Ptr<Face> face);
-
-  void
-  Satisfy (const NameComponents &key);
-
-  void
-  RemoveFromStats (const NameComponents &key);
-
-  void
-  Timeout (const NameComponents &key);
-
-  void
-  Rx (const NameComponents &key, Ptr<Face> face, uint32_t amount);
-
-  void
-  Tx (const NameComponents &key, Ptr<Face> face, uint32_t amount);
-
-  // const LoadStatsNode &
-  // Get (const NameComponents &key) const;
-  const LoadStatsNode &
-  operator [] (const NameComponents &key) const;
-
-  void
-  RemoveFace (Ptr<Face> face);
-  
-private:
-  const LoadStatsNode &
-  WalkLeftRightRoot (tree_type *node);
-
-  
-private:
-  tree_type m_tree;
-
-  friend std::ostream &
-  operator << (std::ostream &os, const StatsTree &tree);
-};
-
-std::ostream &
-operator << (std::ostream &os, const StatsTree &tree);
-
-} // namespace ndnSIM
-} // namespace ndn
-} // namespace ns3
-
-#endif // STATS_TREE_H