docs: Documentation update

Change-Id: I6f916eb822a59e980e8fb1134886c3431755119c
diff --git a/docs/source/_static/l2-rate-tracer.png b/docs/source/_static/l2-rate-tracer.png
index c930bd4..d00ee0a 100644
--- a/docs/source/_static/l2-rate-tracer.png
+++ b/docs/source/_static/l2-rate-tracer.png
Binary files differ
diff --git a/docs/source/_static/ndnSIM-structure.pdf b/docs/source/_static/ndnSIM-structure.pdf
new file mode 100644
index 0000000..c0829a2
--- /dev/null
+++ b/docs/source/_static/ndnSIM-structure.pdf
Binary files differ
diff --git a/docs/source/_static/ndnSIM-structure.png b/docs/source/_static/ndnSIM-structure.png
new file mode 100644
index 0000000..cf2c3f1
--- /dev/null
+++ b/docs/source/_static/ndnSIM-structure.png
Binary files differ
diff --git a/docs/source/_static/ndnsim-components.pdf b/docs/source/_static/ndnsim-components.pdf
deleted file mode 100644
index d940bf9..0000000
--- a/docs/source/_static/ndnsim-components.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/source/_static/ndnsim-components.png b/docs/source/_static/ndnsim-components.png
deleted file mode 100644
index 1601f19..0000000
--- a/docs/source/_static/ndnsim-components.png
+++ /dev/null
Binary files differ
diff --git a/docs/source/_static/nfd-forwarding-overview.pdf b/docs/source/_static/nfd-forwarding-overview.pdf
new file mode 100644
index 0000000..18187f3
--- /dev/null
+++ b/docs/source/_static/nfd-forwarding-overview.pdf
Binary files differ
diff --git a/docs/source/_static/nfd-forwarding-overview.png b/docs/source/_static/nfd-forwarding-overview.png
new file mode 100644
index 0000000..e62e7d6
--- /dev/null
+++ b/docs/source/_static/nfd-forwarding-overview.png
Binary files differ
diff --git a/docs/source/_static/root-5sec-counts.png b/docs/source/_static/root-5sec-counts.png
deleted file mode 100644
index 5257f1d..0000000
--- a/docs/source/_static/root-5sec-counts.png
+++ /dev/null
Binary files differ
diff --git a/docs/source/_static/root-rates.png b/docs/source/_static/root-rates.png
index bc0df92..9101e3d 100644
--- a/docs/source/_static/root-rates.png
+++ b/docs/source/_static/root-rates.png
Binary files differ
diff --git a/docs/source/_templates/indexcontent.html b/docs/source/_templates/indexcontent.html
index a536a8d..d25b177 100644
--- a/docs/source/_templates/indexcontent.html
+++ b/docs/source/_templates/indexcontent.html
@@ -1,11 +1,17 @@
 {% extends "layout.html" %}
-{% set title = _('ndnSIM documentation') %}
+{% set title = _('ndnSIM 2.0 documentation') %}
 
 {% block body %}
     <h1>{{ docstitle|e }}</h1>
-    <p>
-The ndnSIM is NS-3 module that implements Named Data Networking (NDN) communication model, the clean slate Internet design. ndnSIM is specially optimized for simulation purposes and has a cleaner and more extensible internal structure comparing to the existing NDN implementation (NDNx).
-    </p>
+
+<p>ndnSIM 2.0 is a new release of <a class="reference external" href="http://ndnsim.net/1.0/">NS-3 based Named Data Networking (NDN) simulator</a> that went through extensive refactoring and rewriting.  The key new features of the new version:</p>
+
+<ul class="simple">
+<li>ndnSIM no longer re-implements basic NDN primitives and directly uses implementation from <a class="reference external" href="http://named-data.net/doc/ndn-cxx/">ndn-cxx library (NDN C++ library with eXperimental eXtensions)</a>.</li>
+<li>All NDN forwarding and management is implemented directly using source code of <a class="reference external" href="http://named-data.net/doc/NFD/">Named
+Data Networking Forwarding Daemon (NFD)</a></li>
+<li>Packet format changed to <a class="reference external" href="http://named-data.net/doc/ndn-tlv/">NDN-TLV</a></li>
+</ul>
 
     <p>
 We invite you to <a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank">join our mailing list</a> to see and participate in discussions about ndnSIM implementation and simulations in general (<a href="http://www.lists.cs.ucla.edu/pipermail/ndnsim/" target="_blank">mailing list archives</a>).
@@ -15,7 +21,7 @@
   <p><strong>Parts of the documentation:</strong></p>
   <table class="contentstable" align="center"><tr>
     <td width="50%" valign="top">
-      <p class="biglink"><a class="biglink" href="{{ pathto("tutorial") }}">ndnSIM tutorial</a><br/>
+      <p class="biglink"><a class="biglink" href="{{ pathto("tutorial") }}">ndnSIM 2.0 tutorial</a><br/>
          <div class="linkdescr" style="margin-left: 20px">
            <p class="biglink"><a class="biglink" href="{{ pathto("intro") }}">Introduction</a><br/>
              <span class="linkdescr">what is ndnSIM, how to get support, and what is in the package</span></p>
@@ -42,8 +48,6 @@
          <span class="linkdescr">doxygen-generated API documentation</span></p>
       <p class="biglink"><a class="biglink" href="{{ pathto("faq") }}">FAQs</a><br/>
          <span class="linkdescr">frequently asked questions (with answers!)</span></p>
-      <p class="biglink"><a class="biglink" href="{{ pathto("ndnsim-packet-formats") }}">ndnSIM packet format</a><br/>
-         <span class="linkdescr">definition of the optimized default packet format</span></p>
       <p class="biglink"><a class="biglink" href="{{ pathto("ndnsim-research-papers") }}">ndnSIM research papers</a><br/>
          <span class="linkdescr">list of ndnSIM-related papers</span></p>
     </td></tr>
diff --git a/docs/source/applications.rst b/docs/source/applications.rst
index c62722c..6fe0533 100644
--- a/docs/source/applications.rst
+++ b/docs/source/applications.rst
@@ -9,14 +9,14 @@
 ++++++++++++++++++++++
 
 ConsumerCbr
-^^^^^^^^^^^^^^^
+^^^^^^^^^^^
 
 :ndnsim:`ConsumerCbr` an application that generates Interest traffic with predefined pattern (constant frequency, constant average rate with inter-Interest gap distributed uniformly at random, exponentially at random, etc.).
 
 .. code-block:: c++
 
    // Create application using the app helper
-   ndn::AppHelper helper ("ns3::ndn::ConsumerCbr");
+   AppHelper helper("ns3::ndn::ConsumerCbr");
 
 This applications has the following attributes:
 
@@ -30,7 +30,7 @@
   .. code-block:: c++
 
      // Set attribute using the app helper
-     helper.SetAttribute ("Frequency", DoubleValue (1.0));
+     helper.SetAttribute("Frequency", DoubleValue (1.0));
 
 * ``Randomize``
 
@@ -48,7 +48,7 @@
   .. code-block:: c++
 
      // Set attribute using the app helper
-     helper.SetAttribute ("Randomize", StringValue ("uniform"));
+     helper.SetAttribute("Randomize", StringValue("uniform"));
 
 ConsumerZipfMandelbrot
 ^^^^^^^^^^^^^^^^^^^^^^
@@ -62,7 +62,7 @@
 .. code-block:: c++
 
    // Create application using the app helper
-   ndn::AppHelper helper ("ns3::ndn::ConsumerZipfMandelbrot");
+   ndn::AppHelper helper("ns3::ndn::ConsumerZipfMandelbrot");
 
 ``Frequency`` and ``Randomize`` attributes can be used in the same way as in the base :ndnsim:`ConsumerCbr` applications.
 
@@ -99,7 +99,7 @@
 .. code-block:: c++
 
    // Create application using the app helper
-   ndn::AppHelper consumerHelper ("ns3::ndn::ConsumerBatches");
+   ndn::AppHelper consumerHelper("ns3::ndn::ConsumerBatches");
 
 This applications has the following attributes:
 
@@ -114,18 +114,18 @@
   .. code-block:: c++
 
      // Set attribute using the app helper
-     helper.SetAttribute ("Batches", StringValue ("1s 1 2s 5 10s 2"));
+     helper.SetAttribute("Batches", StringValue("1s 1 2s 5 10s 2"));
 
 
 ConsumerWindow
 ^^^^^^^^^^^^^^^^^^
 
-:ndnsim:`ConsumerWindow` is an application generating a variable rate Interest traffic. It relies on an optional NACK-Interest feature and implements a simple sliding-window-based Interest generation mechanism.
+:ndnsim:`ConsumerWindow` is an application generating a variable rate Interest traffic. It implements a simple sliding-window-based Interest generation mechanism.
 
 .. code-block:: c++
 
    // Create application using the app helper
-   ndn::AppHelper consumerHelper ("ns3::ndn::ConsumerWindow");
+   AppHelper consumerHelper("ns3::ndn::ConsumerWindow");
 
 
 This applications has the following attributes:
@@ -161,7 +161,7 @@
 .. code-block:: c++
 
    // Create application using the app helper
-   ndn::AppHelper consumerHelper ("ns3::ndn::Producer");
+   AppHelper consumerHelper("ns3::ndn::Producer");
 
 .. _Custom applications:
 
@@ -183,39 +183,37 @@
 When this application starts it sets "interest filter" (install FIB entry) for /prefix/sub, as well as sends Interest for this prefix.
 When an Interest is received, it is replied with a ContentObject with 1024-byte fake payload.
 
-For more details refer ``examples/custom-apps/custom-app.h``, ``examples/custom-apps/custom-app.cc`` and API documentation of ndnSIM and NS-3.
+For more details refer ``examples/ndn-custom-apps/custom-app.hpp``, ``examples/ndn-custom-apps/custom-app.cpp`` and API documentation of ndnSIM and NS-3.
 
-Header file ``examples/custom-apps/custom-app.h``:
+Header file ``examples/ndn-custom-apps/custom-app.hpp``:
 
-.. literalinclude:: ../../examples/custom-apps/custom-app.h
+.. literalinclude:: ../../examples/ndn-custom-apps/custom-app.hpp
     :language: c++
     :linenos:
-    :lines: 21-29,40-
+    :lines: 20-28,39-
 
-Source file ``examples/custom-apps/custom-app.cc``:
+Source file ``examples/ndn-custom-apps/custom-app.cpp``:
 
-.. literalinclude:: ../../examples/custom-apps/custom-app.cc
+.. literalinclude:: ../../examples/ndn-custom-apps/custom-app.cpp
     :language: c++
     :linenos:
-    :lines: 21-
+    :lines: 20-
 
-Example how to use custom app in a scenario (``ndn-simple-with-custom-app.cc``):
+Example how to use custom app in a scenario (``ndn-simple-with-custom-app.cpp``):
 
  .. *      +------+ <-----> (CustomApp1)
  .. *      | Node |
  .. *      +------+ <-----> (CustomApp2)
  .. *
 
-.. literalinclude:: ../../examples/ndn-simple-with-custom-app.cc
+.. literalinclude:: ../../examples/ndn-custom-apps.cpp
     :language: c++
     :linenos:
-    :lines: 21-28,39-
-    :emphasize-lines: 26-31
-
+    :lines: 20-27,37-
 
 To run this scenario, use the following command::
 
-        NS_LOG=CustomApp ./waf --run=ndn-simple-with-custom-app
+        NS_LOG=CustomApp ./waf --run=ndn-custom-apps
 
 
 Producer example (Interest hijacker)
@@ -223,19 +221,19 @@
 
 The following code demonstrates how to implement a basic producer application that "hijacks" all incoming Interests.
 
-Header file ``examples/custom-apps/hijacker.h``:
+Header file ``examples/ndn-custom-apps/hijacker.hpp``:
 
-.. literalinclude:: ../../examples/custom-apps/hijacker.h
+.. literalinclude:: ../../examples/ndn-custom-apps/hijacker.hpp
     :language: c++
     :linenos:
-    :lines: 21-
+    :lines: 20-
 
-Source file ``examples/custom-apps/hijacker.cc``:
+Source file ``examples/ndn-custom-apps/hijacker.cpp``:
 
-.. literalinclude:: ../../examples/custom-apps/hijacker.cc
+.. literalinclude:: ../../examples/ndn-custom-apps/hijacker.cpp
     :language: c++
     :linenos:
-    :lines: 21-
+    :lines: 20-
 
 
 After defining this class, you can use it with :ndnsim:`ndn::AppHelper`. For example:
@@ -243,27 +241,6 @@
 .. code-block:: c++
 
     ...
-    ndn::AppHelper producerHelper ("Hijacker");
-    producerHelper.Install (producerNode);
+    ndn::AppHelper producerHelper("Hijacker");
+    producerHelper.Install(producerNode);
     ...
-
-Dumb requester
-^^^^^^^^^^^^^^
-
-This application continually requests the same Data packet.
-
-Header file ``examples/custom-apps/dumb-requester.h``:
-
-.. literalinclude:: ../../examples/custom-apps/dumb-requester.h
-    :language: c++
-    :linenos:
-    :lines: 21-
-
-Source file ``examples/custom-apps/dumb-requester.cc``:
-
-.. literalinclude:: ../../examples/custom-apps/dumb-requester.cc
-    :language: c++
-    :linenos:
-    :lines: 21-
-
-
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 1d60617..afd3a1f 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -41,16 +41,16 @@
 
 # General information about the project.
 project = u''
-copyright = u'2011-2013 (c) Alexander Afanasyev, Ilya Moiseenko, and Lixia Zhang'
+copyright = u'2011-2015 (c) Alexander Afanasyev, Spyros Mastorakis, Ilya Moiseenko, and Lixia Zhang'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
 # built documents.
 #
 # The short X.Y version.
-version = '0.5'
+version = '2.0'
 # The full version, including alpha/beta/rc tags.
