Adding more documentation stuff
diff --git a/docs/source/applications.rst b/docs/source/applications.rst
index 9fe1f5e..75b67ea 100644
--- a/docs/source/applications.rst
+++ b/docs/source/applications.rst
@@ -108,7 +108,7 @@
 
   Amount of data to be requested (will stop issuing Interests after ``Size`` data is received)
 
-  If ```Size`` is set to -1, Interests will be requested till the end of the simulation.
+  If ``Size`` is set to -1, Interests will be requested till the end of the simulation.
 
 CcnxProducer
 ^^^^^^^^^^^^
@@ -124,13 +124,109 @@
 Custom applications
 +++++++++++++++++++
 
-Applications interact with the core of the system using AppFace realization of Face abstraction. 
-To simplify implementation of specific NDN application, ndnSIM provides a base CcnxApp class that takes care of creating CcnxAppFace and registering it inside the NDN protocol stack, as well as provides default processing for incoming Interest and Data packets.
+Applications interact with the core of the system using :ndnsim:`CcnxLocalFace` realization of Face abstraction. 
+To simplify implementation of specific NDN application, ndnSIM provides a base :ndnsim:`CcnxApp` class that takes care of creating :ndnsim:`CcnxLocalFace` and registering it inside the NDN protocol stack, as well as provides default processing for incoming Interest and Data packets.
 
-Base CcnxApp class
-^^^^^^^^^^^^^^^^^^
+.. Base CcnxApp class
+.. ^^^^^^^^^^^^^^^^^^
 
 
 
 Example
 ^^^^^^^
+
+The following code shows how a simple ndnSIM application can be created.  For details refer to API documentation of ndnSIM and NS-3.
+
+.. code-block:: c++
+
+    class CustomApp : public CcnxApp
+    {
+    public:
+      // overridden from CcnxApp
+
+      // Processing upon start of the application
+      virtual void
+      StartApplication ()
+      {
+        // initialize CcnxApp
+        CcnxApp::StartApplication ();
+        
+        // Create a name components object for name ``/prefix/sub``
+	Ptr<CcnxNameComponents> prefix = Create<CcnxNameComponents> (); // now prefix contains ``/``
+	prefix->Add ("prefix"); // now prefix contains ``/prefix``
+	prefix->Add ("sub"); // now prefix contains ``/prefix/sub``
+
+        /////////////////////////////////////////////////////////////////////////////
+        // Creating FIB entry that ensures that we will receive incoming Interests //
+        /////////////////////////////////////////////////////////////////////////////
+
+        // Get FIB object        
+        Ptr<CcnxFib> fib = GetNode ()->GetObject<CcnxFib> ();
+
+        // Add entry to FIB
+        // Note that ``m_face`` is cretaed by CcnxApp
+        CcnxFibEntryContainer::type::iterator fibEntry = fib->Add (*prefix, m_face, 0);
+      
+        /////////////////////////////////////
+	// Sending one Interest packet out //
+        /////////////////////////////////////
+
+        // Create and configure CcnxInterestHeader
+        CcnxInterestHeader interestHeader;
+        UniformVariable rand (0,std::numeric_limits<uint32_t>::max ());
+        interestHeader.SetNonce            (rand.GetValue ());
+        interestHeader.SetName             (prefix);
+        interestHeader.SetInterestLifetime (Seconds (1.0));
+      
+        // Create packet and add CcnxInterestHeader
+        Ptr<Packet> packet = Create<Packet> ();
+        packet->AddHeader (interestHeader);
+
+        // Forward packet to lower (network) layer       
+        m_protocolHandler (packet);
+      
+        // Call trace (for logging purposes)
+        m_transmittedInterests (&interestHeader, this, m_face);
+      }
+    
+      // Processing when application is stopped
+      virtual void
+      StopApplication ()
+      {
+        // cleanup CcnxApp
+        CcnxApp::StopApplication ();
+      }
+    
+      // Callback that will be called when Interest arrives
+      virtual void
+      OnInterest (const Ptr<const CcnxInterestHeader> &interest, Ptr<Packet> packet)
+      {
+        // Create and configure CcnxContentObjectHeader and CcnxContentObjectTail
+        // (header is added in front of the packet, tail is added at the end of the packet)
+        
+        CcnxContentObjectHeader data;
+        data.SetName (Create<CcnxNameComponents> (interest->GetName ())); // data will have the same name as Interests
+      
+        CcnxContentObjectTail trailer; // doesn't require any configuration
+
+        // Create packet and add header and trailer
+        Ptr<Packet> packet = Create<Packet> (1024);
+        packet->AddHeader (data);
+        packet->AddTrailer (trailer);
+      
+        // Forward packet to lower (network) layer       
+        m_protocolHandler (packet);
+      
+        // Call trace (for logging purposes)
+        m_transmittedInterests (&interestHeader, this, m_face);
+        m_transmittedContentObjects (&data, packet, this, m_face);
+      }
+     
+      // Callback that will be called when Data arrives
+      virtual void
+      OnContentObject (const Ptr<const CcnxContentObjectHeader> &contentObject,
+                       Ptr<Packet> payload)
+      {
+        std::cout << "DATA received for name " << contentObject->GetName () << std::endl; 
+      }
+    };
diff --git a/docs/source/intro.rst b/docs/source/intro.rst
index 0566861..44991a2 100644
--- a/docs/source/intro.rst
+++ b/docs/source/intro.rst
@@ -64,10 +64,10 @@
 .. _visualizer: http://www.nsnam.org/wiki/index.php/PyViz
 
 Downloading ndnSIM source
-=========================
+-------------------------
 
 Only ndnSIM
---------------
++++++++++++
 
 Download NS-3 simulator. For example::
 
@@ -86,7 +86,7 @@
 
 
 Custom (unsupported) branch of NS-3
--------------------------------------------
++++++++++++++++++++++++++++++++++++
 
 Alternatively, it is possible to download a custom (unsupported) branch of NS-3 that contains all necessary patches and more::
 
@@ -101,7 +101,7 @@
 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.
 
 Compiling and running ndnSIM
-============================
+----------------------------
 
 ndnSIM uses standard NS-3 compilation procedure.  For example::
 
@@ -120,17 +120,9 @@
 .. note::
    Do not forget to configure and compile NS-3 in optimized mode (``./waf configure -d optimized``) in order to run actual simulations.
 
-Logging
------------------
-
-Almost every component in ndnSIM exports logging interface, so it is possible in debug compilation of simulator to track many details. For example, by enabling logging of :ndnsim:`CcnxFace` and :ndnsim:`CcnxConsumer` will show everything what happens on :ndnsim:`CcnxFace` and :ndnsim:`CcnxConsumer` classes::
-
-    NS_LOG=CcnxFace:CcnxConsumer ./waf --run=ccnx-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.
 
 Documentation
-------------------------
+=============
 
 Overall structure of ndnSIM is described in our technical report.
 
@@ -140,7 +132,7 @@
 
 
 A very short guide to the code
-==============================
+------------------------------
 
 All the NDN related code is in ``ns-3/src/ndnSIM``
 
@@ -170,6 +162,14 @@
 | ``plugins/``    | a number of plugins that may be helpful to run simulation scenarios |
 +-----------------+---------------------------------------------------------------------+
 
+Logging
+-----------------
+
+Almost every component in ndnSIM exports logging interface, so it is possible in debug compilation of simulator to track many details. For example, by enabling logging of :ndnsim:`CcnxFace` and :ndnsim:`CcnxConsumer` will show everything what happens on :ndnsim:`CcnxFace` and :ndnsim:`CcnxConsumer` classes::
+
+    NS_LOG=CcnxFace:CcnxConsumer ./waf --run=ccnx-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.
 
 .. Indices and tables
 .. ==================