-release = 'Overall ndnSIM'
+release = 'Overall ndnSIM 2.0'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
@@ -185,8 +185,8 @@
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title, author, documentclass [howto/manual]).
 latex_documents = [
-  ('tutorial', 'ndnSIM-tutorial.tex', u'ndnSIM: NS-3 based Named Data Networking (NDN) simulator documentation',
-   u'Alexander Afanasyev, Ilya Moiseenko, and Lixia Zhang', 'manual'),
+  ('tutorial', 'ndnSIM-tutorial.tex', u'ndnSIM 2.0: NS-3 based Named Data Networking (NDN) simulator documentation',
+   u'Alexander Afanasyev, Spyros Mastorakis, Ilya Moiseenko, and Lixia Zhang', 'manual'),
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
@@ -215,8 +215,8 @@
 # One entry per manual page. List of tuples
 # (source start file, name, description, authors, manual section).
 man_pages = [
-    ('index', 'ndnSIM', u'ndnSIM: NS-3 based Named Data Networking (NDN) simulator documentation',
-     [u'Alexander Afanasyev, Ilya Moiseenko, and Lixia Zhang'], 1)
+    ('index', 'ndnSIM', u'ndnSIM 2.0: NS-3 based Named Data Networking (NDN) simulator documentation',
+     [u'Alexander Afanasyev, Spyros Mastorakis, Ilya Moiseenko, and Lixia Zhang'], 1)
 ]
 
 # If true, show URL addresses after external links.
@@ -229,8 +229,8 @@
 # (source start file, target name, title, author,
 #  dir menu entry, description, category)
 texinfo_documents = [
-  ('index', 'ndnSIM', u'ndnSIM: NS-3 based Named Data Networking (NDN) simulator documentation',
-   u'Alexander Afanasyev, Ilya Moiseenko, and Lixia Zhang', 'ndnSIM', 'One line description of project.',
+  ('index', 'ndnSIM', u'ndnSIM 2.0: NS-3 based Named Data Networking (NDN) simulator documentation',
+   u'Alexander Afanasyev, Spyridon Mastorakis, Ilya Moiseenko, and Lixia Zhang', 'ndnSIM', 'One line description of project.',
    'Miscellaneous'),
 ]
 
@@ -245,12 +245,13 @@
 
 doxylink = {
   'ndnsim' : ('ndnSIM.tag', 'doxygen/'),
+  'nfd' : ('ndnSIM.tag', 'doxygen/'),
 }
 
 googleanalytics_id = "UA-21372502-8"
 
 googleanalytics_enabled = True
 
-aafig_format = dict(latex='pdf', html='svg', text=None)
+aafig_format = {'latex': 'pdf', 'html': 'svg', 'text': None}
 
 # aafig_default_options = dict(Fixed=True)
diff --git a/docs/source/cs.rst b/docs/source/cs.rst
index 6098337..b118822 100644
--- a/docs/source/cs.rst
+++ b/docs/source/cs.rst
@@ -1,60 +1,187 @@
 .. _content store:
 
-Content Store
-+++++++++++++
+NFD's Content Store
+++++++++++++++++++++
 
-ndnSIM comes with several different in-memory :ndnsim:`content store <ndn::ContentStore>` implementations, featuring different cache replacement policies.
+The current implementation of NFD's Content Store uses a `skip list
+<http://en.wikipedia.org/wiki/Skip_list>`_ as its underlying data structure. Skip lists are a
+probabilistic alternative to balanced trees. Skip lists are balanced by virtue of a random
+number generator. Its average insertion and lookup complexity is O(log n). CS entries are
+placed in the Skip List in ascending order (by Name).
 
-.. note:
+The current implementation evicts CS entries based on prioritized FIFO (First In First Out)
+strategy.  The entries that get removed first are unsolicited Data packets, which are the Data
+packets that got cached opportunistically without preceding forwarding of the corresponding
+Interest packet. Next, the Data packets with expired freshness are removed. Lastly, the Data
+packets are removed from the Content Store on a pure FIFO basis. This cache replacement policy
+is currently hard-coded; it is intended to be replaceable in the future by the NFD developer
+team.
 
-    The default content store uses LRU replacement policity and constrained with 100 cached ContentObjects.
-
-To select a particular content store and configure its capacity, use :ndnsim:`SetContentStore <ndn::StackHelper::SetContentStore>` helper method
-
-Simple content stores
-^^^^^^^^^^^^^^^^^^^^^
-
-Least Recently Used (LRU) (default)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Implementation name: :ndnsim:`ndn::cs::Lru`.
-
-Usage example:
+The only currently available option to control behavior of NFD's Content Store is to set its
+maximum size using :ndnsim:`StackHelper::setCsSize()`:
 
       .. code-block:: c++
 
-         ndnHelper.SetContentStore ("ns3::ndn::cs::Lru",
-                                    "MaxSize", "10000");
-	 ...
-	 ndnHelper.Install (nodes);
+         ndnHelper.setCsSize(<max-size-in-packets>);
+         ...
+         ndnHelper.Install(nodes);
 
-First-In-First-Out (FIFO)
-~~~~~~~~~~~~~~~~~~~~~~~~~
+Examples:
 
-Implementation name: :ndnsim:`ndn::cs::Fifo`
+- Effectively disable NFD content store an all nodes
 
-Usage example:
+  Minimum allowed value for NFD content store size is 1.  If 0 is specified, it will be assumed
+  that the old content store implementation should be used.
 
       .. code-block:: c++
 
-         ndnHelper.SetContentStore ("ns3::ndn::cs::Fifo",
-                                    "MaxSize", "10000");
-	 ...
-	 ndnHelper.Install (nodes);
+         ndnHelper.setCsSize(1);
+         ...
+         ndnHelper.Install(nodes);
 
-Random
-~~~~~~
-
-Implementation name: :ndnsim:`ndn::cs::Random`
-
-Usage example:
+- Set CS size 100 on node1, size 1000 on node1, and size 2000 on all other nodes:
 
       .. code-block:: c++
 
-         ndnHelper.SetContentStore ("ns3::ndn::cs::Random",
-                                    "MaxSize", "10000");
-	 ...
-	 ndnHelper.Install (nodes);
+         ndnHelper.setCsSize(100);
+         ndnHelper.Install(node1);
+
+         ndnHelper.setCsSize(1000);
+         ndnHelper.Install(node2);
+
+         NodeContainer allOtherNodes;
+         for (NodeList::Iterator i = NodeList::Begin(); i != NodeList::End(); ++i) {
+           if (*i != node1 && *i != node2) {
+             allOtherNodes.Add(*i);
+           }
+         }
+         ndnHelper.Install(allOtherNodes);
+
+CS entry
+~~~~~~~~
+
+The Data packet, along with other necessary fields, are stored in a CS entry.  Each entry
+contains:
+
+- the Data packet
+- flag indicating whether the Data packet is unsolicited
+- the timestamp at which the cached Data becomes stale
+
+CS
+~~
+
+A multi-index container is maintained in order to support the prioritized FIFO cache
+replacement policy.  In this way, pointers to the Data packets in a particular order are
+kept. Note that this multi-index container is completely separated from the skip list
+container, which indexes Content Store entries by name.
+
+The container (Cs::CleanupIndex) currently supports indexing of unsolicited Data packets,
+indexing by packet staleness and indexing by packet arrival time. Calculation of the indexes is
+performed in the container during the Data packet insertion (Cs::insert) in the Content Store.
+
+Eviction (Cs::evictItem) is performed during the insertion when the CS is full, and when the
+capacity is decreased by management. We decided not to perform periodical cleanups, because its
+CPU overhead causes jitter in packet forwarding.
+
+In the current version of NFD, cache replacement policy can be modified by adding different
+indexes in the Cs::CleanupIndex container (refer to Boost.multiIndex documentation) and
+implementing additional logic in Cs::evictItem function.
+
+For more detailed specification refer to the `NFD Developer's Guide
+<http://named-data.net/wp-content/uploads/2014/07/NFD-developer-guide.pdf>`_, section 3.2.
+
+Old Content Store Implementations
++++++++++++++++++++++++++++++++++
+
+NFD's content store implementation takes full consideration of Interest selectors, however is
+not yet flexible when it comes to cache replacement policies.  Feature to extend CS flexibility
+is currently in active development (refer to `Issue #2219 on NFD Redmine
+<http://redmine.named-data.net/issues/2219>`_) and for the time being, we have ported the old
+ndnSIM 1.0 content store implementations to the new code base.  These implementations feature
+different cache replacement policies, but have very limited support for Interest selectors.  If
+your scenario relies on proper selector processing, do not use these implementations as the
+simulation results most likely be incorrect.
+
+To select old content store implementations, use :ndnsim:`StackHelper::SetOldContentStore`:
+
+.. code-block:: c++
+
+    ndnHelper.SetOldContentStore("<content store implementation>",
+                                ["<optional parameter>", "<optional parameter's value>" [, ...]]);
+    ...
+    ndnHelper.Install (nodes);
+
+Available old content store implementations are listed in the following table:
+
+
++----------------------------------------------+----------------------------------------------------------+
+| **Simple content stores**                                                                               |
++----------------------------------------------+----------------------------------------------------------+
+|   ``ns3::ndn::cs::Lru``                      | **Least recently used (LRU) (default)**                  |
++----------------------------------------------+----------------------------------------------------------+
+|   ``ns3::ndn::cs::Fifo``                     | First-in-first-Out (FIFO)                                |
++----------------------------------------------+----------------------------------------------------------+
+|   ``ns3::ndn::cs::Lfu``                      | Least frequently used (LFU)                              |
++----------------------------------------------+----------------------------------------------------------+
+|   ``ns3::ndn::cs::Random``                   | Random                                                   |
++----------------------------------------------+----------------------------------------------------------+
+|   ``ns3::ndn::cs::Nocache``                  | Policy that completely disables caching                  |
++----------------------------------------------+----------------------------------------------------------+
++----------------------------------------------+----------------------------------------------------------+
+| **Content stores with entry lifetime tracking**                                                         |
+|                                                                                                         |
+| These policies allow evaluation of CS enties lifetime (i.e., how long entries stay in CS)               |
++----------------------------------------------+----------------------------------------------------------+
+|   ``ns3::ndn::cs::Stats::Lru``               | Least recently used (LRU)                                |
++----------------------------------------------+----------------------------------------------------------+
+|   ``ns3::ndn::cs::Stats::Fifo``              | Least frequently used (LFU)                              |
++----------------------------------------------+----------------------------------------------------------+
+|   ``ns3::ndn::cs::Stats::Lfu``               | Random                                                   |
++----------------------------------------------+----------------------------------------------------------+
+|   ``ns3::ndn::cs::Stats::Random``            | Policy that completely disables caching                  |
++----------------------------------------------+----------------------------------------------------------+
++----------------------------------------------+----------------------------------------------------------+
+| **Content stores respecting freshness field of Data packets**                                           |
+|                                                                                                         |
+| These policies cache Data packets only for the time indicated by FreshnessPeriod.                       |
++----------------------------------------------+----------------------------------------------------------+
+|   ``ns3::ndn::cs::Freshness::Lru``           | Least recently used (LRU)                                |
++----------------------------------------------+----------------------------------------------------------+
+|   ``ns3::ndn::cs::Freshness::Fifo``          | Least frequently used (LFU)                              |
++----------------------------------------------+----------------------------------------------------------+
+|   ``ns3::ndn::cs::Freshness::Lfu``           | Random                                                   |
++----------------------------------------------+----------------------------------------------------------+
+|   ``ns3::ndn::cs::Freshness::Random``        | Policy that completely disables caching                  |
++----------------------------------------------+----------------------------------------------------------+
++----------------------------------------------+----------------------------------------------------------+
+| **Content store realization that probabilistically accepts data packet into CS (placement policy)**     |
++----------------------------------------------+----------------------------------------------------------+
+|   ``ns3::ndn::cs::Probability::Lru``         | Least recently used (LRU)                                |
++----------------------------------------------+----------------------------------------------------------+
+|   ``ns3::ndn::cs::Probability::Fifo``        | Least frequently used (LFU)                              |
++----------------------------------------------+----------------------------------------------------------+
+|   ``ns3::ndn::cs::Probability::Lfu``         | Random                                                   |
++----------------------------------------------+----------------------------------------------------------+
+|   ``ns3::ndn::cs::Probability::Random``      | Policy that completely disables caching                  |
++----------------------------------------------+----------------------------------------------------------+
+
+Examples:
+
+
+- Select simple LRU policy on node1, simple FIFO policy on node2, and simple random policy on
+  other nodes with maximum CS sizes of 10000 packets:
+
+      .. code-block:: c++
+
+         ndnHelper.SetOldContentStore("ns3::ndn::cs::Lru", "MaxSize", "10000");
+         ndnHelper.Install(node1);
+
+         ndnHelper.SetOldContentStore("ns3::ndn::cs::Fifo", "MaxSize", "10000");
+         ndnHelper.Install(node2);
+
+         ndnHelper.SetOldContentStore("ns3::ndn::cs::Random", "MaxSize", "10000");
+         ...
+         ndnHelper.Install(otherNodes);
 
 .. note::
 
@@ -64,179 +191,37 @@
 
     If ``MaxSize`` is set to 0, then no limit on ContentStore will be enforced
 
-Nocache
-~~~~~~~
-
-:ndnsim:`Trivial implementation <ndn::cs::Nocache>` of the ContentStore that does not really do any caching.
-
-Usage example:
+- Disable CS on node2
 
       .. code-block:: c++
 
-         ndnHelper.SetContentStore ("ns3::ndn::cs::Nocache");
-	 ...
-	 ndnHelper.Install (nodes);
+         ndnHelper.SetOldContentStore("ns3::ndn::cs::Nocache");
+         ndnHelper.Install(node3);
 
-Content stores with entry lifetime tracking
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-In order to evaluate lifetime of the content store entries, the special versions of the content store need to be used:
-
-Least Recently Used (LRU)
-~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Implementation name: :ndnsim:`ndn::cs::Stats::Lru`.
-
-Usage example:
+- Track lifetime of CS entries (must use ``ns3::ndn::cs::*::LifetimeStats`` policy):
 
       .. code-block:: c++
 
          void
-         CacheEntryRemoved (std::string context, Ptr<const ndn::cs::Entry> entry, Time lifetime)
+         CacheEntryRemoved(std::string context, Ptr<const ndn::cs::Entry> entry, Time lifetime)
          {
-             std::cout << entry->GetName () << " " << lifetime.ToDouble (Time::S) << "s" << std::endl;
+             std::cout << entry->GetName() << " " << lifetime.ToDouble(Time::S) << "s" << std::endl;
          }
 
          ...
 
-         ndnHelper.SetContentStore ("ns3::ndn::cs::Stats::Lru",
-                                    "MaxSize", "10000");
-	 ...
-	 ndnHelper.Install (nodes);
+         ndnHelper.SetOldContentStore("ns3::ndn::cs::Stats::Lru", "MaxSize", "10000");
+         ...
+         ndnHelper.Install(nodes);
 
          // connect to lifetime trace
-         Config::Connect ("/NodeList/*/$ns3::ndn::cs::Stats::Lru/WillRemoveEntry", MakeCallback (CacheEntryRemoved));
+         Config::Connect("/NodeList/*/$ns3::ndn::cs::Stats::Lru/WillRemoveEntry", MakeCallback(CacheEntryRemoved));
 
+- Get aggregate statistics of CS hit/miss ratio (works with any policy)
 
-First-In-First-Out (FIFO)
-~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Implementation name: :ndnsim:`ndn::cs::Stats::Fifo`.
-
-Usage example:
+  The simplest way tro track CS hit/miss statistics is to use :ndnsim:`CsTracer`, in more
+  details described in :ref:`Metrics Section <cs trace helper>`.
 
       .. code-block:: c++
 
-         void
-         CacheEntryRemoved (std::string context, Ptr<const ndn::cs::Entry> entry, Time lifetime)
-         {
-             std::cout << entry->GetName () << " " << lifetime.ToDouble (Time::S) << "s" << std::endl;
-         }
-
-         ...
-
-         ndnHelper.SetContentStore ("ns3::ndn::cs::Stats::Fifo",
-                                    "MaxSize", "10000");
-	 ...
-	 ndnHelper.Install (nodes);
-
-         // connect to lifetime trace
-         Config::Connect ("/NodeList/*/$ns3::ndn::cs::Stats::Fifo/WillRemoveEntry", MakeCallback (CacheEntryRemoved));
-
-Random
-~~~~~~
-
-Implementation name: :ndnsim:`ndn::cs::Stats::Random`
-
-Usage example:
-
-      .. code-block:: c++
-
-         void
-         CacheEntryRemoved (std::string context, Ptr<const ndn::cs::Entry> entry, Time lifetime)
-         {
-             std::cout << entry->GetName () << " " << lifetime.ToDouble (Time::S) << "s" << std::endl;
-         }
-
-         ...
-
-         ndnHelper.SetContentStore ("ns3::ndn::cs::Stats::Random",
-                                    "MaxSize", "10000");
-	 ...
-	 ndnHelper.Install (nodes);
-
-         // connect to lifetime trace
-         Config::Connect ("/NodeList/*/$ns3::ndn::cs::Stats::Random/WillRemoveEntry", MakeCallback (CacheEntryRemoved));
-
-.. _Content Store respecting freshness field of ContentObjects:
-
-Content stores respecting freshness field of ContentObjects
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-If simulations need Content Store which respects freshness of ContentObjects, the following versions of content store should be used:
-
-.. note:
-
-    Please note that currently, Freshness granularity is 1 second and maximum value is 65535 second. Value means infinity.
-
-Least Recently Used (LRU)
-~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Implementation name: :ndnsim:`ndn::cs::Freshness::Lru`.
-
-Usage example:
-
-      .. code-block:: c++
-
-         ...
-
-         ndnHelper.SetContentStore ("ns3::ndn::cs::Freshness::Lru",
-                                    "MaxSize", "10000");
-	 ...
-
-First-In-First-Out (FIFO)
-~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Implementation name: :ndnsim:`ndn::cs::Freshness::Fifo`
-
-Usage example:
-
-      .. code-block:: c++
-
-         ...
-
-         ndnHelper.SetContentStore ("ns3::ndn::cs::Freshness::Fifo",
-                                    "MaxSize", "10000");
-	 ...
-
-Random
-~~~~~~
-
-Implementation name: :ndnsim:`ndn::cs::Freshness::Random`
-
-Usage example:
-
-      .. code-block:: c++
-
-         ...
-
-         ndnHelper.SetContentStore ("ns3::ndn::cs::Freshness::Random",
-                                    "MaxSize", "10000");
-	 ...
-
-Example
-~~~~~~~
-
-The following example demonstrates a basic usage of a customized content store (``ndn-simple-with-content-freshness.cc``).
-In this scenario two simple consumers (both installed on a consumer node) continually request the same data packet.
-When Data producer specify unlimited freshness, Content keeps getting satisfied from local caches, while if freshness is specified, Interests periodically are getting through to the Data producer.
-
-.. aafig::
-    :aspect: 60
-    :scale: 120
-
-      +----------+                +--------+                +----------+
-      |          |     1Mbps      |        |      1Mbps     |          |
-      | Consumer |<-------------->| Router |<-------------->| Producer |
-      |          |         10ms   |        |         10ms   |          |
-      +----------+                +--------+                +----------+
-
-
-.. literalinclude:: ../../examples/ndn-simple-with-content-freshness.cc
-    :language: c++
-    :linenos:
-    :lines: 20-27,43-
-
-To run this scenario, use the following command::
-
-        NS_LOG=DumbRequester:ndn.cs.Freshness.Lru ./waf --run=ndn-simple-with-content-freshness
+         CsTracer::InstallAll("cs-trace.txt", Seconds(1));
diff --git a/docs/source/examples.rst b/docs/source/examples.rst
index 4fb13d0..6561be5 100644
--- a/docs/source/examples.rst
+++ b/docs/source/examples.rst
@@ -4,10 +4,13 @@
 .. role:: red
 
 .. note::
-   :red:`!!! This page only shows up examples of how to config topology and perform basic operations in ndnSIM (an example equivalent to "Hello, world1") !!!  These are **NOT** examples of real experimentations (just like "Hello, world!" is not a real program).`
+   :red:`!!! This page only shows up examples of how to config topology and perform basic
+   operations in ndnSIM (an example equivalent to "Hello, world1") !!!  These are **NOT**
+   examples of real experimentations (just like "Hello, world!" is not a real program).`
 
 .. note::
-   If you compiled ndnSIM with examples (``./waf configure --enable-examples``) you can directly run the example without putting scenario into ``scratch/`` folder.
+   If you compiled ndnSIM with examples (``./waf configure --enable-examples``) you can
+   directly run the example without putting scenario into ``scratch/`` folder.
 
 .. _simple-scenario:
 
@@ -26,33 +29,37 @@
           |          |         10ms   |        |         10ms   |          |
           +----------+                +--------+                +----------+
 
-The first example (``ndn-simple.cc``) shows very basics of ndnSIM.  In the simulated
+The first example (``ndn-simple.cpp``) shows very basics of ndnSIM.  In the simulated
 topology there are 3 nodes, connected with point-to-point links, one
 NDN consumer, and one NDN producer:
 
-Consumer is simulated using :ndnsim:`ConsumerCbr` reference application and generates Interests towards the producer
-with frequency of 10 Interests per second (see :doc:`applications`).
+Consumer is simulated using :ndnsim:`ConsumerCbr` reference application and generates Interests
+towards the producer with frequency of 10 Interests per second (see :doc:`applications`).
 
-Producer is simulated using :ndnsim:`Producer` class, which is used to satisfy all incoming Interests with virtual payload data (1024 bytes).
+Producer is simulated using :ndnsim:`Producer` class, which is used to satisfy all incoming
+Interests with virtual payload data (1024 bytes).
 
-FIB on every node is populated using default routes (see :doc:`helpers`).
+FIB on every node is populated using default routes (see :doc:`helpers`) and the content store
+structure of the original ndnSIM is used.
 
 The following code represents all that is necessary to run such a
 simple scenario
 
-.. literalinclude:: ../../examples/ndn-simple.cc
+.. literalinclude:: ../../examples/ndn-simple.cpp
    :language: c++
    :linenos:
-   :lines: 20-27,48-
-   :emphasize-lines: 30-33,37-49
+   :lines: 20-28,49-
+   :emphasize-lines: 23-24,27-29,42-53
 
-If this code is placed into ``scratch/ndn-simple.cc`` and NS-3 is compiled in debug mode, you can run and see progress of the
-simulation using the following command (in optimized mode nothing will be printed out)::
+If this code is placed into ``scratch/ndn-simple.cpp`` and NS-3 is compiled in debug mode, you
+can run and see progress of the simulation using the following command (in optimized mode
+nothing will be printed out)::
 
      NS_LOG=ndn.Consumer:ndn.Producer ./waf --run=ndn-simple
 
 .. note::
-   If you compiled ndnSIM with examples (``./waf configure --enable-examples``) you can directly run the example without putting scenario into ``scratch/`` folder.
+   If you compiled ndnSIM with examples (``./waf configure --enable-examples``) you can
+   directly run the example without putting scenario into ``scratch/`` folder.
 
 .. _9-node-grid-example:
 
@@ -81,31 +88,35 @@
            | |<-------->| |<---->|Producer|
            \-/          \-/      \--------/
 
-This scenario (``ndn-grid.cc``) simulates a grid topology, which is constructed using PointToPointLayout NS-3 module
+This scenario (``ndn-grid.cpp``) simulates a grid topology, which is constructed using
+PointToPointLayout NS-3 module.
 
-FIB is populated using :ndnsim:`GlobalRoutingHelper` (see :doc:`helpers`).
+FIB is populated using :ndnsim:`GlobalRoutingHelper` (see :doc:`helpers`). The content store
+structure of NFD is used in all the nodes.
 
-Consumer is simulated using :ndnsim:`ConsumerCbr` reference application and generates Interests towards the producer
-with frequency of 100 interests per second (see :doc:`applications`).
+Consumer is simulated using :ndnsim:`ConsumerCbr` reference application and generates Interests
+towards the producer with frequency of 100 interests per second (see :doc:`applications`).
 
-Producer is simulated using :ndnsim:`Producer` class, which is used to satisfy all incoming Interests with virtual payload data (1024 bytes).
+Producer is simulated using :ndnsim:`Producer` class, which is used to satisfy all incoming
+Interests with virtual payload data (1024 bytes).
 
 The following code represents all that is necessary to run such a simple scenario
 
-.. literalinclude:: ../../examples/ndn-grid.cc
+.. literalinclude:: ../../examples/ndn-grid.cpp
    :language: c++
    :linenos:
-   :lines: 20-27,53-
-   :emphasize-lines: 28,31-33,35-38,53-57
+   :lines: 20-29,54-
+   :emphasize-lines: 24-26,33,36-37,40-42,58,61
 
-
-If this code is placed into ``scratch/ndn-grid.cc`` and NS-3 is compiled in debug mode, you can run and see progress of the
-simulation using the following command (in optimized mode nothing will be printed out)::
+If this code is placed into ``scratch/ndn-grid.cpp`` and NS-3 is compiled in debug mode, you
+can run and see progress of the simulation using the following command (in optimized mode
+nothing will be printed out)::
 
     NS_LOG=ndn.Consumer:ndn.Producer ./waf --run=ndn-grid
 
 .. note::
-   If you compiled ndnSIM with examples (``./waf configure --enable-examples``) you can directly run the example without putting scenario into ``scratch/`` folder.
+   If you compiled ndnSIM with examples (``./waf configure --enable-examples``) you can
+   directly run the example without putting scenario into ``scratch/`` folder.
 
 .. _9-node-grid-example-using-topology-plugin:
 
@@ -134,9 +145,15 @@
            | |<-------->| |<---->|Producer|
            \-/          \-/      \--------/
 
-Instead of defining topology directly as in :ref:`simple-scenario` or using specialized helpers as in :ref:`9-node-grid-example`, ndnSIM provides experimental extended versions of TopologyReader classes: :ndnsim:`AnnotatedTopologyReader` and :ndnsim:`RocketfuelWeightsReader`.
+Instead of defining topology directly as in :ref:`simple-scenario` or using specialized helpers
+as in :ref:`9-node-grid-example`, ndnSIM provides experimental extended versions of
+TopologyReader classes: :ndnsim:`AnnotatedTopologyReader` and
+:ndnsim:`RocketfuelWeightsReader`.
 
-While :ndnsim:`RocketfuelWeightsReader` is a specialized version intended to be used with `Rocketfuel <http://www.cs.washington.edu/research/networking/rocketfuel/>`_ topology and link weights files (examples will be provided later), :ndnsim:`AnnotatedTopologyReader` is a more general-use class that uses simple user-readable format.
+While :ndnsim:`RocketfuelWeightsReader` is a specialized version intended to be used with
+`Rocketfuel <http://www.cs.washington.edu/research/networking/rocketfuel/>`_ topology and link
+weights files (examples will be provided later), :ndnsim:`AnnotatedTopologyReader` is a more
+general-use class that uses simple user-readable format.
 
 :ndnsim:`AnnotatedTopologyReader` expects the following format:
 
@@ -147,30 +164,34 @@
    :emphasize-lines: 8,24
 
 
-This scenario (``ndn-grid-topo-plugin.cc``) duplicates the functionality of :ref:`9-node-grid-example` but with the use of :ndnsim:`AnnotatedTopologyReader`.
+This scenario (``ndn-grid-topo-plugin.cpp``) duplicates the functionality of
+:ref:`9-node-grid-example` but with the use of :ndnsim:`AnnotatedTopologyReader`.
 
-.. literalinclude:: ../../examples/ndn-grid-topo-plugin.cc
+.. literalinclude:: ../../examples/ndn-grid-topo-plugin.cpp
    :language: c++
    :linenos:
-   :lines: 20-26,51-
-   :emphasize-lines: 14-16,20,27-30
+   :lines: 20-27,52-
+   :emphasize-lines: 15-17,31-33
 
 As you can see, scenario code became more compact and more readable.
 
-:ndnsim:`AnnotatedTopologyReader` provides two ways to access topology nodes.
-First, you can use the method :ndnsim:`AnnotatedTopologyReader::GetNodes` which returns NodeContainer.
+:ndnsim:`AnnotatedTopologyReader` provides two ways to access topology nodes.  First, you can
+use the method :ndnsim:`AnnotatedTopologyReader::GetNodes` which returns NodeContainer.
 
-Alternatively, nodes can be accessed by name using `Names::Find<Node> ("nodename")` call, as in the above example.
-For this purpose,:ndnsim:`AnnotatedTopologyReader` automatically registers all created nodes with names specified in topology file.
-For more information about `Names` class, please refer to `NS-3 documentation <.. http://www.nsnam.org/doxygen/classns3_1_1_names.html>`_
-.
+Alternatively, nodes can be accessed by name using `Names::Find<Node> ("nodename")` call, as in
+the above example.  For this purpose,:ndnsim:`AnnotatedTopologyReader` automatically registers
+all created nodes with names specified in topology file.  For more information about `Names`
+class, please refer to `NS-3 documentation <http://www.nsnam.org/doxygen/classns3_1_1_names.html>`_.
 
-If the topology file is placed into ``src/ndnSIM/examples/topologies/topo-grid-3x3.txt`` and the code is placed into ``scratch/ndn-grid-topo-plugin.cc``, you can run and see progress of the simulation using the following command (in optimized mode nothing will be printed out)::
+If the topology file is placed into ``src/ndnSIM/examples/topologies/topo-grid-3x3.txt`` and
+the code is placed into ``scratch/ndn-grid-topo-plugin.cpp``, you can run and see progress of
+the simulation using the following command (in optimized mode nothing will be printed out)::
 
     NS_LOG=ndn.Consumer:ndn.Producer ./waf --run=ndn-grid-topo-plugin
 
 .. note::
-   If you compiled ndnSIM with examples (``./waf configure --enable-examples``) you can directly run the example without putting scenario into ``scratch/`` folder.
+   If you compiled ndnSIM with examples (``./waf configure --enable-examples``) you can
+   directly run the example without putting scenario into ``scratch/`` folder.
 
 6-node bottleneck topology
 --------------------------
@@ -181,45 +202,43 @@
         :aspect: 60
         :scale: 90
 
-        /------\                                                    /------\
-        | Src1 |<--+                                            +-->| Dst1 |
-        \------/    \                                          /    \------/
-                     \                                        /
-                      +-->/------\   "bottleneck"  /------\<-+
-                          | Rtr1 |<===============>| Rtr2 |
-                      +-->\------/                 \------/<-+
-                     /                                        \
-        /------\    /                                          \    /------\
-        | Src2 |<--+                                            +-->| Dst2 |
-        \------/                                                    \------/
+         /------\                                                    /------\
+         | Src1 |<--+                                            +-->| Dst1 |
+         \------/    \                                          /    \------/
+                      \                                        /
+                       +-->/------\   "bottleneck"  /------\<-+
+                           | Rtr1 |<===============>| Rtr2 |
+                       +-->\------/                 \------/<-+
+                      /                                        \
+         /------\    /                                          \    /------\
+         | Src2 |<--+                                            +-->| Dst2 |
+         \------/                                                    \------/
 
-This scenario (``ndn-congestion-topo-plugin.cc``) can be used for congestion-related scenarios
+
+This scenario (``ndn-congestion-topo-plugin.cpp``) can be used for congestion-related scenarios
 
 .. literalinclude:: ../../examples/topologies/topo-6-node.txt
     :language: bash
     :linenos:
     :lines: 1-2,15-
-    :emphasize-lines: 3,13
 
-.. literalinclude:: ../../examples/ndn-congestion-topo-plugin.cc
+.. literalinclude:: ../../examples/ndn-congestion-topo-plugin.cpp
    :language: c++
    :linenos:
-   :lines: 20-26,47-
-   :emphasize-lines: 15,21-22,29-34,41-47,52-62
-
-.. :lines: 20-25,53-
+   :lines: 20-27,48-
 
 To run this scenario and see what is happening, use the following command::
 
         NS_LOG=ndn.Consumer:ndn.Producer ./waf --run=ndn-congestion-topo-plugin
 
 .. note::
-   If you compiled ndnSIM with examples (``./waf configure --enable-examples``) you can directly run the example without putting scenario into ``scratch/`` folder.
+   If you compiled ndnSIM with examples (``./waf configure --enable-examples``) you can
+   directly run the example without putting scenario into ``scratch/`` folder.
 
-.. _11-node 2-bottleneck topology with custom forwarding strategy:
+.. _11-node 2-bottleneck topology:
 
-11-node 2-bottleneck topology with custom forwarding strategy
--------------------------------------------------------------
+11-node 2-bottleneck topology
+------------------------------
 
 .. sidebar:: Topology
 
@@ -252,13 +271,7 @@
          "Numbers near nodes denote face IDs. Face ID is assigned based on the order of link"
          "definitions in the topology file"
 
-To effectively use the example :ref:`custom strategy <Writing your own custom strategy>`, we need to make sure that FIB entries contain at least two entries.
-In the current version of ndnSIM, this can be accomplished using manual route configuration.
-
-The following example illustrates how the strategy can be used in simulation scenario.
-
-Let us first define a meaningful topology:
-
+Firstly, we define a meaningful topology:
 
 The corresponding topology file (``topo-11-node-two-bottlenecks.txt``):
 
@@ -267,14 +280,14 @@
     :linenos:
     :lines: 1-2,28-
 
-Example simulation (``ndn-congestion-alt-topo-plugin.cc``) scenario that utilizes CustomStrategy forwarding strategy:
+After that, we define the simulation scenario:
 
-.. literalinclude:: ../../examples/ndn-congestion-alt-topo-plugin.cc
+Example simulation (``ndn-congestion-alt-topo-plugin.cpp``) scenario:
+
+.. literalinclude:: ../../examples/ndn-congestion-alt-topo-plugin.cpp
     :language: c++
     :linenos:
-    :lines: 21-28,61-
-    :emphasize-lines: 16,21,49-50,65-79
-
+    :lines: 20-27,60-
 
 To run this scenario and see what is happening, use the following command::
 
@@ -285,7 +298,124 @@
         ./waf --run=ndn-congestion-alt-topo-plugin --visualize
 
 .. note::
-   If you compiled ndnSIM with examples (``./waf configure --enable-examples``) you can directly run the example without putting scenario into ``scratch/`` folder.
+   If you compiled ndnSIM with examples (``./waf configure --enable-examples``) you can
+   directly run the example without putting scenario into ``scratch/`` folder.
+
+.. _6-node topology with custom NFD forwarding strategy:
+
+6-node topology with custom NFD forwarding strategy
+---------------------------------------------------
+
+.. sidebar:: Topology
+
+    .. aafig::
+        :aspect: 60
+        :scale: 90
+
+                                /-----\
+                                | CSU |
+                       +----->  | HUB |  <----+
+                       |        \-----/       |
+                       |                      |  1Mbps/10ms delay
+                       v                      v
+                     /------\               /----------\
+                     | UCLA |               | Consumer |
+                     | HUB  |               |   CSU-1  |
+             +-----> \------/ <-----+       \----------/
+             |                      |
+             |                      |
+             v                      v
+         /----------\           /----------\
+         | Producer |           | Producer |
+         |  UCLA-1  |           |  UCLA-2  |
+         \----------/           \----------/
+
+        "All links are 1Mbps with propagation 10ms delay."
+        "FIB is populated using NdnGlobalRoutingHelper."
+
+This scenario simulates a load balancer topology (using topology reader module).  The
+corresponding topology file (``topo-load-balancer.txt``):
+
+.. literalinclude:: ../../examples/topologies/topo-load-balancer.txt
+    :language: bash
+    :linenos:
+    :lines: 30-36,43-
+
+After that, we define the simulation scenario:
+
+Example simulation (``ndn-load-balancer.cpp``) scenario:
+
+.. literalinclude:: ../../examples/ndn-load-balancer.cpp
+    :language: c++
+    :linenos:
+    :lines: 20-27,55-
+    :emphasize-lines: 7,44-45
+
+In this simulation scenario, the node called "UCLA-HUB" implements a random load balancing
+strategy for the name prefix "/ucla/hello". In this way, the Interest packets will be
+forwarded randomly either to the producer node called "UCLA-1" or the producer node called
+"UCLA-2".
+
+To run this scenario and see what is happening, use the following command::
+
+        NS_LOG=ndn.Consumer:ndn.Producer ./waf --run=ndn-load-balancer
+
+.. note::
+   If you compiled ndnSIM with examples (``./waf configure --enable-examples``) you can
+   directly run the example without putting scenario into ``scratch/`` folder.
+
+9-node grid topology with different forwarding strategies per name prefix
+-------------------------------------------------------------------------
+
+This scenario simulates a grid topology (using PointToPointGrid module). In this scenario,
+thanks to NFD, we can choose a different forwarding strategy for each prefix in each node.
+
+Consumer requests data from producer with frequency 100 interests per second (interests
+contain constantly increasing sequence number).
+
+For every received interest, producer replies with a data packet, containing 1024 bytes of
+virtual payload.
+
+In this scenario, we choose the broadcast strategy to be installed for the name prefix
+"/prefix1" in all the nodes, while for the name prefix "/prefix2", the best-route strategy
+will be installed in all the topology nodes.
+
+Example simulation (``ndn-different-strategy-per-prefix.cpp``) scenario:
+
+.. literalinclude:: ../../examples/ndn-different-strategy-per-prefix.cpp
+    :language: c++
+    :linenos:
+    :lines: 20-33,61-
+    :emphasize-lines: 51-52
+
+To run this scenario and see what is happening, use the following command::
+
+        NS_LOG=ndn.Consumer:ndn.Producer ./waf --run=ndn-different-strategy-per-prefix
+
+9-node grid topology with different forwarding strategy for each node
+---------------------------------------------------------------------
+
+This scenario simulates a grid topology (using PointToPointGrid module). The first six nodes
+use the best route forwarding strategy, whereas the three remaining nodes use the broadcast
+forwarding strategy.
+
+Consumer requests data from producer with frequency 100 interests per second (interests
+contain constantly increasing sequence number).
+
+For every received interest, producer replies with a data packet, containing 1024 bytes of
+virtual payload.
+
+Example simulation (``ndn-grid-multiple-strategies.cpp``) scenario:
+
+.. literalinclude:: ../../examples/ndn-grid-multiple-strategies.cpp
+    :language: c++
+    :linenos:
+    :lines: 20-33,61-
+    :emphasize-lines: 49-58
+
+To run this scenario and see what is happening, use the following command::
+
+        NS_LOG=ndn.Consumer:ndn.Producer ./waf --run=ndn-grid-multiple-strategies
 
 3-level binary tree with packet-level trace helpers
 ---------------------------------------------------
@@ -298,18 +428,11 @@
 
 :ref:`cs trace helper example`
 
-
 3-level binary tree with  application-level Interest-Data delay tracer
 ----------------------------------------------------------------------
 
 :ref:`app delay trace helper example`
 
-
-3-node topology with Content Store respecting freshness field of ContentObjects
--------------------------------------------------------------------------------
-
-:ref:`Content Store respecting freshness field of ContentObjects`
-
 1-node topology with custom application
 ---------------------------------------
 
@@ -318,17 +441,19 @@
 Simple scenario with pcap dump
 ------------------------------
 
-The following example (``ndn-simple-with-pcap.cc``) demonstrates how to dump all simulated traffic
-in pcap-formatted data, which can be used for later analysis by conventional tools, like tcpdump and wireshark.
+The following example (``ndn-simple-with-pcap.cpp``) demonstrates how to dump all simulated
+traffic in pcap-formatted data, which can be used for later analysis by conventional tools,
+like tcpdump and wireshark.
 
-.. literalinclude:: ../../examples/ndn-simple-with-pcap.cc
+.. literalinclude:: ../../examples/ndn-simple-with-pcap.cpp
    :language: c++
    :linenos:
    :lines: 20-
-   :emphasize-lines: 7-29,70-72
+   :emphasize-lines: 24-43,89-91
 
-If this code is placed into ``scratch/ndn-simple-with-pcap.cc`` and NS-3 is compiled in debug mode, you can run and see progress of the
-simulation using the following command (in optimized mode nothing will be printed out)::
+If this code is placed into ``scratch/ndn-simple-with-pcap.cpp`` and NS-3 is compiled in debug
+mode, you can run and see progress of the simulation using the following command (in optimized
+mode nothing will be printed out)::
 
      NS_LOG=ndn.Consumer:ndn.Producer ./waf --run=ndn-simple-with-pcap
 
@@ -337,38 +462,36 @@
      tcpdump -r ndn-simple-trace.pcap
 
 .. note::
-   If you compiled ndnSIM with examples (``./waf configure --enable-examples``) you can directly run the example without putting scenario into ``scratch/`` folder.
+   If you compiled ndnSIM with examples (``./waf configure --enable-examples``) you can
+   directly run the example without putting scenario into ``scratch/`` folder.
 
 .. _Simple scenario with link failures:
 
 Simple scenario with link failures
 ----------------------------------
 
-The following example (``ndn-simple-with-link-failure.cc``) shows how to "fail" links in ndnSIM simulation.
-The basic idea is to set ndn::Faces that correspond to the failed link to DOWN state.
-ndnSIM now includes a simple helper that simplifies this process.
+The following example (``ndn-simple-with-link-failure.cpp``) shows how to "fail" links in
+ndnSIM simulation.  The basic idea is to set ndn::Faces that correspond to the failed link to
+DOWN state.  ndnSIM now includes a simple helper that simplifies this process.
 
-.. literalinclude:: ../../examples/ndn-simple-with-link-failure.cc
+.. literalinclude:: ../../examples/ndn-simple-with-link-failure.cpp
    :language: c++
    :linenos:
-   :lines: 21-31,52-
-   :emphasize-lines: 54-56
+   :lines: 20-31,52-
+   :emphasize-lines: 56-57
 
-If this code is placed into ``scratch/ndn-simple-with-link-failure.cc`` and NS-3 is compiled in debug mode, you can run and see progress of the
-simulation using the following command (in optimized mode nothing will be printed out)::
+If this code is placed into ``scratch/ndn-simple-with-link-failure.cpp`` and NS-3 is compiled
+in debug mode, you can run and see progress of the simulation using the following command (in
+optimized mode nothing will be printed out)::
 
      NS_LOG=ndn.Consumer:ndn.Producer:ndn.LinkControlHelper ./waf --run=ndn-simple-with-link-failure
 
 .. note::
-   If you compiled ndnSIM with examples (``./waf configure --enable-examples``) you can directly run the example without putting scenario into ``scratch/`` folder.
+   If you compiled ndnSIM with examples (``./waf configure --enable-examples``) you can
+   directly run the example without putting scenario into ``scratch/`` folder.
 
 
 25-node tree topology with L2Tracer
 -----------------------------------
 
 :ref:`Example of packet drop tracer (L2Tracer)`
-
-3-node topology with periodic tracing of PIT
---------------------------------------------
-
-:ref:`periodic tracing of Pending Interest Table (PIT) size`
diff --git a/docs/source/faq.rst b/docs/source/faq.rst
index a7ce4bd..068afb0 100644
--- a/docs/source/faq.rst
+++ b/docs/source/faq.rst
@@ -129,11 +129,7 @@
 
     How can I fail a link between to NDN nodes?
 
-
-Right now, NS-3 does not provide ability to actually "break" the link between nodes in NS-3.
-However, exactly the same effect can be achieved by making an interface (:ndnsim:`ndn::Face`) up or down (:ndnsim:`ndn::Face::SetUp(true)` or :ndnsim:`ndn::Face::SetUp(false)`).
-
-You can use :ndnsim:`ndn::LinkControlHelper` to schedule failing links.  For example, refer to :ref:`Simple scenario with link failures` example.
+Refer to :ref:`Link Control Helper`.
 
 General questions
 -----------------
@@ -142,4 +138,6 @@
 
     I found an error in the documentation / bug in the code. What should I do?
 
-Please create an issue for the documentation error or code bug on `github <http://github.com/NDN-Routing/ndnSIM>`_, or tell us about the error on `our mailing list <http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>`_ .
+Please submit a bug report on `redmine <http://redmine.named-data.net/projects/ndnsim?jump=welcome>`_,
+or tell us about the error on `our mailing list
+<http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>`_ .
diff --git a/docs/source/fw.rst b/docs/source/fw.rst
index 45d4f2b..c98e134 100644
--- a/docs/source/fw.rst
+++ b/docs/source/fw.rst
@@ -3,298 +3,173 @@
 Forwarding Strategies
 =====================
 
-ndnSIM provides simple ways to experiment with custom Interest/Data forwarding strategies.
-A new forwarding strategy can be implement completely different processing or override just specific actions/events of the :ndnsim:`forwarding strategy interface <ndn::ForwardingStrategy>`.
-Please refer to :ndnsim:`API documentation <ndn::ForwardingStrategy>` of the forwarding strategy interface, which lists all default actions/events.
+ndnSIM through its integration with NFD provides simple ways to experiment with the custom
+Interest/Data forwarding strategies of NFD.
+
+A new forwarding strategy can be implement completely different processing or override just
+specific actions/events of the :nfd:`forwarding strategy interface <nfd::fw::Strategy>`.  NFD
+offers the maximum flexibility by allowing per-namespace selection of each specific forwarding
+strategy.
+
+Please refer to :nfd:`API documentation <nfd::fw::Strategy>` of the forwarding strategy
+interface, which lists all default actions/events. For a more detailed specification, you can
+read `NFD Developer's Guide
+<http://named-data.net/wp-content/uploads/2014/07/NFD-developer-guide.pdf>`_, section 5.
 
 Available forwarding strategies
 +++++++++++++++++++++++++++++++
 
-Basic forwarding strategies
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
++--------------------------------------------+----------------------------------------------------------------------------------------------+
+| Strategy Name                              | Description                                                                                  |
++============================================+==============================================================================================+
+| ``/localhost/nfd/strategy/best-route``     | :nfd:`Best Route Strategy <nfd::fw::BestRouteStrategy2>` **(default)**                       |
+|                                            |                                                                                              |
+|                                            | The best route strategy forwards an Interest to the                                          |
+|                                            | upstream with lowest routing cost.                                                           |
++--------------------------------------------+----------------------------------------------------------------------------------------------+
++--------------------------------------------+----------------------------------------------------------------------------------------------+
+| ``/localhost/nfd/strategy/ncc``            | :nfd:`NCC Strategy <nfd::fw::NccStrategy>`                                                   |
+|                                            |                                                                                              |
+|                                            | The NCC strategy is an reimplementation of CCNx 0.7.2                                        |
+|                                            | default strategy. It has similar algorithm but is not                                        |
+|                                            | guaranteed to be equivalent.                                                                 |
++--------------------------------------------+----------------------------------------------------------------------------------------------+
++--------------------------------------------+----------------------------------------------------------------------------------------------+
+| ``/localhost/nfd/strategy/broadcast``      |  :nfd:`Broadcast Strategy <nfd::fw::BroadcastStrategy>`                                      |
+|                                            |                                                                                              |
+|                                            |  The broadcast strategy forwards every Interest to all                                       |
+|                                            |  upstreams, indicated by the supplied FIB entry.                                             |
++--------------------------------------------+----------------------------------------------------------------------------------------------+
++--------------------------------------------+----------------------------------------------------------------------------------------------+
+| ``/localhost/nfd/strategy/client-control`` | :nfd:`Client Control Strategy <nfd::fw::ClientControlStrategy>`                              |
+|                                            |                                                                                              |
+|                                            | The client control strategy allows a local consumer                                          |
+|                                            | application to choose the outgoing face of each Interest.                                    |
++--------------------------------------------+----------------------------------------------------------------------------------------------+
 
-Flooding
-########
 
-Interests will be forwarded to all available faces available for a route (FIB entry).
-If there are no available GREEN or YELLOW faces, interests is dropped.
+.. note::
 
-Implementation name: :ndnsim:`ns3::ndn::fw::Flooding` (default)
+    ndnSIM 2.0 exactly like NFD allows different namespaces to be associated with different
+    forwarding strategies.  By default, the following forwarding strategy configuration is
+    defined:
 
-Usage example:
+    +--------------------+-----------------------------------------------+
+    | Namespace          | Strategy Name                                 |
+    +====================+===============================================+
+    | ``/``              | ``/localhost/nfd/strategy/best-route``        |
+    +--------------------+-----------------------------------------------+
+    | ``/localhost``     | ``/localhost/nfd/strategy/broadcast``         |
+    +--------------------+-----------------------------------------------+
+    | ``/localhost/nfd`` | ``/localhost/nfd/strategy/best-route``        |
+    +--------------------+-----------------------------------------------+
+    | ``/ndn/broadcast`` | ``/localhost/nfd/strategy/broadcast``         |
+    +--------------------+-----------------------------------------------+
+
+
+
+Examples:
 
       .. code-block:: c++
 
-         ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::Flooding");
-	 ...
-	 ndnHelper.Install (nodes);
-
-SmartFlooding
-#############
-
-If GREEN face is available, Interest will be sent to the highest-ranked GREEN face.
-If not, Interest will be forwarded to all available faces available for a route (FIB entry)/
-If there are no available GREEN or YELLOW faces, interests is dropped.
-
-Implementation name :ndnsim:`ns3::ndn::fw::SmartFlooding`
-
-Usage example:
-
-      .. code-block:: c++
-
-         ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::SmartFlooding");
-	 ...
-	 ndnHelper.Install (nodes);
-
-BestRoute
-#########
-
-If GREEN face is available, Interest will be sent to the highest-ranked GREEN face.
-If not, Interest will be forwarded to the highest-ranked YELLOW face.
-If there are no available GREEN or YELLOW faces, interests is dropped.
-
-Implementation name: :ndnsim:`ns3::ndn::fw::BestRoute`
-
-Usage example:
-
-      .. code-block:: c++
-
-         ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::BestRoute");
-	 ...
-	 ndnHelper.Install (nodes);
-
-Strategies with Interest limits
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The following strategies enforce different granularities of Interest limits.  Each strategy is an extension of the basic one (custom strategies can also be extended with limits, refer to the source code).
-
-Currently, ndnSIM implements two types of Interest limit enforcements, both based on a Token Bucket approach:
-
-   - :ndnsim:`ns3::ndn::Limits::Window` (default)
-
-        Interest token is borrowed when Interest is send out.  The token is returned only when Interest is satisfied or times out.
-
-   - :ndnsim:`ns3::ndn::Limits::Rate`
-
-        Interest token is borrowed when Interest is send out.  The token is returned periodically based on link capacity.
-
-In both cases, limit is set according to the following equation:
-
-.. math::
-
-    \mathrm{Interest\ Limit} = Delay\ [s] \cdot
-       \frac{\mathrm{Bandwidth\ [Bytes/s]}}
-       {\mathrm{Data\ packet\ size\ [Bytes]} + \mathrm{Interest\ packet\ size\ [Bytes]}}
-
-To configure packet sizes and delay parameters, use the following :ndnsim:`ndn::StackHelper` method:
-
-      .. code-block:: c++
-
-         // ndnHelper.EnableLimits (true, <delay>, <average interest packet size>, <average data packet size>);
-         ndnHelper.EnableLimits (true, Seconds (0.2), 40, 1100);
-	 ...
-	 ndnHelper.Install (nodes);
-
-Usage examples
-##############
-
-Per outgoing Face limits
-%%%%%%%%%%%%%%%%%%%%%%%%
-
-- :ndnsim:`ns3::ndn::fw::Flooding::PerOutFaceLimits`
-
-    With :ndnsim:`Limits::Window`:
-
-      .. code-block:: c++
-
-         ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::Flooding::PerOutFaceLimits"
-                                          "Limit", "ns3::ndn::Limits::Window");
-	 ...
-	 ndnHelper.Install (nodes);
-
-
-    With :ndnsim:`Limits::Rate`:
-
-      .. code-block:: c++
-
-         ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::Flooding::PerOutFaceLimits"
-                                          "Limit", "ns3::ndn::Limits::Rate");
-	 ...
-	 ndnHelper.Install (nodes);
-
-- :ndnsim:`ns3::ndn::fw::SmartFlooding::PerOutFaceLimits`
-
-    With :ndnsim:`Limits::Window`:
-
-      .. code-block:: c++
-
-         ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::SmartFlooding::PerOutFaceLimits"
-                                          "Limit", "ns3::ndn::Limits::Window");
-	 ...
-	 ndnHelper.Install (nodes);
-
-
-    With :ndnsim:`Limits::Rate`:
-
-      .. code-block:: c++
-
-         ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::SmartFlooding::PerOutFaceLimits"
-                                          "Limit", "ns3::ndn::Limits::Rate");
-	 ...
-	 ndnHelper.Install (nodes);
-
-- :ndnsim:`ns3::ndn::fw::BestRoute::PerOutFaceLimits`
-
-    With :ndnsim:`Limits::Window`:
-
-      .. code-block:: c++
-
-         ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::BestRoute::PerOutFaceLimits"
-                                          "Limit", "ns3::ndn::Limits::Window");
-	 ...
-	 ndnHelper.Install (nodes);
-
-
-    With :ndnsim:`Limits::Rate`:
-
-      .. code-block:: c++
-
-         ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::BestRoute::PerOutFaceLimits"
-                                          "Limit", "ns3::ndn::Limits::Rate");
-	 ...
-	 ndnHelper.Install (nodes);
-
-
-Per FIB entry, per outgoing face limits
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-- :ndnsim:`ns3::ndn::fw::Flooding::PerOutFaceLimits::PerFibLimits`
-
-    With :ndnsim:`Limits::Window`:
-
-      .. code-block:: c++
-
-         ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::Flooding::PerOutFaceLimits::PerFibLimits"
-                                          "Limit", "ns3::ndn::Limits::Window");
-	 ...
-	 ndnHelper.Install (nodes);
-
-
-    With :ndnsim:`Limits::Rate`:
-
-      .. code-block:: c++
-
-         ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::Flooding::PerOutFaceLimits::PerFibLimits"
-                                          "Limit", "ns3::ndn::Limits::Rate");
-	 ...
-	 ndnHelper.Install (nodes);
-
-- :ndnsim:`ns3::ndn::fw::SmartFlooding::PerOutFaceLimits::PerFibLimits`
-
-    With :ndnsim:`Limits::Window`:
-
-      .. code-block:: c++
-
-         ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::SmartFlooding::PerOutFaceLimits::PerFibLimits"
-                                          "Limit", "ns3::ndn::Limits::Window");
-	 ...
-	 ndnHelper.Install (nodes);
-
-
-    With :ndnsim:`Limits::Rate`:
-
-      .. code-block:: c++
-
-         ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::SmartFlooding::PerOutFaceLimits::PerFibLimits"
-                                          "Limit", "ns3::ndn::Limits::Rate");
-	 ...
-	 ndnHelper.Install (nodes);
-
-- :ndnsim:`ns3::ndn::fw::BestRoute::PerOutFaceLimits::PerFibLimits`
-
-    With :ndnsim:`Limits::Window`:
-
-      .. code-block:: c++
-
-         ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::BestRoute::PerOutFaceLimits::PerFibLimits"
-                                          "Limit", "ns3::ndn::Limits::Window");
-	 ...
-	 ndnHelper.Install (nodes);
-
-
-    With :ndnsim:`Limits::Rate`:
-
-      .. code-block:: c++
+         StrategyChoiceHelper::Install(nodes, prefix,
+                                       "/localhost/nfd/strategy/broadcast");
 
-         ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::BestRoute::PerOutFaceLimits::PerFibLimits"
-                                          "Limit", "ns3::ndn::Limits::Rate");
-	 ...
-	 ndnHelper.Install (nodes);
 
 .. _Writing your own custom strategy:
 
 Writing your own custom strategy
 ++++++++++++++++++++++++++++++++
 
-First step in creating your own strategy is to decide which existing strategy you want to extend.  You can either use realize :ndnsim:`forwarding strategy interface <ndn::ForwardingStrategy>` (:ndnsim:`ndn::ForwardingStrategy::DoPropagateInterest` call must be implemented) or extended one of the available forwarding strategies (:ndnsim:`fw::BestRoute` or :ndnsim:`fw::Flooding`).
-The following example assumes that we are realizing :ndnsim:`forwarding strategy interface <ndn::ForwardingStrategy>`.
+One of the objectives and features of ndnSIM 2.0 is that it uses NFD codebase for packet
+forwarding.  Therefore, writing strategy in ndnSIM is almost exactly the same process as
+outlined in `Section 5.3 of the NFD Developer's Guide
+<http://named-data.net/wp-content/uploads/2014/07/NFD-developer-guide.pdf>`_.
 
-The follwoing are template strategy h/cc files:
+The purpose of the strategy is to decides how to forward Interests and it is not intended to
+override any processing steps in the forwarding pipelines of NFD.  If it is desired to support
+a new packet type (other than Interest and Data), a new field in Interest or Data packets, or
+override some actions in the pipelines (e.g., disable ContentStore lookup), it can be
+accomplished by modification of the forwarding pipelines in :nfd:`nfd::Forwarder` class.
 
-.. literalinclude:: ../../examples/custom-strategies/custom-strategy.h
+The initial step in creating a new strategy is to create a class, say ``MyStrategy`` that is
+derived from :nfd:`nfd::fw::Strategy`. This subclass must at least override the triggers that are
+marked pure virtual and may override other available triggers that are marked just virtual.
+
+If the strategy needs to store information, it is needed to decide whether the information
+is related to a namespace or an Interest. Information related to a namespace but not
+specific to an Interest should be stored in Measurements entries; information related to an
+Interest should be stored in PIT entries, PIT downstream records, or PIT upstream records.
+After this decision is made, a data structure derived from StrategyInfo class needs to be
+declared. In the existing implementation, such data structures are declared as nested
+classes as it provides natural grouping and scope protection of the strategy-specific
+entity, but it is not required to follow the same model. If timers are needed, EventId
+fields needs to be added to such data structure(s).
+
+.. image:: _static/nfd-forwarding-overview.png
+    :alt: Packet processing in NFD/ndnSIM is broken into a number of small “pipelines” and
+          strategy callbacks
+
+The final step is to implement one or more of the triggers with the desired strategy logic.
+These triggers are listed below:
+
+- :nfd:`After Receive Interest Trigger <nfd::fw::Strategy::afterReceiveInterest()>`
+
+    When an Interest is received, passes necessary checks, and needs to be forwarded, Incoming
+    Interest pipeline (Section 4.2.1) invokes this trigger with the PIT entry, incoming Interest
+    packet, and FIB entry. At that time, the following conditions hold for the Interest:
+
+    - The Interest does not violate ``/localhost`` scope.
+    - The Interest is not looped.
+    - The Interest cannot be satisfied by ContentStore.
+    - The Interest is under a namespace managed by this strategy.
+
+    After being triggered, the strategy should decide whether and where to forward this
+    Interest. If the strategy decides to forward this Interest, it should invoke send Interest
+    action at least once. If the strategy concludes that this Interest cannot be forwarded, it
+    should invoke reject pending Interest action, so that the PIT entry will be deleted
+    shortly.
+
+- :nfd:`Before Satisfy Interest Trigger <nfd::fw::Strategy::beforeSatisfyInterest()>`
+
+    This method will be triggered just before the pending Interest is being satisfied.  It may
+    be useful override this method, e.g., to measure data plane performance.
+
+- :nfd:`Before Expire Interest Trigger <nfd::fw::Strategy::beforeExpirePendingInterest()>`
+
+    This method will be triggered just before the pending Interest is timed out.  Same as with
+    the before satisfy interest trigger, this method may be useful o measure data plane
+    performance.
+
+Example
+^^^^^^^
+
+The following code implements a random load balancing forwarding strategy. This strategy
+was created by Steve DiBenedetto and was found in one of his `GitHub repository
+<https://github.com/dibenede/ndn-tutorial-gec21>`_.
+
+.. literalinclude:: ../../examples/ndn-load-balancer/random-load-balancer-strategy.hpp
    :language: c++
    :linenos:
-   :lines: 1-36,51-55,59-
+   :lines: 26-
 
-.. literalinclude:: ../../examples/custom-strategies/custom-strategy.cc
+.. literalinclude:: ../../examples/ndn-load-balancer/random-load-balancer-strategy.cpp
    :language: c++
    :linenos:
-   :lines: 1-40,42-50,75-76,115-
-   :emphasize-lines: 21,27
+   :lines: 26-
 
-After having the template, we can fill the necesasry functionality.
+This forwarding strategy can be enabled for a specific name prefix when developing the
+simulation scenario as follows:
 
-Let us say, that we want Interest be forwarded to first two best-metric faces specified by FIB.
-That is, if node has two or more alternative paths to forward the Interests, this Interest will be forwarded to the best two neighbors.
-The following implementation of CustomStrategy::DoPropagateInterest accomplishes the task:
+      .. code-block:: c++
 
-.. literalinclude:: ../../examples/custom-strategies/custom-strategy.cc
-   :language: c++
-   :linenos:
-   :lines: 45-75
-   :emphasize-lines: 7-30
+         #include "random-load-balancer-strategy.hpp"
 
-After the compilation, you can use ``"ns3::ndn::fw::CustomStrategy"`` as a parameter to :ndnsim:`ndn::StackHelper::SetForwardingStrategy` helper method.
+         ...
 
- .. as well as NS_LOG=ndn.fw.CustomStrategy when running in a debug mode
-
-Extending strategy
-++++++++++++++++++
-
-If you need more customization for the forwarding strategy, there are many forwarding strategy events that can be overriden.
-For example, if we want to perform special logging of all forwarded, timed out, and satisfied Intersts, we can override the following events (for more events, refer to :ndnsim:`ForwardingStrategy API documentation <ForwardingStrategy>`):
-
-- :ndnsim:`DidSendOutInterest <ForwardingStrategy::DidSendOutInterest>`, which fired just after forwarding the Interest
-
-- :ndnsim:`WillEraseTimedOutPendingInterest <ForwardingStrategy::WillEraseTimedOutPendingInterest>`, which fired just before PIT entry is removed by timeout
-
-- :ndnsim:`WillSatisfyPendingInterest <ForwardingStrategy::WillSatisfyPendingInterest>`, which fired just before Interest will be satisfied.
-
-The highlighted ares of the following code demonstrates how it can be impelmented:
-
-.. literalinclude:: ../../examples/custom-strategies/custom-strategy.h
-   :language: c++
-   :linenos:
-   :emphasize-lines: 37-50,56-58
-
-.. literalinclude:: ../../examples/custom-strategies/custom-strategy.cc
-   :language: c++
-   :linenos:
-   :emphasize-lines: 41,77-114
-
+         StrategyChoiceHelper::Install<nfd::fw::RandomLoadBalancerStrategy>(nodes, prefix);
 
 Example of using custom strategy
-++++++++++++++++++++++++++++++++
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-Please refer to :ref:`this example <11-node 2-bottleneck topology with custom forwarding strategy>`.
-
+Please refer to :ref:`6-node topology with custom NFD forwarding strategy` .
diff --git a/docs/source/getting-started.rst b/docs/source/getting-started.rst
index 77c89e2..23ff20d 100644
--- a/docs/source/getting-started.rst
+++ b/docs/source/getting-started.rst
@@ -4,59 +4,46 @@
 Portability
 ------------
 
-ndnSIM has been successfully compiled and used under Ubuntu Linux 12.04 (boost libraries **1.48**, with default version 1.46 compilation will probably fail), 12.10 (default version of boost 1.49), 13.04 (default version of boost 1.49), Fedora 18, Mac OS 10.7 and 10.8 (gcc-4.2 apple/llvm, macports gcc 4.7, boost 1.49-1.54).
+ndnSIM has been successfully compiled and used under Ubuntu Linux 12.04 (only with boost
+libraries **1.48**), 14.04 (default version of boost), OS X 10.10 (Xcode 6.1.1, macports boost
+1.56-1.57).
 
 .. _requirements:
 
-Requirements
+Prerequisites
 -------------
 
-1. ndnSIM requires the customized version of NS-3 simulator (a number of patches required to make ndnSIM work with the latest development branch of NS-3).
-
-2. Boost libraries should be installed on the system:
-
-    * For Ubuntu
-
-        * 12.04
-
-            .. code-block:: bash
-
-                sudo aptitude install libboost1.48-all-dev
-
-        * 12.10, 13.04, and newer versions
-
-            .. code-block:: bash
-
-                sudo aptitude install libboost-all-dev
-
-    * For Fedora (for Fedora 18 and later only):
-
-        .. code-block:: bash
-
-            sudo yum install boost-devel
-
-    * For MacOS (macports):
-
-        .. code-block:: bash
-
-            sudo port instal boost
+1. `ndnSIM also required ndn-cxx library and all of its prerequisites
+   <http://named-data.net/doc/ndn-cxx/current/INSTALL.html>`_.
 
 .. role:: red
 
 .. note::
-   :red:`!!! ndnSIM requires boost version at least 1.48.`   Many linux distribution (Fedora 16, 17 at the time of this writing) ship an old version of boost, making it impossible to compile ndnSIM out-of-the-box.  Please install the latest version, following :ref:`these simple instructions <Installing boost libraries>`.
+   :red:`!!! ndn-cxx and ndnSIM requires boost version at least 1.48.` Many linux distribution
+   (Fedora 16, 17 at the time of this writing) ship an old version of boost, making it
+   impossible to compile ndnSIM out-of-the-box.  Please install the latest version, following
+   :ref:`these simple instructions <Installing boost libraries>`.
 
 .. note::
-   :red:`For Ubuntu 12.04`  Ubuntu 12.04 ships with two versions of boost libraries and it is known that if both are installed, then compilation of ndnSIM will most likely fail.  Please install ``libboost1.48-dev-all`` package and uninstall ``libboost-dev-all``.  If you want to install the latest version of boost libraries, then uninstall both ``libboost1.48-dev-all`` and ``libboost-dev-all``, so the libraries do not interfere with each other.
+   :red:`For Ubuntu 12.04` Ubuntu 12.04 ships with two versions of boost libraries and it is
+   known that if both are installed, then compilation of ndnSIM will most likely fail.  Please
+   install ``libboost1.48-dev-all`` package and uninstall ``libboost-dev-all``.  If you want to
+   install the latest version of boost libraries, then uninstall both ``libboost1.48-dev-all``
+   and ``libboost-dev-all``, so the libraries do not interfere with each other.
 
 .. note::
-   !!! If you do not have root permissions to install boost, you can install it in your home folder.  However, you need to be make sure that `libboost_iostreams` library is successfully compiled and is installed.  Please refer to :ref:`the following example <Installing boost libraries>` for the hints how to successfully compile and install boost libraries on Ubuntu Linux.
+   !!! If you do not have root permissions to install boost, you can install it in your home
+   folder.  However, you need to be make sure that `libboost_iostreams` library is successfully
+   compiled and is installed.  Please refer to :ref:`the following example <Installing boost
+   libraries>` for the hints how to successfully compile and install boost libraries on Ubuntu
+   Linux.
 
 
-3. If you are planning to use other modules, like visualizer, a number of additional dependencies should be installed.  For example, in
-order to run `visualizer`_ module, the following should be installed:
+2. If you are planning to use other modules, like visualizer, a number of additional
+dependencies should be installed.  For example, in order to run `visualizer`_ module, the
+following should be installed:
 
-   * For Ubuntu (tested on Ubuntu 12.04, 12.10, 13.04, should work on later versions as well):
+   * For Ubuntu (tested on Ubuntu 14.04, should work on later versions as well):
 
        .. code-block:: bash
 
@@ -81,106 +68,155 @@
 
            sudo port install  py27-pygraphviz py27-goocanvas
 
-.. py27-kiwi
+           # If you add NDN macports repository, as described in
+           # http://named-data.net/doc/NFD/current/INSTALL.html#install-nfd-using-the-ndn-macports-repository-on-os-x
+           # you will be able to install another useful python module
+           # sudo port install py27-kiwi
 
 .. _visualizer: http://www.nsnam.org/wiki/index.php/PyViz
 
 Downloading ndnSIM source
 -------------------------
 
-Download a custom branch of NS-3 that contains all necessary patches, python binding generation library (optional), and clone actual ndnSIM code and place it in src/ folder:
+ndnSIM package consists of three pieces:
+
+- `ndn-cxx library <http://named-data.net/doc/ndn-cxx/>`_
+- a custom branch of NS-3 that contains a few useful patches
+- a customized python binding generation library (necessary if you want to use NS-3's python
+  bindings and/or visualizer module)
+- the source code of ndnSIM module
+
+The following commands download all pieces from GitHub repositories:
 
 .. code-block:: bash
 
-	mkdir ndnSIM
-	cd ndnSIM
-	git clone git://github.com/cawka/ns-3-dev-ndnSIM.git ns-3
-	git clone git://github.com/cawka/pybindgen.git pybindgen
-	git clone git://github.com/NDN-Routing/ndnSIM.git ns-3/src/ndnSIM
+    mkdir ndnSIM
+    cd ndnSIM
+    git clone https://github.com/named-data/ndn-cxx.git ndn-cxx
+    git clone https://github.com/cawka/ns-3-dev-ndnSIM.git ns-3
+    git clone https://github.com/cawka/pybindgen.git pybindgen
+    git clone https://github.com/named-data/ndnSIM.git ns-3/src/ndnSIM
 
-There are quite a few modification to the base NS-3 code that are necessary to run ndnSIM, and the code is periodically synchronized with the official developer branch.  Eventually, all the changes will be merged to the official branch, but for the time being, it is necessary to use the customized branch.
+The few modification to the base NS-3 code are necessary to run ndnSIM, and the code is
+periodically synchronized with the official developer branch.  Eventually, all the changes will
+be merged to the official branch, but for the time being, it is necessary to use the customized
+branch.
 
-If you have problems connecting to github, you can try to clone from google servers:
-
-.. code-block:: bash
-
-        mkdir ndnSIM
-        cd ndnSIM
-        git clone https://code.google.com/p/ndnsim.ns3-base/ ns-3
-        git clone https://code.google.com/p/ndnsim.pybindgen/ pybindgen
-        git clone https://code.google.com/p/ndnsim/ ns-3/src/ndnSIM
 
 Compiling and running ndnSIM
 ----------------------------
 
-ndnSIM uses standard NS-3 compilation procedure.  Normally the following commands should be sufficient to configure and build ndnSIM with python bindings enabled:
+- Compile and install ndn-cxx library
 
-.. code-block:: bash
+    .. code-block:: bash
 
-	cd <ns-3-folder>
-	./waf configure --enable-examples
-	./waf
+        cd ndnSIM/ndn-cxx
+        ./waf configure
+        ./waf
+        sudo ./waf install
 
-On MacOS (with macports), you may need to modify the configure command to use macports version of python:
+    .. note::
+       On Ubuntu platform you can also install ndn-cxx library from `NDN
+       PPA repository <http://named-data.net/doc/NFD/current/INSTALL.html#installing-nfd-from-binaries>`_
 
-.. code-block:: bash
+       .. code-block:: bash
 
-	cd <ns-3-folder>
-	./waf configure --with-python=/opt/local/bin/python2.7 --enable-examples
-	./waf
+           sudo apt-get install ndn-cxx
 
-Python bindings is an optional and not very stable feature of NS-3 simulator.  It is possible to disable python bindings compilation either to speed up compilation or to avoid certain compilation errors (e.g., "Could not find a task generator for the name 'ns3-visualizer'"):
+- Compile NS-3 with ndnSIM module
 
-.. code-block:: bash
+    ndnSIM uses standard NS-3 compilation procedure.  Normally the following commands should be
+    sufficient to configure and build ndnSIM with python bindings enabled:
 
-	cd <ns-3-folder>
-	./waf configure --disable-python --enable-examples
-	./waf
+    .. code-block:: bash
 
-For more configuration options, please refer to ``./waf --help``.
+        cd <ns-3-folder>
+        ./waf configure --enable-examples
+        ./waf
 
-To run :doc:`sample ndnSIM simulations <examples>`:
+    On MacOS (with macports), you may need to modify the configure command to use macports
+    version of python:
 
-.. code-block:: bash
+    .. code-block:: bash
 
-	./waf --run=ndn-simple
+        cd <ns-3-folder>
+        ./waf configure --with-python=/opt/local/bin/python2.7 --enable-examples
+        # or run ``sudo port select python python27``
+        ./waf
 
-or:
+    Python bindings is an optional and not very stable feature of NS-3 simulator.  It is
+    possible to disable python bindings compilation either to speed up compilation or to avoid
+    certain compilation errors (e.g., "Could not find a task generator for the name
+    'ns3-visualizer'"):
 
-.. code-block:: bash
+    .. code-block:: bash
 
-	./waf --run=ndn-grid
+        cd <ns-3-folder>
+        ./waf configure --disable-python --enable-examples
+        ./waf
 
-If you have compiled with python bindings, then you can try to run these simulations with visualizer:
-
-.. code-block:: bash
-
-	./waf --run=ndn-simple --vis
-
-or:
-
-.. code-block:: bash
-
-	./waf --run=ndn-grid --vis
-
-.. note::
-   Do not forget to configure and compile NS-3 in optimized mode (``./waf configure -d optimized``) in order to run actual simulations.
-
+    For more configuration options, please refer to ``./waf --help``.
 
 Simulating using ndnSIM
 -----------------------
 
-While it is possible to write simulations directly inside NS-3 (in ``scratch/`` folder) or ndnSIM (in ``examples/``), the recommended way is to write your simulation scenarios, as well as any custom extensions, separately from the NS-3 or ndnSIM core.
+- Examples simulations
 
-For example, you can use the following template to write your extensions, simulation scenarios, and metric processing scripts: `<http://github.com/cawka/ndnSIM-scenario-template>`_:
+    When NS-3 is compiled with ``--with-examples`` flag, you can directly run all examples
+    described in :doc:`examples section of this tutorial <examples>`.  For example, to run
+    ``ndn-simple.cpp`` scenario, you can run the following command:
 
-.. code-block:: bash
+    .. code-block:: bash
 
-	mkdir ndnSIM
-	cd ndnSIM
-	git clone git://github.com/cawka/ns-3-dev-ndnSIM.git ns-3
-	git clone git://github.com/cawka/pybindgen.git pybindgen
-	git clone git://github.com/NDN-Routing/ndnSIM.git ns-3/src/ndnSIM
+        ./waf --run=ndn-simple
+
+    To run ``ndn-grid.cpp` scenario:
+
+    .. code-block:: bash
+
+        ./waf --run=ndn-grid
+
+    To run the sample simulation scenarios with the logging module of NS-3 enabled (note that
+    this will work only when NS-3 is compiled in debug mode):
+
+    .. code-block:: bash
+
+        NS_LOG=ndn.Producer:ndn.Consumer ./waf --run=<scenario name>
+
+    If you have compiled with python bindings, then you can try to run these simulations with
+    visualizer:
+
+    .. code-block:: bash
+
+        ./waf --run=ndn-simple --vis
+
+    or:
+
+    .. code-block:: bash
+
+        ./waf --run=ndn-grid --vis
+
+    .. note::
+       Do not forget to configure and compile NS-3 in optimized mode (``./waf configure -d
+       optimized``) in order to run actual simulations.
+
+- Real experimentation
+
+    While it is possible to write simulations directly inside NS-3 (in ``scratch/`` folder) or
+    ndnSIM (in ``examples/``), the recommended way is to write your simulation scenarios, as
+    well as any custom extensions, separately from the NS-3 or ndnSIM core.
+
+    For example, you can use the following template to write your extensions, simulation
+    scenarios, and metric processing scripts:
+    `<http://github.com/cawka/ndnSIM-scenario-template>`_:
+
+    .. code-block:: bash
+
+        mkdir ndnSIM
+        cd ndnSIM
+        git clone git://github.com/cawka/ns-3-dev-ndnSIM.git ns-3
+        git clone git://github.com/cawka/pybindgen.git pybindgen
+        git clone git://github.com/NDN-Routing/ndnSIM.git ns-3/src/ndnSIM
 
         # Build and install NS-3 and ndnSIM
         cd ns-3
@@ -199,7 +235,8 @@
 
         ./waf --run <scenario>
 
-For more detailed information, refer to `README file <https://github.com/cawka/ndnSIM-scenario-template/blob/master/README.md>`_.
+    For more detailed information, refer to `README file
+    <https://github.com/cawka/ndnSIM-scenario-template/blob/master/README.md>`_.
 
 Examples of template-based simulations
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -207,19 +244,19 @@
 1. ndnSIM examples from `<http://ndnsim.net>`_ website and more:
 
 - `<http://github.com/cawka/ndnSIM-examples>`_, or
-- `<http://code.google.com/p/ndnsim.ndnsim-examples/>`_
 
-2. Script scenarios and graph processing scripts for simulations used in "A Case for Stateful Forwarding Plane" paper by Yi et al. (`<http://dx.doi.org/10.1016/j.comcom.2013.01.005>`_):
+2. Script scenarios and graph processing scripts for simulations used in "A Case for Stateful
+   Forwarding Plane" paper by Yi et al. (`<http://dx.doi.org/10.1016/j.comcom.2013.01.005>`_):
 
 - `<http://github.com/cawka/ndnSIM-comcom-stateful-fw>`_, or
-- `<http://code.google.com/p/ndnsim.ndnsim-comcom/>`_
 
-3. Script scenarios and graph processing scripts for simulations used in "Rapid Traffic Information Dissemination Using Named Data" paper by Wang et al. (`<http://dx.doi.org/10.1145/2248361.2248365>`_):
+3. Script scenarios and graph processing scripts for simulations used in "Rapid Traffic
+   Information Dissemination Using Named Data" paper by Wang et
+   al. (`<http://dx.doi.org/10.1145/2248361.2248365>`_):
 
 - `<http://github.com/cawka/ndnSIM-nom-rapid-car2car>`_, or
-- `<http://code.google.com/p/ndnsim.ndnsim-nom-rapid/>`_
 
-- Rocketfuel-based topology generator for ndnSIM preferred format (randomly assigned link delays and bandwidth, based on estimated types of connections between nodes):
+- Rocketfuel-based topology generator for ndnSIM preferred format (randomly assigned link
+  delays and bandwidth, based on estimated types of connections between nodes):
 
 - `<http://github.com/cawka/ndnSIM-sample-topologies>`_, or
-- `<http://code.google.com/p/ndnsim.ndnsim-sample-topo/>`_
diff --git a/docs/source/helpers.rst b/docs/source/helpers.rst
index a1f88f8..91bcf4d 100644
--- a/docs/source/helpers.rst
+++ b/docs/source/helpers.rst
@@ -1,53 +1,83 @@
 ndnSIM helpers
 ==============
 
-Helpers are very important components of ndnSIM, especially for writing simulation scenarios.
-The following summarizes helpers and their basic usage.
+Helpers are very important components of ndnSIM, especially for writing simulation
+scenarios.  The following summarizes helpers and their basic usage.
 
-StackHelper
----------------
+NDN Stack Helpers
+-----------------
 
-:ndnsim:`StackHelper` is used to install ndnSIM network stack on requested nodes, as well to provide a simple way configure several important parameters of NDN simulation.
+:ndnsim:`StackHelper` is used to install ndnSIM network stack on requested nodes, as well
+        to provide a simple way configure several important parameters of NDN simulation.
 
 Example:
 
 .. code-block:: c++
 
-        ndn::StackHelper ndnHelper;
+        StackHelper ndnHelper;
         NodeContainer nodes;
         ...
-        ndnHelper.Install (nodes);
+        ndnHelper.Install(nodes);
 
 Routing
 +++++++
 
-All forwarding strategies require knowledge of where Interests can be forwarded (Forwarding Information Base).
-Unlike IP routing, this knowledge may be imprecise, but without such knowledge forwarding strategies will not be able to make any decision and will drop any Interests.
+All forwarding strategies require knowledge of where Interests can be forwarded
+(Forwarding Information Base).
 
 .. note::
-   By default, all nodes have empty FIB.  You need either to manually configure routes, use global routing controller, or (not recommended) enable default routes.
+   By default, all nodes have empty FIB.  You need either to manually configure routes,
+   use global routing controller, or (not recommended) enable default routes.
 
-Manually routes
-^^^^^^^^^^^^^^^
+Manually routes (FIB Helper)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-Routes can be configured manually using :ndnsim:`StackHelper::AddRoute` static methods of :ndnsim:`StackHelper`.
+The :ndnsim:`FIB helper <FibHelper>` interacts with the FIB manager of NFD by sending
+special Interest commands to the manager in order to add/remove a next hop from FIB
+entries or add routes to the FIB manually (manual configuration of FIB).
 
-These routes **should** be created **after** installing NDN stack on a node:
+Adding a route to the FIB manually:
 
-  .. code-block:: c++
+    .. code-block:: c++
 
-     ndnHelper.Install (nodes);
-     ...
-     Ptr<Node> node = ...     // FIB entry will be added to FIB on this node
-     std::string prefix = ... // some prefix
-     Ptr<ndn::Face> face = ... // NDN face that belongs to the node and through which prefix is accessible
-     int32_t metric = ...     // some routing metric
-     ndn::StackHelper::AddRoute (node, prefix, face, metric);
+       Ptr<Node> node = ...     // some node
+       std::string prefix = ... // some prefix
+       Ptr<ndn::Face> face = ... // NDN face that belongs to the node and through which prefix is accessible
+       int32_t metric = ...     // some routing metric
+       FibHelper::AddRoute(node, prefix, face, metric);
 
-Global routing controller
-^^^^^^^^^^^^^^^^^^^^^^^^^
+:ndnsim:`FIB helper <FibHelper>` has few other AddRoute overloads that may be easier to
+        use.  For example, when setting up manual routes between nodes connected with
+        PointToPointNetDevice's, it is simpler to use the overload that accepts two nodes
+        (face will be automatically determined by the helper).
 
-To simplify FIB management in large topologies, ndnSIM contains a global routing controller (:ndnsim:`helper <GlobalRoutingHelper>` and :ndnsim:`special interface <GlobalRouter>`), similar in spirit to ``Ipv4GlobalRoutingHelper``.
+.. @todo Implement RemoveRoute and add documentation about it
+
+..
+   Adding a next hop to a FIB entry (if any) that matches a given name prefix for a topology node:
+
+       .. code-block:: c++
+
+          Ptr<Node> node = .. // Get the desired node
+          FibHelper::AddRoute(parameters, node);
+
+..
+   Removing a next hop from a FIB entry (if any) that matches a given name prefix for a topology node:
+
+       .. code-block:: c++
+
+          Ptr<Node> node = // Get the desired node
+          nfd::ControlParameters parameters;
+          parameters.setName(prefix);
+          FibHelper::RemoveNextHop(parameters, node);
+
+
+Automatic Shortest Path Routes (Global Routing Helper)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+To simplify FIB management in large topologies, ndnSIM contains a global routing
+controller (:ndnsim:`helper <GlobalRoutingHelper>` and :ndnsim:`special interface
+<GlobalRouter>`), similar in spirit to ``Ipv4GlobalRoutingHelper``.
 
 There are several necessary steps, in order to take advantage of the global routing controller:
 
@@ -57,8 +87,8 @@
 
      NodeContainer nodes;
      ...
-     ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;
-     ndnGlobalRoutingHelper.Install (nodes);
+     GlobalRoutingHelper ndnGlobalRoutingHelper;
+     ndnGlobalRoutingHelper.Install(nodes);
 
 * specify which node exports which prefix using :ndnsim:`GlobalRoutingHelper::AddOrigins`
 
@@ -67,150 +97,98 @@
      Ptr<Node> producer; // producer node that exports prefix
      std::string prefix; // exported prefix
      ...
-     ndnGlobalRoutingHelper.AddOrigins (prefix, producer);
+     ndnGlobalRoutingHelper.AddOrigins(prefix, producer);
 
 * calculate and install FIBs on every node using :ndnsim:`GlobalRoutingHelper::CalculateRoutes`
 
    .. code-block:: c++
 
-     cdnGlobalRoutingHelper.CalculateRoutes ();
+     GlobalRoutingHelper::CalculateRoutes();
 
-Default routes
-^^^^^^^^^^^^^^
+Forwarding Strategy
++++++++++++++++++++
 
-In simple topologies, like in :doc:`examples <examples>`, or when
-simulating broadcast environment, it is possible to set up *default*
-FIB entries using :ndnsim:`StackHelper::SetDefaultRoutes` call.
-More specifically, every installed NDN stack will have a FIB entry to ``/`` prefix, containing all available faces.
+ndnSIM 2.0 exactly like NFD allows different namespaces to be associated with different
+forwarding strategies.  By default, the following forwarding strategy configuration is defined:
 
-The following should be done before installing stack on a node:
++--------------------+------------------------------+-----------------------------------------------+
+| Namespace          | Strategy                     | Strategy Name                                 |
++====================+==============================+===============================================+
+| ``/``              | :nfd:`fw::BestRouteStrategy` | ``/localhost/nfd/strategy/best-route``        |
++--------------------+------------------------------+-----------------------------------------------+
+| ``/localhost``     | :nfd:`fw::BroadcastStrategy` | ``/localhost/nfd/strategy/broadcast``         |
++--------------------+------------------------------+-----------------------------------------------+
+| ``/localhost/nfd`` | :nfd:`fw::BestRouteStrategy` | ``/localhost/nfd/strategy/best-route``        |
++--------------------+------------------------------+-----------------------------------------------+
+| ``/ndn/broadcast`` | :nfd:`fw::BroadcastStrategy` | ``/localhost/nfd/strategy/broadcast``         |
++--------------------+------------------------------+-----------------------------------------------+
 
-  .. code-block:: c++
 
-     ndnHelper.SetDefaultRoutes (true);
-     ...
-     ndnHelper.Install (nodes);
 
 
+The :ndnsim:`Strategy Choice helper <StrategyChoiceHelper>` interacts with the Strategy
+Choice manager of NFD by sending special Interest commands to the manager in order to
+specify the desired per-name prefix forwarding strategy for one, more or all the nodes of a topology.
+
+This helper should be used as follows:
+
+    .. code-block:: c++
+
+       StrategyChoiceHelper::Install(nodes, prefix, strategyName);
+
+or (for a forwarding strategy to be installed in all the topology nodes):
+
+    .. code-block:: c++
+
+       StrategyChoiceHelper::InstallAll(prefix, strategyName);
+
 Content Store
 +++++++++++++
 
-ndnSIM comes with several different in-memory :ndnsim:`content store <ndn::ContentStore>` implementations, featuring different cache replacement policies.
-
-To select a particular content store and configure its capacity, use :ndnsim:`SetContentStore <ndn::StackHelper::SetContentStore>` helper method:
+ndnSIM uses NFD's content store implementation, maximum size of which can be controlled using
+:ndnsim:`StackHelper::setCsSize()`:
 
       .. code-block:: c++
 
-         ndnHelper.SetContentStore ("<content store implementation>",
-                                    ["<optional parameter>", "<optional parameter's value>" [, ...]]);
-	 ...
-	 ndnHelper.Install (nodes);
+         ndnHelper.setCsSize(<max-size-in-packets>);
+         ...
+         ndnHelper.Install(nodes);
 
-In simulation scenarios it is possible to select one of :ref:`the existing implementations of the content store or implement your own <content store>`.
+.. note::
+
+    Unless specified in the simulation scenario, default maximum size of the content store is
+    100 Data packets.
+
+.. note::
+
+    NFD's content store implementation takes full consideration of Interest selectors, however
+    is not yet flexible when it comes to cache replacement policies.  Feature to extend CS
+    flexibility is currently in active development (refer to `Issue #2219 on NFD Redmine
+    <http://redmine.named-data.net/issues/2219>`_) and for the time being, we have ported the
+    old ndnSIM 1.0 content store implementations to the new code base.  These implementations
+    feature different cache replacement policies, but have very limited support for Interest
+    selectors.  If your scenario relies on proper selector processing, do not use these
+    implementations as the simulation results most likely be incorrect.
+
+    To select old content store implementations, use :ndnsim:`SetOldContentStore
+    <StackHelper::SetOldContentStore>` StackHelper method:
+
+          .. code-block:: c++
+
+             ndnHelper.SetOldContentStore("<content store implementation>",
+                                         ["<optional parameter>", "<optional parameter's value>" [, ...]]);
+             ...
+             ndnHelper.Install (nodes);
+
+    In simulation scenarios it is possible to select one of :ref:`the existing implementations
+    of the content store or implement your own <content store>`.
 
 
-Pending Interest Table
-++++++++++++++++++++++
+Application Helper
+------------------
 
-The current version of ndnSIM provides :ndnsim:`templated realizations <ndn::pit::PitImpl>` of :ndnsim:`PIT abstraction <ndn::Pit>`, allowing optional bounding the number of PIT entries and different replacement policies (i.e., perform different actions when limit on number of PIT entries is reached).
-
-To select a particular PIT implementation and configure its policies, use :ndnsim:`SetPit <ndn::StackHelper::SetPit>` helper method:
-
-- :ndnsim:`persistent <ndn::pit::Persistent>` (default):
-
-    New entries will be rejected if PIT size reached its limit
-
-      .. code-block:: c++
-
-         ndnHelper.SetPit ("ns3::ndn::pit::Persistent",
-                           "MaxSize", "0");
-	 ...
-	 ndnHelper.Install (nodes);
-
-- :ndnsim:`random <ndn::pit::Random>`:
-
-    when PIT reaches its limit, random entry (could be the newly created one) will be removed from PIT;
-
-      .. code-block:: c++
-
-         ndnHelper.SetPit ("ns3::ndn::pit::Random",
-                           "MaxSize", "0");
-	 ...
-	 ndnHelper.Install (nodes);
-
-- :ndnsim:`least-recently-used <ndn::pit::Lru>`:
-
-    the least recently used entry (the oldest entry with minimum number of incoming faces) will be removed when PIT size reached its limit.
-
-      .. code-block:: c++
-
-         ndnHelper.SetPit ("ns3::ndn::pit::Lru",
-                           "MaxSize", "0");
-	 ...
-	 ndnHelper.Install (nodes);
-
-Forwarding strategy
-+++++++++++++++++++
-
-A desired :ndnsim:`forwarding strategy <ForwardingStrategy>` parameter need to be set before installing stack on a node.
-
-To select a particular forwarding strategy implementation and configure its parameters, use :ndnsim:`SetForwardingStrategy <ndn::StackHelper::SetForwardingStrategy>` helper method:
-
-      .. code-block:: c++
-
-         ndnHelper.SetForwardingStrategy ("<forwarding strategy implementation>",
-                                          ["<optional parameter>", "<optional parameter's value>" [, ...]]);
-	 ...
-	 ndnHelper.Install (nodes);
-
-In simulation scenarios it is possible to select one of :ref:`the existing implementations of the forwarding strategy or implement your own <forwarding strategies>`.
-
-
-.. Currently, there are following forwarding strategies that can be used in simulations:
-
-..   - :ndnsim:`Flooding` (default)
-
-..       Interests will be forwarded to all available faces available for a route (FIB entry).
-..       If there are no available GREEN or YELLOW faces, interests is dropped.
-
-..       .. code-block:: c++
-
-..          ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::Flooding");
-.. 	 ...
-.. 	 ndnHelper.Install (nodes);
-
-
-..   - :ndnsim:`SmartFlooding`
-
-..       If GREEN face is available, Interest will be sent to the highest-ranked GREEN face.
-..       If not, Interest will be forwarded to all available faces available for a route (FIB entry)/
-..       If there are no available GREEN or YELLOW faces, interests is dropped.
-
-..       .. code-block:: c++
-
-..          ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::SmartFlooding");
-.. 	 ...
-.. 	 ndnHelper.Install (nodes);
-
-..   - :ndnsim:`BestRoute`
-
-..       If GREEN face is available, Interest will be sent to the highest-ranked GREEN face.
-..       If not, Interest will be forwarded to the highest-ranked YELLOW face.
-..       If there are no available GREEN or YELLOW faces, interests is dropped.
-
-..       .. code-block:: c++
-
-..          ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::BestRoute");
-.. 	 ...
-.. 	 ndnHelper.Install (nodes);
-
-
-
-
-AppHelper
----------------
-
-:ndnsim:`AppHelper` simplifies task of creating, configuring, and installing ndnSIM applications.
+:ndnsim:`AppHelper` simplifies task of creating, configuring, and installing ndnSIM
+applications.
 
 
 The basic usage of the :ndnsim:`AppHelper`:
@@ -220,20 +198,21 @@
    .. code-block:: c++
 
       // Create helper for the consumer generating Interests with constant rate
-      ndn::AppHelper consumerHelper ("ns3::ndn::ConsumerCbr");
+      AppHelper consumerHelper("ns3::ndn::ConsumerCbr");
 
-* Assign prefix on which application operates (either generating Interests using this name or satisfying Interests for this name) using :ndnsim:`AppHelper::SetPrefix`:
+* Assign prefix on which application operates (either generating Interests using this name
+  or satisfying Interests for this name) using :ndnsim:`AppHelper::SetPrefix`:
 
    .. code-block:: c++
 
-      consumerHelper.SetPrefix (prefix);
+      consumerHelper.SetPrefix(prefix);
 
 * Assign application-specific attributes using :ndnsim:`AppHelper::SetAttribute`:
 
    .. code-block:: c++
 
       // Set frequency parameter
-      consumerHelper.SetAttribute ("Frequency", StringValue ("10")); // 10 interests a second
+      consumerHelper.SetAttribute("Frequency", StringValue ("10")); // 10 interests a second
 
 * Install application on one or more nodes:
 
@@ -241,7 +220,29 @@
 
       NodeContainer nodes;
       ...
-      consumerHelper.Install (nodes)
+      consumerHelper.Install(nodes)
+
+.. _Link Control Helper:
+
+Link Control Helper
+-------------------
+
+Some scenarios require failing certain links between NDN nodes at certain times.  NS-3 does not
+provide ability to actually "break" the link between nodes.  However, it provides facility to
+set up a loss model to simulate packet drops in the channel.  Using the properly set up loss
+model on both sides of the point-to-point link, it is possible to emulate link breakage.
+
+To simplify these operations, ndnSIM includes :ndnsim:`ndn::LinkControlHelper` that allows
+scheduling of link failures and failure recoveries:
 
 
-In simulation scenarios it is possible to select one of :ref:`the existing applications or implement your own <applications>`.
+    .. code-block:: c++
+
+        #include "ns3/ndnSIM/helper/ndn-link-control-helper.hpp"
+
+        ...
+
+        Simulator::Schedule(Seconds(10.0), ndn::LinkControlHelper::FailLink, node1, node2);
+        Simulator::Schedule(Seconds(15.0), ndn::LinkControlHelper::UpLink, node1, node2);
+
+Usage of this helper is demonstrated in :ref:`Simple scenario with link failures`.
diff --git a/docs/source/intro.rst b/docs/source/intro.rst
index eb001fa..c152ad4 100644
--- a/docs/source/intro.rst
+++ b/docs/source/intro.rst
@@ -7,47 +7,69 @@
 
 .. sidebar:: ndnSIM components
 
-    .. image:: _static/ndnsim-components.*
+    .. image:: _static/ndnSIM-structure.*
         :width: 100%
 
-The ndnSIM is NS-3 module that implements Named Data Networking (NDN) communication model, the clean slate Internet design. ndnSIM is specially optimized for simulation purposes and has a cleaner and more extensible internal structure comparing to the existing NDN implementation (NDNx).
+ndnSIM 2.0 is a new release of `NS-3 based Named Data Networking (NDN) simulator
+<http://ndnsim.net/1.0/>`_ that went through extensive refactoring and rewriting.  The key
+new features of the new version:
 
-Following the NDN architecture, ndnSIM is implemented as a new network-layer protocol model, which can run on top of any available link-layer protocol model (point-to-point, CSMA, wireless, etc.).
+- ndnSIM no longer re-implements basic NDN primitives and directly uses implementation
+  from `ndn-cxx library (NDN C++ library with eXperimental eXtensions)
+  <http://named-data.net/doc/ndn-cxx/>`_.
+- All NDN forwarding and management is implemented directly using source code of `Named
+  Data Networking Forwarding Daemon (NFD) <http://named-data.net/doc/NFD/>`_
+- Packet format changed to `NDN-TLV <http://named-data.net/doc/ndn-tlv/>`_
 
 .. note::
-    It will also be possible to run ndnSIM on top of network-layer (IPv4, IPv6) and transport-layer (TCP, UDP) protocols.
-    However, it is not yet implemented and patches are welcome.
+   Please note that ndnSIM 2.0 has major refactoring and simulation scenario written for
+   previous releases most likely would need to be changed to run on ndnSIM 2.0 platform.
 
-.. This flexibility allows ndnSIM to simulate scenarios of various homogeneous and heterogeneous networks (e.g., NDN-only, NDN-over-IP, etc.).
+Such integration with ndn-cxx and NFD ensures that the simulations are maximally realistic
+and can be reproduced in real environments with virtually no changes to the source code.
+In addition to that, any experiments with NDN forwarding (e.g., custom forwarding
+strategies) inside ndnSIM can be directly used within the real NFD implementation.
 
-The simulator is implemented in a modular fashion, using separate C++ classes to model behavior of each network-layer entity in NDN: :ndnsim:`pending Interest table (PIT) <Pit>`, :ndnsim:`forwarding information base (FIB) <Fib>`, :ndnsim:`content store <ContentStore>`, :ndnsim:`network <NetDeviceFace>` and :ndnsim:`application <AppFace>` interfaces, :ndnsim:`Interest forwarding strategies <ForwardingStrategy>`, etc.
-This modular structure allows any component to be easily modified or replaced with no or minimal impact on other components.
-In addition, the simulator provides an extensive collection of interfaces and helpers to perform detailed tracing behavior of every component, as well as NDN traffic flow.
+Specifically, the simulator directly uses NFD implementations of :nfd:`pending Interest
+table (PIT) <nfd::Pit>`, :nfd:`forwarding information base (FIB) <nfd::Fib>`, and
+:nfd:`content store <nfd::Cs>` data structures.  In addition to that, ndnSIM allows
+experimentation with :ndnSIM:`ndnSIM-specific content store <ndn::ContentStore>` along
+with its cache replacement policies ported from the previous version of ndnSIM.
 
-The current wire format for the Interest and Data packets used by ndnSIM is defined in :ref:`ndnSIM packet format`.
-ndnSIM also has an option to be compatible to wire format used by `NDNx implementation <http://named-data.net/>`_ (NDNx binary XML encoding).  However currently, this option is deprecated, but can be reintroduced in the future as an optional wire format.
+ndnSIM is implemented as a new network-layer protocol model and can run on top of any
+available link-layer protocol model (point-to-point, CSMA, wireless, etc.).
+In addition, the simulator provides an extensive collection of interfaces and helpers to
+perform detailed tracing behavior of every component, as well as NDN traffic flow.
+
 
 More documentation
 ------------------
 
-Overall structure of ndnSIM is described in our `technical report <http://lasr.cs.ucla.edu/afanasyev/data/files/Afanasyev/ndnSIM-TR.pdf>`_.
+Overall structure of ndnSIM is described in our `technical report
+<http://lasr.cs.ucla.edu/afanasyev/data/files/Afanasyev/ndnSIM-TR.pdf>`_.
 
 `ndnSIM API documentation <doxygen/index.html>`_
 
-Also, you can `join our mailing list <http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>`_ to see and participate in discussions about ndnSIM implementation and simulations in general.   
-Do not forget to check mailling list `archives <http://www.lists.cs.ucla.edu/pipermail/ndnsim/>`_.  
+Also, you can `join our mailing list
+<http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>`_ to see and participate in
+discussions about ndnSIM implementation and simulations in general.  Do not forget to
+check mailling list `archives <http://www.lists.cs.ucla.edu/pipermail/ndnsim/>`_.
 
 
 Support
 -------
 
-The code of ndnSIM is in active development.  Bug reports (issues) as well as new feature implementation are always welcome. 
+The code of ndnSIM is in active development.  Bug reports (issues) as well as new feature
+implementation are always welcome.
 
-To file a bug report, please use `GitHub Issues <https://github.com/NDN-Routing/ndnSIM/issues>`_.
+To file a bug report, please use `NDN Redmine
+<http://redmine.named-data.net/projects/ndnsim>`_.
 
 To create new feature, please fork the code and submit Pull Request on GitHub.
 
-And of course, `our mailing list <http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>`_ is the best way to communicate with and get support from ndnSIM team and other users of ndnSIM.
+And of course, `our mailing list <http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>`_
+is the best way to communicate with and get support from ndnSIM team and other users of
+ndnSIM.
 
 A very short guide to the code
 ------------------------------
@@ -58,36 +80,50 @@
 | Folder          | Description                                                         |
 +=================+=====================================================================+
 | ``model/``      | implementation of NDN base: :ndnsim:`L3Protocol`, faces             |
-|                 | (:ndnsim:`Face`, :ndnsim:`NetDeviceFace`, forwarding                |
+|                 | (:ndnsim:`Face`, :ndnsim:`NetDeviceFace`,                           |
 |                 | :ndnsim:`AppFace`),                                                 |
-|                 | strategies (:ndnsim:`ForwardingStrategy`,                           |
-|                 | :ndnsim:`Flooding`, :ndnsim:`SmartFlooding`, :ndnsim:`BestRoute`),  |
 |                 | etc.                                                                |
 +-----------------+---------------------------------------------------------------------+
+| ``NFD/``        | contains the `NFD`_ source code with few modifications to make it   |
+|                 | compatible with the simulator                                       |
++-----------------+---------------------------------------------------------------------+
 | ``apps/``       | applications (in NS-3 sense) that can be installed on the nodes.    |
 |                 | Right now we have one producer (:ndnsim:`Producer`) and a           |
-|                 | collection  of consumer (:ndnsim:`ConsumerCbr`,                     |
-|                 | :ndnsim:`ConsumerWindow`,                                           |
-|                 | :ndnsim:`ConsumerBatches`).  See doxygen documentation or           |
+|                 | collection  of consumer applications (:ndnsim:`ConsumerCbr`,        |
+|                 | :ndnsim:`ConsumerWindow`, :ndnsim:`ConsumerBatches`,                |
+|                 | :ndnsim:`ConsumerZipfMandelbrot`).  See doxygen documentation or    |
 |                 | source  code for details                                            |
 +-----------------+---------------------------------------------------------------------+
+| ``utils/``      | helper classes, including implementation of generalized data        |
+|                 | structures, topology readers and tracers                            |
++-----------------+---------------------------------------------------------------------+
 | ``helper/``     | a number of :doc:`useful helpers <helpers>`                         |
 +-----------------+---------------------------------------------------------------------+
 | ``examples/``   | contain :doc:`several example scenarios <examples>`                 |
 +-----------------+---------------------------------------------------------------------+
-| ``utils/``      | helper classes, including implementation of generalized data        |
-|                 | structures                                                          |
-+-----------------+---------------------------------------------------------------------+
-| ``plugins/``    | a number of plugins that may be helpful to run simulation scenarios |
-+-----------------+---------------------------------------------------------------------+
+
+.. _NFD: http://named-data.net/doc/NFD/
 
 Logging
 -------
 
-Almost every component in ndnSIM exports logging interface, so in debug compilation it is possible to track many internal details. 
-For example, logging of :ndnsim:`Face` and :ndnsim:`Consumer` shows everything what happens in :ndnsim:`Face` and :ndnsim:`Consumer` classes::
+Almost every component in ndnSIM exports logging interface, so in debug compilation it is
+possible to track many internal details.  For example, logging of :ndnsim:`Face` and
+:ndnsim:`Consumer` shows everything what happens in :ndnsim:`Face` and :ndnsim:`Consumer`
+classes::
 
     NS_LOG=ndn.Face:ndn.Consumer ./waf --run=ndn-simple
 
-Refer to the source code and NS-3 documentation to see what logging interfaces are available and about details how enable one or more logging interfaces.
+Refer to the source code and NS-3 documentation to see what logging interfaces are
+available and about details how enable one or more logging interfaces.
 
+.. note::
+
+   Please remember that logging is enabled **only** in debug mode.  When simulator is
+   compiled in optimized mode (``./waf configure -d optimized``), logging will be
+   completely disabled as it significantly slows down execution.
+
+.. note::
+
+   A list of log components available in the current version of NS-3 and ndnSIM is listed
+   `in this page <doxygen/LogComponentList.html>`_.
diff --git a/docs/source/meta/bugs.rst b/docs/source/meta/bugs.rst
index 0b50a4c..85912b5 100644
--- a/docs/source/meta/bugs.rst
+++ b/docs/source/meta/bugs.rst
@@ -4,6 +4,6 @@
 Reporting bugs
 ==============
 
-To file a bug report, please use `GitHub Issues <https://github.com/NDN-Routing/ndnSIM/issues>`_ or `NDN Redmine <http://redmine.named-data.net/projects/ndnsim>`_.
+To file a bug report, please use `NDN Redmine <http://redmine.named-data.net/projects/ndnsim>`_.
 
 To create new feature, please fork the code and submit Pull Request on GitHub.
diff --git a/docs/source/meta/copyright.rst b/docs/source/meta/copyright.rst
index 20429d5..6a19d5c 100644
--- a/docs/source/meta/copyright.rst
+++ b/docs/source/meta/copyright.rst
@@ -4,9 +4,11 @@
 
 ndnSIM and this documentation is:
 
-Copyright © 2011-2013 University of California, Los Angeles
+Copyright © 2011-2015 University of California, Los Angeles
 
-Copyright © 2011-2013 Alexander Afanasyev
+Copyright © 2011-2015 Alexander Afanasyev
+
+Copyright © 2014-2015 Spyridon Mastorakis
 
 -------
 
diff --git a/docs/source/meta/license.rst b/docs/source/meta/license.rst
index 5f1087d..ae1718a 100644
--- a/docs/source/meta/license.rst
+++ b/docs/source/meta/license.rst
@@ -4,316 +4,560 @@
 License information
 ===================
 
-Most parts of ndnSIM code are licensed under GNU GPL License 2.0.
+Most parts of ndnSIM code are licensed under GNU GPL License 3.0.
 
 GNU GENERAL PUBLIC LICENSE
---------------------------
+==========================
 
-Version 2, June 1991
+Version 3, 29 June 2007
+=======================
 
-::
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
+    Copyright (C) 2007 Free Software Foundation, Inc. http://fsf.org/ Everyone is permitted to copy
+    and distribute verbatim copies of this license document, but changing it is not allowed.
 
 Preamble
-^^^^^^^^
+========
 
-The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.)  You can apply it to
-your programs, too.
+The GNU General Public License is a free, copyleft license for software and other kinds of works.
 
-When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
+The licenses for most software and other practical works are designed to take away your freedom to
+share and change the works. By contrast, the GNU General Public License is intended to guarantee
+your freedom to share and change all versions of a program--to make sure it remains free software
+for all its users. We, the Free Software Foundation, use the GNU General Public License for most of
+our software; it applies also to any other work released this way by its authors. You can apply it
+to your programs, too.
 
-To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
+When we speak of free software, we are referring to freedom, not price. Our General Public Licenses
+are designed to make sure that you have the freedom to distribute copies of free software (and
+charge for them if you wish), that you receive source code or can get it if you want it, that you
+can change the software or use pieces of it in new free programs, and that you know you can do these
+things.
 
-For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
+To protect your rights, we need to prevent others from denying you these rights or asking you to
+surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the
+software, or if you modify it: responsibilities to respect the freedom of others.
 
-We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
+For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass
+on to the recipients the same freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they know their rights.
 
-Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
+Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the
+software, and (2) offer you this License giving you legal permission to copy, distribute and/or
+modify it.
 
-Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
+For the developers' and authors' protection, the GPL clearly explains that there is no warranty for
+this free software. For both users' and authors' sake, the GPL requires that modified versions be
+marked as changed, so that their problems will not be attributed erroneously to authors of previous
+versions.
 
-The precise terms and conditions for copying, distribution and
-modification follow.
+Some devices are designed to deny users access to install or run modified versions of the software
+inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the
+area of products for individuals to use, which is precisely where it is most unacceptable.
+Therefore, we have designed this version of the GPL to prohibit the practice for those products. If
+such problems arise substantially in other domains, we stand ready to extend this provision to those
+domains in future versions of the GPL, as needed to protect the freedom of users.
 
-GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Finally, every program is threatened constantly by software patents. States should not allow patents
+to restrict development and use of software on general-purpose computers, but in those that do, we
+wish to avoid the special danger that patents applied to a free program could make it effectively
+proprietary. To prevent this, the GPL assures that patents cannot be used to render the program
+non-free.
 
-0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
+The precise terms and conditions for copying, distribution and modification follow.
 
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
+TERMS AND CONDITIONS
+====================
 
-1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
+0. Definitions.
+---------------
 
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
+*"This License"* refers to version 3 of the GNU General Public License.
 
-2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
+*"Copyright"* also means copyright-like laws that apply to other kinds of works, such as
+semiconductor masks.
 
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
+*"The Program"* refers to any copyrightable work licensed under this License. Each licensee is
+addressed as *"you"*. *"Licensees"* and "recipients" may be individuals or organizations.
 
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
+To *"modify"* a work means to copy from or adapt all or part of the work in a fashion requiring
+copyright permission, other than the making of an exact copy. The resulting work is called a
+*"modified version"* of the earlier work or a work *"based on"* the earlier work.
 
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
+A *"covered work"* means either the unmodified Program or a work based on the Program.
 
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
+To *"propagate"* a work means to do anything with it that, without permission, would make you
+directly or secondarily liable for infringement under applicable copyright law, except executing it
+on a computer or modifying a private copy. Propagation includes copying, distribution (with or
+without modification), making available to the public, and in some countries other activities as
+well.
 
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
+To *"convey"* a work means any kind of propagation that enables other parties to make or receive
+copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not
+conveying.
 
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
+An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a
+convenient and prominently visible feature that (1) displays an appropriate copyright notice, and
+(2) tells the user that there is no warranty for the work (except to the extent that warranties are
+provided), that licensees may convey the work under this License, and how to view a copy of this
+License. If the interface presents a list of user commands or options, such as a menu, a prominent
+item in the list meets this criterion.
 
-3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
+1. Source Code.
+---------------
 
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
+The *"source code"* for a work means the preferred form of the work for making modifications to it.
+*"Object code"* means any non-source form of a work.
 
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
+A *"Standard Interface"* means an interface that either is an official standard defined by a
+recognized standards body, or, in the case of interfaces specified for a particular programming
+language, one that is widely used among developers working in that language.
 
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
+The *"System Libraries"* of an executable work include anything, other than the work as a whole,
+that (a) is included in the normal form of packaging a Major Component, but which is not part of
+that Major Component, and (b) serves only to enable use of the work with that Major Component, or to
+implement a Standard Interface for which an implementation is available to the public in source code
+form. A "Major Component", in this context, means a major essential component (kernel, window
+system, and so on) of the specific operating system (if any) on which the executable work runs, or a
+compiler used to produce the work, or an object code interpreter used to run it.
 
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
+The *"Corresponding Source"* for a work in object code form means all the source code needed to
+generate, install, and (for an executable work) run the object code and to modify the work,
+including scripts to control those activities. However, it does not include the work's System
+Libraries, or general-purpose tools or generally available free programs which are used unmodified
+in performing those activities but which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for the work, and the source code
+for shared libraries and dynamically linked subprograms that the work is specifically designed to
+require, such as by intimate data communication or control flow between those subprograms and other
+parts of the work.
 
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
+The Corresponding Source need not include anything that users can regenerate automatically from
+other parts of the Corresponding Source.
 
-4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
+The Corresponding Source for a work in source code form is that same work.
 
-5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
+2. Basic Permissions.
+---------------------
 
-6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
+All rights granted under this License are granted for the term of copyright on the Program, and are
+irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a covered work is covered by this
+License only if the output, given its content, constitutes a covered work. This License acknowledges
+your rights of fair use or other equivalent, as provided by copyright law.
 
-7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
+You may make, run and propagate covered works that you do not convey, without conditions so long as
+your license otherwise remains in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you with facilities for running
+those works, provided that you comply with the terms of this License in conveying all material for
+which you do not control copyright. Those thus making or running the covered works for you must do
+so exclusively on your behalf, under your direction and control, on terms that prohibit them from
+making any copies of your copyrighted material outside their relationship with you.
 
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
+Conveying under any other circumstances is permitted solely under the conditions stated below.
+Sublicensing is not allowed; section 10 makes it unnecessary.
 
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
+3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+--------------------------------------------------------------
 
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
+No covered work shall be deemed part of an effective technological measure under any applicable law
+fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such measures.
 
-8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
+When you convey a covered work, you waive any legal power to forbid circumvention of technological
+measures to the extent such circumvention is effected by exercising rights under this License with
+respect to the covered work, and you disclaim any intention to limit operation or modification of
+the work as a means of enforcing, against the work's users, your or third parties' legal rights to
+forbid circumvention of technological measures.
 
-9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
+4. Conveying Verbatim Copies.
+-----------------------------
 
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
+You may convey verbatim copies of the Program's source code as you receive it, in any medium,
+provided that you conspicuously and appropriately publish on each copy an appropriate copyright
+notice; keep intact all notices stating that this License and any non-permissive terms added in
+accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and
+give all recipients a copy of this License along with the Program.
+
+You may charge any price or no price for each copy that you convey, and you may offer support or
+warranty protection for a fee.
+
+5. Conveying Modified Source Versions.
+--------------------------------------
+
+You may convey a work based on the Program, or the modifications to produce it from the Program, in
+the form of source code under the terms of section 4, provided that you also meet all of these
+conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+A compilation of a covered work with other separate and independent works, which are not by their
+nature extensions of the covered work, and which are not combined with it such as to form a larger
+program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the
+compilation and its resulting copyright are not used to limit the access or legal rights of the
+compilation's users beyond what the individual works permit. Inclusion of a covered work in an
+aggregate does not cause this License to apply to the other parts of the aggregate.
+
+6. Conveying Non-Source Forms.
+------------------------------
+
+You may convey a covered work in object code form under the terms of sections 4 and 5, provided that
+you also convey the machine-readable Corresponding Source under the terms of this License, in one of
+these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+A separable portion of the object code, whose source code is excluded from the Corresponding Source
+as a System Library, need not be included in conveying the object code work.
+
+A *"User Product"* is either (1) a *"consumer product"*, which means any tangible personal property
+which is normally used for personal, family, or household purposes, or (2) anything designed or sold
+for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful
+cases shall be resolved in favor of coverage. For a particular product received by a particular
+user, "normally used" refers to a typical or common use of that class of product, regardless of the
+status of the particular user or of the way in which the particular user actually uses, or expects
+or is expected to use, the product. A product is a consumer product regardless of whether the
+product has substantial commercial, industrial or non-consumer uses, unless such uses represent the
+only significant mode of use of the product.
+
+*"Installation Information"* for a User Product means any methods, procedures, authorization keys,
+or other information required to install and execute modified versions of a covered work in that
+User Product from a modified version of its Corresponding Source. The information must suffice to
+ensure that the continued functioning of the modified object code is in no case prevented or
+interfered with solely because modification has been made.
+
+If you convey an object code work under this section in, or with, or specifically for use in, a User
+Product, and the conveying occurs as part of a transaction in which the right of possession and use
+of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of
+how the transaction is characterized), the Corresponding Source conveyed under this section must be
+accompanied by the Installation Information. But this requirement does not apply if neither you nor
+any third party retains the ability to install modified object code on the User Product (for
+example, the work has been installed in ROM).
+
+The requirement to provide Installation Information does not include a requirement to continue to
+provide support service, warranty, or updates for a work that has been modified or installed by the
+recipient, or for the User Product in which it has been modified or installed. Access to a network
+may be denied when the modification itself materially and adversely affects the operation of the
+network or violates the rules and protocols for communication across the network.
+
+Corresponding Source conveyed, and Installation Information provided, in accord with this section
+must be in a format that is publicly documented (and with an implementation available to the public
+in source code form), and must require no special password or key for unpacking, reading or copying.
+
+7. Additional Terms.
+--------------------
+
+*"Additional permissions"* are terms that supplement the terms of this License by making exceptions
+from one or more of its conditions. Additional permissions that are applicable to the entire Program
+shall be treated as though they were included in this License, to the extent that they are valid
+under applicable law. If additional permissions apply only to part of the Program, that part may be
+used separately under those permissions, but the entire Program remains governed by this License
+without regard to the additional permissions.
+
+When you convey a copy of a covered work, you may at your option remove any additional permissions
+from that copy, or from any part of it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place additional permissions on
+material, added by you to a covered work, for which you have or can give appropriate copyright
+permission.
+
+Notwithstanding any other provision of this License, for material you add to a covered work, you may
+(if authorized by the copyright holders of that material) supplement the terms of this License with
+terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+All other non-permissive additional terms are considered "further restrictions" within the meaning
+of section 10. If the Program as you received it, or any part of it, contains a notice stating that
+it is governed by this License along with a term that is a further restriction, you may remove that
+term. If a license document contains a further restriction but permits relicensing or conveying
+under this License, you may add to a covered work material governed by the terms of that license
+document, provided that the further restriction does not survive such relicensing or conveying.
+
+If you add terms to a covered work in accord with this section, you must place, in the relevant
+source files, a statement of the additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+Additional terms, permissive or non-permissive, may be stated in the form of a separately written
+license, or stated as exceptions; the above requirements apply either way.
+
+8. Termination.
+---------------
+
+You may not propagate or modify a covered work except as expressly provided under this License. Any
+attempt otherwise to propagate or modify it is void, and will automatically terminate your rights
+under this License (including any patent licenses granted under the third paragraph of section 11).
+
+However, if you cease all violation of this License, then your license from a particular copyright
+holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder fails to notify you of the
+violation by some reasonable means prior to 60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is reinstated permanently if the copyright
+holder notifies you of the violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that copyright holder, and you cure
+the violation prior to 30 days after your receipt of the notice.
+
+Termination of your rights under this section does not terminate the licenses of parties who have
+received copies or rights from you under this License. If your rights have been terminated and not
+permanently reinstated, you do not qualify to receive new licenses for the same material under
+section 10.
+
+9. Acceptance Not Required for Having Copies.
+---------------------------------------------
+
+You are not required to accept this License in order to receive or run a copy of the Program.
+Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer
+transmission to receive a copy likewise does not require acceptance. However, nothing other than
+this License grants you permission to propagate or modify any covered work. These actions infringe
+copyright if you do not accept this License. Therefore, by modifying or propagating a covered work,
+you indicate your acceptance of this License to do so.
+
+10. Automatic Licensing of Downstream Recipients.
+-------------------------------------------------
+
+Each time you convey a covered work, the recipient automatically receives a license from the
+original licensors, to run, modify and propagate that work, subject to this License. You are not
+responsible for enforcing compliance by third parties with this License.
+
+An *"entity transaction"* is a transaction transferring control of an organization, or substantially
+all assets of one, or subdividing an organization, or merging organizations. If propagation of a
+covered work results from an entity transaction, each party to that transaction who receives a copy
+of the work also receives whatever licenses to the work the party's predecessor in interest had or
+could give under the previous paragraph, plus a right to possession of the Corresponding Source of
+the work from the predecessor in interest, if the predecessor has it or can get it with reasonable
+efforts.
+
+You may not impose any further restrictions on the exercise of the rights granted or affirmed under
+this License. For example, you may not impose a license fee, royalty, or other charge for exercise
+of rights granted under this License, and you may not initiate litigation (including a cross-claim
+or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling,
+offering for sale, or importing the Program or any portion of it.
+
+11. Patents.
+------------
+
+A *"contributor"* is a copyright holder who authorizes use under this License of the Program or a
+work on which the Program is based. The work thus licensed is called the contributor's "contributor
+version".
+
+A contributor's *"essential patent claims"* are all patent claims owned or controlled by the
+contributor, whether already acquired or hereafter acquired, that would be infringed by some manner,
+permitted by this License, of making, using, or selling its contributor version, but do not include
+claims that would be infringed only as a consequence of further modification of the contributor
+version. For purposes of this definition, "control" includes the right to grant patent sublicenses
+in a manner consistent with the requirements of this License.
+
+Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the
+contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run,
+modify and propagate the contents of its contributor version.
+
+In the following three paragraphs, a "patent license" is any express agreement or commitment,
+however denominated, not to enforce a patent (such as an express permission to practice a patent or
+covenant not to sue for patent infringement). To "grant" such a patent license to a party means to
+make such an agreement or commitment not to enforce a patent against the party.
+
+If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of
+the work is not available for anyone to copy, free of charge and under the terms of this License,
+through a publicly available network server or other readily accessible means, then you must either
+(1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the
+benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with
+the requirements of this License, to extend the patent license to downstream recipients. "Knowingly
+relying" means you have actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work in a country, would infringe
+one or more identifiable patents in that country that you have reason to believe are valid.
+
+If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate
+by procuring conveyance of, a covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of
+the covered work, then the patent license you grant is automatically extended to all recipients of
+the covered work and works based on it.
+
+A patent license is "discriminatory" if it does not include within the scope of its coverage,
+prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that
+are specifically granted under this License. You may not convey a covered work if you are a party to
+an arrangement with a third party that is in the business of distributing software, under which you
+make payment to the third party based on the extent of your activity of conveying the work, and
+under which the third party grants, to any of the parties who would receive the covered work from
+you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by
+you (or copies made from those copies), or (b) primarily for and in connection with specific
+products or compilations that contain the covered work, unless you entered into that arrangement, or
+that patent license was granted, prior to 28 March 2007.
+
+Nothing in this License shall be construed as excluding or limiting any implied license or other
+defenses to infringement that may otherwise be available to you under applicable patent law.
+
+12. No Surrender of Others' Freedom.
+------------------------------------
+
+If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict
+the conditions of this License, they do not excuse you from the conditions of this License. If you
+cannot convey a covered work so as to satisfy simultaneously your obligations under this License and
+any other pertinent obligations, then as a consequence you may not convey it at all. For example, if
+you agree to terms that obligate you to collect a royalty for further conveying from those to whom
+you convey the Program, the only way you could satisfy both those terms and this License would be to
+refrain entirely from conveying the Program.
+
+13. Use with the GNU Affero General Public License.
+---------------------------------------------------
+
+Notwithstanding any other provision of this License, you have permission to link or combine any
+covered work with a work licensed under version 3 of the GNU Affero General Public License into a
+single combined work, and to convey the resulting work. The terms of this License will continue to
+apply to the part which is the covered work, but the special requirements of the GNU Affero General
+Public License, section 13, concerning interaction through a network will apply to the combination
+as such.
+
+14. Revised Versions of this License.
+-------------------------------------
+
+The Free Software Foundation may publish revised and/or new versions of the GNU General Public
+License from time to time. Such new versions will be similar in spirit to the present version, but
+may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program specifies that a certain
+numbered version of the GNU General Public License "or any later version" applies to it, you have
+the option of following the terms and conditions either of that numbered version or of any later
+version published by the Free Software Foundation. If the Program does not specify a version number
+of the GNU General Public License, you may choose any version ever published by the Free Software
 Foundation.
 
-10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
+If the Program specifies that a proxy can decide which future versions of the GNU General Public
+License can be used, that proxy's public statement of acceptance of a version permanently authorizes
+you to choose that version for the Program.
 
-NO WARRANTY
-+++++++++++
+Later license versions may give you additional or different permissions. However, no additional
+obligations are imposed on any author or copyright holder as a result of your choosing to follow a
+later version.
 
-11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
+15. Disclaimer of Warranty.
+---------------------------
 
-12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
+THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS"
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO
+THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU
+ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
 
-END OF TERMS AND CONDITIONS
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
+16. Limitation of Liability.
+----------------------------
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR
+ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
+DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
+OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH
+ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+17. Interpretation of Sections 15 and 16.
+-----------------------------------------
+
+If the disclaimer of warranty and limitation of liability provided above cannot be given local legal
+effect according to their terms, reviewing courts shall apply local law that most closely
+approximates an absolute waiver of all civil liability in connection with the Program, unless a
+warranty or assumption of liability accompanies a copy of the Program in return for a fee.
+
+# END OF TERMS AND CONDITIONS
+-----------------------------
 
 How to Apply These Terms to Your New Programs
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+=============================================
 
-If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
+If you develop a new program, and you want it to be of the greatest possible use to the public, the
+best way to achieve this is to make it free software which everyone can redistribute and change
+under these terms.
 
-To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
+To do so, attach the following notices to the program. It is safest to attach them to the start of
+each source file to most effectively state the exclusion of warranty; and each file should have at
+least the "copyright" line and a pointer to where the full notice is found.
 
 ::
 
     <one line to give the program's name and a brief idea of what it does.>
     Copyright (C) <year>  <name of author>
 
-    This program is free software; you can redistribute it and/or modify
+    This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
+    the Free Software Foundation, either version 3 of the License, or
     (at your option) any later version.
 
     This program is distributed in the hope that it will be useful,
@@ -321,41 +565,31 @@
     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.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 Also add information on how to contact you by electronic and paper mail.
 
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
+If the program does terminal interaction, make it output a short notice like this when it starts in
+an interactive mode:
 
 ::
 
-    Gnomovision version 69, Copyright (C) year name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
     This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
+    under certain conditions; type 'show c' for details.
 
-The hypothetical commands ``show w`` and ``show c`` should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than ``show w`` and ``show c``; they could even be
-mouse-clicks or menu items--whatever suits your program.
+The hypothetical commands *'show w'* and *'show c'* should show the appropriate parts of the General
+Public License. Of course, your program's commands might be different; for a GUI interface, you
+would use an "about box".
 
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
+You should also get your employer (if you work as a programmer) or school, if any, to sign a
+"copyright disclaimer" for the program, if necessary. For more information on this, and how to apply
+and follow the GNU GPL, see http://www.gnu.org/licenses/.
 
-::
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
+The GNU General Public License does not permit incorporating your program into proprietary programs.
+If your program is a subroutine library, you may consider it more useful to permit linking
+proprietary applications with the library. If this is what you want to do, use the GNU Lesser
+General Public License instead of this License. But first, please read
+http://www.gnu.org/philosophy/why-not-lgpl.html.
diff --git a/docs/source/metric.rst b/docs/source/metric.rst
index a5b2667..2476d43 100644
--- a/docs/source/metric.rst
+++ b/docs/source/metric.rst
@@ -11,55 +11,6 @@
 Packet-level trace helpers
 --------------------------
 
-- :ndnsim:`ndn::L3AggregateTracer`
-
-    Tracing the aggregate number of Interests/Data packets forwarded by an NDN node
-
-    The following example enables tracing on all simulation nodes:
-
-    .. code-block:: c++
-
-        // the following should be put just before calling Simulator::Run in the scenario
-
-        ndn::L3AggregateTracer::InstallAll ("aggregate-trace.txt", Seconds (1.0));
-
-        Simulator::Run ();
-
-        ...
-
-
-    Output file format is tab-separated values, with first row specifying names of the columns.  Refer to the following table for the description of the columns:
-
-    +------------------+---------------------------------------------------------------------+
-    | Column           | Description                                                         |
-    +==================+=====================================================================+
-    | ``Time``         | simulation time                                                     |
-    +------------------+---------------------------------------------------------------------+
-    | ``Node``         | node id, globally unique                                            |
-    +------------------+---------------------------------------------------------------------+
-    | ``FaceId``       | interface ID (-1 for combined metric)                               |
-    +------------------+---------------------------------------------------------------------+
-    | ``Type``         | Type of measurements:                                               |
-    |                  |                                                                     |
-    |                  | - ``InInterests``  measurements of incoming Interests               |
-    |                  | - ``OutInterests``  measurements of outgoing Interests              |
-    |                  | - ``DropInterests``  measurements of dropped Interests              |
-    |                  | - ``InData``  measurements of incoming Data                         |
-    |                  | - ``OutData``  measurements of outgoing Data                        |
-    |                  | - ``DropData``  measurements of dropped Data                        |
-    |                  | - ``InNacks``  measurements of incoming NACKs                       |
-    |                  | - ``OutNacks``  measurements of outgoing NACKs                      |
-    |                  | - ``DropNacks``  measurements of dropped NACKs                      |
-    |                  | - ``SatisfiedInterests`` measurements of satisfied Interests        |
-    |                  | - ``TimedOutInterests`` measurements of timed out Interests         |
-    +------------------+---------------------------------------------------------------------+
-    | ``Packets``      | absolute number of packets within last averaging period             |
-    |                  | (number of packets).                                                |
-    +------------------+---------------------------------------------------------------------+
-    | ``Kilobytes``    | absolute number of kilobytes transferred within the last averaging  |
-    |                  | period  (number of packets).                                        |
-    +------------------+---------------------------------------------------------------------+
-
 - :ndnsim:`ndn::L3RateTracer`
 
     Tracing the rate in bytes and in number of packets of Interest/Data packets forwarded by an NDN node
@@ -70,9 +21,9 @@
 
         // the following should be put just before calling Simulator::Run in the scenario
 
-        ndn::L3RateTracer::InstallAll ("rate-trace.txt", Seconds (1.0));
+        L3RateTracer::InstallAll("rate-trace.txt", Seconds(1.0));
 
-        Simulator::Run ();
+        Simulator::Run();
 
         ...
 
@@ -91,21 +42,20 @@
     |                  |                                                                     |
     |                  | - ``InInterests``  measurements of incoming Interests               |
     |                  | - ``OutInterests``  measurements of outgoing Interests              |
-    |                  | - ``DropInterests``  measurements of dropped Interests              |
     |                  | - ``InData``  measurements of incoming Data                         |
     |                  | - ``OutData``  measurements of outgoing Data                        |
-    |                  | - ``DropData``  measurements of dropped Data                        |
-    |                  | - ``InNacks``  measurements of incoming NACKs                       |
-    |                  | - ``OutNacks``  measurements of outgoing NACKs                      |
-    |                  | - ``DropNacks``  measurements of dropped NACKs                      |
+    |                  | - ``SatisfiedInterests`` measurements of satisfied Interests        |
+    |                  |   (totals for all faces)                                            |
+    |                  | - ``TimedOutInterests`` measurements of timed out Interests         |
+    |                  |   (totals for all faces)                                            |
     |                  | - ``InSatisfiedInterests`` measurements of incoming satisfied       |
-    |                  |   Interests                                                         |
+    |                  |   Interests (per incoming face)                                     |
     |                  | - ``InTimedOutInterests`` measurements of incoming timed out        |
-    |                  |   Interests                                                         |
+    |                  |   Interests (per incoming face)                                     |
     |                  | - ``OutSatisfiedInterests`` measurements of outgoing satisfied      |
-    |                  |   Interests                                                         |
+    |                  |   Interests (per outgoing face)                                     |
     |                  | - ``OutTimedOutInterests`` measurements of outgoing satisfied       |
-    |                  |   Interests                                                         |
+    |                  |   Interests (per outgoing face)                                     |
     +------------------+---------------------------------------------------------------------+
     | ``Packets``      | estimated rate (EWMA average) of packets within the last averaging  |
     |                  | period (number of packets/s).                                       |
@@ -131,9 +81,9 @@
 
         // the following should be put just before calling Simulator::Run in the scenario
 
-        L2RateTracer::InstallAll ("drop-trace.txt", Seconds (0.5));
+        L2RateTracer::InstallAll("drop-trace.txt", Seconds(0.5));
 
-        Simulator::Run ();
+        Simulator::Run();
 
         ...
 
@@ -175,7 +125,7 @@
 Example of packet-level trace helpers
 +++++++++++++++++++++++++++++++++++++
 
-This example (``ndn-tree-tracers.cc``) demonstrates basic usage of :ref:`trace classes`.
+This example (``ndn-tree-tracers.cpp``) demonstrates basic usage of :ref:`trace classes`.
 
 In this scenario we will use a tree-like topology, where consumers are installed on leaf nodes and producer is in the root of the tree:
 
@@ -215,33 +165,34 @@
     :linenos:
     :lines: 1-2,27-
 
-Example simulation (``ndn-tree-tracers.cc``) scenario that utilizes trace helpers:
+Example simulation (``ndn-tree-tracers.cpp``) scenario that utilizes trace helpers:
 
-.. literalinclude:: ../../examples/ndn-tree-tracers.cc
+.. literalinclude:: ../../examples/ndn-tree-tracers.cpp
     :language: c++
     :linenos:
-    :lines: 21-28,61-
-    :emphasize-lines: 57-58
+    :lines: 20-27,60-
+    :emphasize-lines: 58
 
 To run this scenario, use the following command::
 
         ./waf --run=ndn-tree-tracers
 
-The successful run will create ``rate-trace.txt`` and ``aggregate-trace.txt`` files in the current directly, which can be analyzed manually or used as input to some graph/stats packages.
+The successful run will create ``rate-trace.txt`` files in the current directly, which can be analyzed manually or used as input to some graph/stats packages.
 
 .. sidebar:: Graph build using the `R script <http://www.r-project.org/>`_
 
     .. image:: _static/root-rates.png
         :alt: Interest/Data packet rates at the root node
 
-    .. image:: _static/root-5sec-counts.png
-        :alt: Interest/Data packet counts at the root node in 5-second intervals
-
 .. literalinclude:: ../../examples/graphs/rate-graph.R
     :language: r
     :linenos:
 
-For more information about R and ggplot2, please refer to `R language manual <http://cran.r-project.org/manuals.html>`_, `ggplot2 module manual <http://docs.ggplot2.org/current/>`_.
+For more information about R and ggplot2, please refer to `R language manual <http://cran.r-project.org/manuals.html>`_ and `ggplot2 module manual <http://docs.ggplot2.org/current/>`_.
+
+    ::
+
+        Rscript src/ndnSIM/examples/graphs/rate-graph.R
 
 .. _Example of packet drop tracer (L2Tracer):
 
@@ -254,7 +205,7 @@
         :alt: 25-node tree topology
         :width: 550px
 
-This example (``ndn-tree-with-l2tracer.cc``) demonstrates basic usage of :ref:`trace classes`.
+This example (``ndn-tree-with-l2tracer.cpp``) demonstrates basic usage of :ref:`trace classes`.
 
 The corresponding topology file (``topo-tree-25-node.txt``):
 
@@ -263,13 +214,13 @@
     :linenos:
     :lines: 2-
 
-Example simulation (``ndn-tree-with-l2tracer.cc``) scenario that utilizes trace helpers:
+Example simulation (``ndn-tree-with-l2tracer.cpp``) scenario that utilizes trace helpers:
 
-.. literalinclude:: ../../examples/ndn-tree-with-l2tracer.cc
+.. literalinclude:: ../../examples/ndn-tree-with-l2tracer.cpp
     :language: c++
     :linenos:
-    :lines: 1-
-    :emphasize-lines: 16,135
+    :lines: 20-
+    :emphasize-lines: 16,134
 
 To run this scenario, use the following command::
 
@@ -283,6 +234,10 @@
     :language: r
     :linenos:
 
+Run R script::
+
+    Rscript src/ndnSIM/examples/graphs/drop-graph.R
+
 .. image:: _static/l2-rate-tracer.png
    :alt: Packet drop rates on routers
 
@@ -291,6 +246,8 @@
 Content store trace helper
 --------------------------
 
+NOTE: This tracer works ONLY when the content store structure of ndnSIM is used!
+
 - :ndnsim:`ndn::CsTracer`
 
     With the use of :ndnsim:`ndn::CsTracer` it is possible to obtain statistics of cache hits/cache misses on simulation nodes.
@@ -301,9 +258,9 @@
 
         // the following should be put just before calling Simulator::Run in the scenario
 
-        ndn::CsTracer::InstallAll ("cs-trace.txt", Seconds (1));
+        CsTracer::InstallAll("cs-trace.txt", Seconds(1));
 
-        Simulator::Run ();
+        Simulator::Run();
 
         ...
 
@@ -317,18 +274,18 @@
 Example of content store trace helper
 +++++++++++++++++++++++++++++++++++++
 
-This example (``ndn-tree-cs-tracers.cc``) demonstrates basic usage of content store tracer.
+This example (``ndn-tree-cs-tracers.cpp``) demonstrates basic usage of content store tracer.
 
 In this scenario we will use the same tree-like topology as in :ref:`previous example <packet trace helper example>`, where consumers are installed on leaf nodes and producer is in the root of the tree.
 The main difference is that each client request data from the same namespace: /root/1, /root/2, ...  Another small difference is that in this scenario we start our application not at the same time, but 10 ms apart.
 
-Example simulation (``ndn-tree-cs-tracers.cc``) scenario that utilizes trace helpers:
+Example simulation (``ndn-tree-cs-tracers.cpp``) scenario that utilizes trace helpers:
 
-.. literalinclude:: ../../examples/ndn-tree-cs-tracers.cc
+.. literalinclude:: ../../examples/ndn-tree-cs-tracers.cpp
     :language: c++
     :linenos:
-    :lines: 21-28,61-
-    :emphasize-lines: 59
+    :lines: 20-27,60-
+    :emphasize-lines: 61
 
 
 To run this scenario, use the following command::
@@ -351,9 +308,9 @@
 
         // the following should be put just before calling Simulator::Run in the scenario
 
-        ndn::AppDelayTracer::InstallAll ("app-delays-trace.txt");
+        AppDelayTracer::InstallAll("app-delays-trace.txt");
 
-        Simulator::Run ();
+        Simulator::Run();
 
         ...
 
@@ -384,14 +341,8 @@
     +-----------------+---------------------------------------------------------------------+
     | ``RetxCount``   | number of Interest retransmissions (for LastDelay always equal to 1)|
     +-----------------+---------------------------------------------------------------------+
-    | ``HopCount``    | combined number of number of hops for Interest and Data packet.     |
-    |                 | Note that HopCount is increased anytime somebody calls Send method  |
-    |                 | on a face, including delivery of Interest/Data to application via   |
-    |                 | an AppFace (but not from application to ndn::L3Protocol!).          |
-    |                 |                                                                     |
-    |                 | One consequence is that Interests satisfied by an app will have     |
-    |                 | even hop count (min hop count = 2), and Interests satisfied from    |
-    |                 | caches will have odd hop count (min hop count = 1)                  |
+    | ``HopCount``    | the number of hops that the retrieved Data packet traveled on the   |
+    |                 | way back from producer application or cache.                        |
     +-----------------+---------------------------------------------------------------------+
 
 .. _app delay trace helper example:
@@ -399,42 +350,22 @@
 Example of application-level trace helper
 +++++++++++++++++++++++++++++++++++++++++
 
-This example (``ndn-tree-app-delay-tracer.cc``) demonstrates basic usage of application-level Interest-Data delay tracer.
+This example (``ndn-tree-app-delay-tracer.cpp``) demonstrates basic usage of application-level Interest-Data delay tracer.
 
 In this scenario we will use the same tree-like topology as in :ref:`packet trace helper example <packet trace helper example>`, where consumers are installed on leaf nodes and producer is in the root of the tree and clients request data from the same namespace: /root/1, /root/2, ...
 
-Example simulation (``ndn-tree-app-delay-tracer.cc``) scenario that utilizes trace helpers:
+Example simulation (``ndn-tree-app-delay-tracer.cpp``) scenario that utilizes trace helpers:
 
-.. literalinclude:: ../../examples/ndn-tree-app-delay-tracer.cc
+.. literalinclude:: ../../examples/ndn-tree-app-delay-tracer.cpp
     :language: c++
     :linenos:
-    :lines: 21-28,61-
-    :emphasize-lines: 59
-
+    :lines: 20-27,60-
+    :emphasize-lines: 60
 
 To run this scenario, use the following command::
 
         ./waf --run=ndn-tree-app-delay-tracer
 
-The successful run will create ``app-delays-trace.txt``, which similarly to trace file from the :ref:`packet trace helper example <packet trace helper example>` can be analyzed manually or used as input to some graph/stats packages.
-
-
-Other types of stats
---------------------
-
-.. _periodic tracing of Pending Interest Table (PIT) size:
-
-Periodic tracing of Pending Interest Table (PIT) size
-+++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-This example (``ndn-simple-with-pit-count-stats.cc``) shows how you can periodically print out current size of PIT on the selected nodes.
-
-.. literalinclude:: ../../examples/ndn-simple-with-pit-count-stats.cc
-    :language: c++
-    :linenos:
-    :lines: 20-26,47-
-    :emphasize-lines: 9-20,43-46,59-61
-
-To run this scenario, use the following command::
-
-        ./waf --run=ndn-simple-with-pit-count-stats
+The successful run will create ``app-delays-trace.txt``, which similarly to trace file from the
+:ref:`packet trace helper example <packet trace helper example>` can be analyzed manually or used as
+input to some graph/stats packages.
diff --git a/docs/source/ndnsim-packet-formats.rst b/docs/source/ndnsim-packet-formats.rst
deleted file mode 100644
index 666eca0..0000000
--- a/docs/source/ndnsim-packet-formats.rst
+++ /dev/null
@@ -1,389 +0,0 @@
-.. _ndnSIM packet format:
-
-ndnSIM packet format
-====================
-
-Basic field types
-+++++++++++++++++
-
-::
-
-	uint8_t ::= 8-bit unsigned integer
-
-	uint16_t ::= 16-bit unsigned integer
-
-	uint32_t ::= 32-bit unsigned integer
-
-	CHAR ::= 8-bit binary data
-
-	Blob ::= Length CHAR{Length}
-
-	Length ::= uint16_t
-
-NDN Packet Type
-+++++++++++++++
-
-::
-
-	Packet ::= Version 
-		   PacketType
-                   Length
-		   (Interest | ContentObject)
-
-        0                   1                   2                   3
-        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        |    Version    |   PacketType  |            Length             |
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
-For ccnb-encoding compatibility, ``Version`` / ``PacketType`` has two reserved values to denote ccnb-encoded packet:
-
-Version 0x01, PacketType 0xD2 --- ccnb-encoded ``Interest`` packet
-Version 0x04, PacketType 0x82 --- ccnb-encoded ``ContentObject`` packet
-
-
-Version
-~~~~~~~
-
-::
-
-	Version ::= uint8_t 
-
-The current version of the packet format.  Right only value 0x80 is allowed.
-
-PacketType
-~~~~~~~~~~
-
-::
-
-	PacketType ::= uint8_t  
-
-In the current version, two packet types are defined:
-
-- ``Interest`` (``PacketType`` = 0)
-- ``ContentObject`` (``PacketType`` = 1)
-
-Any other value of PacketType is invalid and such a packet should be discarded.
-
-Interest
-++++++++
-
-The objective of the new format is to optimize encoding/decoding operations.
-
-::
-
-	Interest ::= Nonce 
-	     	     Scope
-                     NackType
-		     InterestLifetime 
-	     	     Name 
-	     	     Selectors 
-	     	     Options
-
-Minumum size of the Interest packet: 1 + 4 + 2 + 1 + (2 + 0) + (2 + 0) + (2 + 0) = 14
-
-Maximum size of the Interest packet: 1 + 4 + 2 + 1 + (2 + 65535) + (2 + 65535) + (2 + 65535) = 196619
-
-::
-
-        0                   1                   2                   3
-        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        |                          Nonce                                |
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        |     Scope     |   NackType    |      InterestLifetime         |
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        |            Length             |                               |
-	|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
-        ~                                                               ~
-        ~                            Name                               ~
-        |							        |	
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        |            Length             |                               |
-	|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
-        ~                                                               ~
-        ~                          Selectors                            ~
-        |							        |	
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        |            Length             |                               |
-	|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
-        ~                                                               ~
-        ~                          Options                              ~
-        |							        |	
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
-
-Nonce
-~~~~~
-
-::
-
-	Nonce ::= uint32_t
-
-NackType
-~~~~~~~~
-
-::
-
-	NackType := uint8_t
-
-Currently, ndnSIM defines following NackTypes:
-
-- 0: NORMAL_INTEREST
-- 10: NACK_LOOP
-- 11: NACK_CONGESTION
-- 12: NACK_GIVEUP_PIT
-
-Values 128-255 are reserved for any application-specific and experimental purposes.
-
-
-InterestLifetime
-~~~~~~~~~~~~~~~~
-
-::
-
-	InterestLifetime := uint16_t 
-
-Interest lifetime is specified in seconds.  Max value is about 18 hours.
-
-Scope
-~~~~~
-
-::
-
-	Scope ::= uint8_t 
-
-Scope 0 prevents propagation beyond the local ccnd (even to other applications on the same host). Scope 1 limits propagation to the applications on the originating host. Scope 2 limits propagation to no further than the next host.
-
-Name
-~~~~
-
-::
-
-	Name ::= Length (NameComponent)*
-
-	NameComponent ::= Blob
-
-
-Selectors
-~~~~~~~~~
-
-::
-
-	Selectors ::= Length (SelectorType Selector)*
-
-        SelectorType ::= uint8_t
-
-	Selector ::= MinSuffixComponents | MaxSuffixComponents | Publisher | Exclude | ChildSelector | AnswerOriginKind
-
-Currently, ndnSIM defines following SelectorTypes:
-
-- 0x01: Exclude
-
-Other types are currently undefined
-
-Exclude
-~~~~~~~
-
-::
-
-	Exclude ::= Length (ExcludeComponent)*
-
-        ExcludeComponent ::= ExcludeNameType NameComponent ExcludeAnyType? |
-                             ExcludeAnyType
-
-        ExcludeNameType ::= uint8_t  (==0x01)
-
-        ExcludeAnyType ::= uint8_t   (==0x02)
-
-Options
-~~~~~~~
-
-::
-
-	Options ::= Length (Option)*
-
-
-.. .................................................................................................. ..
-.. .................................................................................................. ..
-.. .................................................................................................. ..
-.. .................................................................................................. ..
-
-
-ContentObject
-+++++++++++++
-
-::
-
-	ContentObject ::= Name
-                   	  Content
-                          Signature
-
-::
-
-        0                   1                   2                   3
-        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        |            Length             |                               |
-	|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
-        ~                                                               ~
-        ~                             Name                              ~
-        |							        |	
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        |            Length             |                               |
-	|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
-        ~                                                               ~
-        ~                           Content                             ~
-        |							        |	
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        |            Length             |                               |
-	|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
-        ~                                                               ~
-        ~                           Signature                           ~
-        |							        |	
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
-
-Signature
-~~~~~~~~~
-
-::
-
-	Signature ::= Length 
-		      SignatureType
-		      <type-dependeds signature data>
-
-Length specifies cumulative size of SignatureInfo and SignatureBits.  If SignatureType is not recognized, the received can either discard the packet or ignore the signature using Length field, specified combined length of SignatureType and SignatureType-dependent fields.
-
-::
-
-        0                   1                   2                   3
-        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        |           Length              |         SignatureType         |
-	|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        ~                                                               ~
-        ~               <type-dependeds signature data>                 ~
-        |							        |	
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
-
-SignatureType
-^^^^^^^^^^^^^
-
-::
-
-	SignatureType ::= uint16_t
-
-The current version specifies three type of signatures:
-
-- 0x0000: empty signature
-- 0x0001: SHA256 (not a real signature, but just a digest of the content)
-- 0x0002: SHA256withRSA (real public-key signature based on SHA-256 digest)
-
-Other values may be defined in future.
-
-- Values greater or equal to 0xFF00 are for experimental purposes (e.g., for simulations)
-
-<type-dependeds signature data>
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-+-------------------+---------------------------+
-| SignatureType     |  SignatureData definition |
-+===================+===========================+
-| 0 (empty)         |  empty sequence           |
-+-------------------+---------------------------+
-| 1 (sha256)        |  CHAR{32}                 |
-+-------------------+---------------------------+
-| 2 (SHA256withRSA) |  CHAR{32} KeyLocator      |
-+-------------------+---------------------------+
-
-KeyLocator
-^^^^^^^^^^
-
-::
-
-	KeyLocator ::= CertName
-		       
-	CertName ::= Name
-
-
-Content
-^^^^^^^
-
-::
-
-	Content ::= Length
-		    ContentInfo
-		    ContentData
-
-Content length can be computed as:  Length - (1 - ContentInfo.Length)
-
-::
-
-        0                   1                   2                   3
-        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        |            Length             |       Length (content Info)   |
-	|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        |                           Timestamp                           |
-	|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        |           Freshness           |           Reserved            |
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        |  Length (ContentInfoOptions)  |                               |
-	|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
-        ~                                                               ~
-        ~                       ContentInfoOptions                      ~
-        |							        |	
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-        ~                                                               ~
-        ~                         ContentData                           ~
-        |							        |	
-        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
-
-ContentInfo
-^^^^^^^^^^^
-
-::
-
-	ContentInfo ::= Length 
-			Timestamp
-			Freshness
-			ContentOptions
-
-Timestamp
-~~~~~~~~~
-
-::
-
-	Timestamp ::= uint32_t
-
-Timestamp specifies content generation time as Unix time timestamp (number of seconds since midnight 1/1/1970).
-
-Freshness
-~~~~~~~~~
-
-::
-
-	Freshness ::= uint16_t
-
-Freshness specifies time in seconds (since Timestamp) for which the content is considered valid.  
-
-Value 0xFFFF means that content is always valid.
-
-
-ContentOptions
-~~~~~~~~~~~~~~
-
-::
-
-	ContentOptions ::= Length
-			   ContentOption*
-
-	ContentOption ::= Type |
-			  FinalBlockID
-
-
-Not currently defined
-
diff --git a/docs/source/new-packet-formats.rst b/docs/source/new-packet-formats.rst
deleted file mode 100644
index 52bb816..0000000
--- a/docs/source/new-packet-formats.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-.. toctree::
-   :maxdepth: 4
-
-   ndnsim-packet-formats
diff --git a/docs/source/tutorial.rst b/docs/source/tutorial.rst
index 088f15d..ac809c1 100644
--- a/docs/source/tutorial.rst
+++ b/docs/source/tutorial.rst
@@ -3,9 +3,15 @@
 Welcome
 =======
 
-The ndnSIM is NS-3 module that implements Named Data Networking (NDN) communication model, the clean slate Internet design. ndnSIM is specially optimized for simulation purposes and has a cleaner and more extensible internal structure comparing to the existing NDN implementation (NDNx).
+The ndnSIM 2.0 is NS-3 module that implements Named Data Networking (NDN) communication
+model, the clean slate Internet design. ndnSIM is specially optimized for simulation
+purposes and has a cleaner and more extensible internal structure comparing to the
+existing NDN implementation (NDNx).
 
-We invite you to `join our mailing list <http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>`_ to see and participate in discussions about ndnSIM implementation and simulations in general (`mailing list archives <http://www.lists.cs.ucla.edu/pipermail/ndnsim/>`_).
+We invite you to `join our mailing list
+<http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim>`_ to see and participate in
+discussions about ndnSIM implementation and simulations in general (`mailing list archives
+<http://www.lists.cs.ucla.edu/pipermail/ndnsim/>`_).
 
 Contents:
 
@@ -24,7 +30,6 @@
 
     examples
     metric
-    ndnsim-packet-formats
     faq
     ndnsim-research-papers
 
@@ -32,7 +37,6 @@
     :hidden:
     :glob:
 
-    new-packet-formats
     meta/*