diff --git a/examples/annotated-topology-read-example.cc b/examples/annotated-topology-read-example.cc
index 63e42c4..7aff4fe 100644
--- a/examples/annotated-topology-read-example.cc
+++ b/examples/annotated-topology-read-example.cc
@@ -30,18 +30,22 @@
 #include "ns3/ipv4-list-routing-helper.h"
 #include "ns3/annotated-topology-reader.h"
 #include <list>
-//#include "ns3/visualizer-module.h"
+#include "ns3/visualizer-module.h"
+#include "ns3/ccnx.h"
+#include "ns3/ipv4-global-routing-helper.h"
+#include "ns3/NDNabstraction-module.h"
 
 using namespace ns3;
 using namespace std;
 
-NS_LOG_COMPONENT_DEFINE ("AnnotatedTopologyReadingExample");
+NS_LOG_COMPONENT_DEFINE ("AnnotatedTopologyExample");
 
 int main (int argc, char *argv[])
 {
     GlobalValue::Bind ("SimulatorImplementationType", StringValue
                        ("ns3::VisualSimulatorImpl"));
-    
+    Packet::EnableChecking();
+    Packet::EnablePrinting();
     string input ("/Users/iliamo/ns3-abstract-ndn/ns-3.11/src/NDNabstraction/examples/simpletopology.txt");
     
     // Set up command line parameters used to control the experiment.
@@ -71,6 +75,16 @@
         return -1;
     }
     
+    
+    for(uint32_t j=0; j<nodes.GetN(); j++)
+    {
+        uint32_t name = j+1;
+        std::stringstream ss;
+        ss<<name;
+        Names::Add (ss.str(), nodes.Get (j));
+        NS_LOG_INFO("Name = " << ss.str());
+    }
+ 
     // ------------------------------------------------------------
     // -- Create nodes and network stacks
     // --------------------------------------------
@@ -79,15 +93,30 @@
     
     
     //routing
-    Ipv4StaticRoutingHelper staticRouting;
-    Ipv4ListRoutingHelper listRH;
-    listRH.Add (staticRouting, 0);
-    stack.SetRoutingHelper (listRH);  // has effect on the next Install ()
-    stack.Install (nodes);
+    //Ipv4StaticRoutingHelper staticRouting;
+    //Ipv4ListRoutingHelper listRH;
+    //listRH.Add (staticRouting, 0);
+    //stack.SetRoutingHelper (listRH);  // has effect on the next Install ()
+    //stack.Install (nodes);
+    
+    Ipv4GlobalRoutingHelper ipv4RoutingHelper;
+    // Ptr<Ipv4RoutingHelper> ipv4RoutingHelper = stack.GetRoutingHelper ();
+    stack.SetRoutingHelper (ipv4RoutingHelper);
+    stack.Install(nodes);
     
     NS_LOG_INFO ("creating ip4 addresses");
     Ipv4AddressHelper address;
     address.SetBase ("10.0.0.0", "255.255.255.252");
+   
+    // // Create router nodes, initialize routing database and set up the routing
+    // // tables in the nodes.
+    Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
+    
+    /*grid.AssignIpv4Addresses (
+                              Ipv4AddressHelper("10.1.0.0", "255.255.255.0"),
+                              Ipv4AddressHelper("10.2.0.0", "255.255.255.0")
+                              );
+*/
     
     int totlinks = reader->LinksSize ();
     
@@ -106,8 +135,39 @@
     reader->ApplySettings(ndc,nc);
     ///*** settings applied
     
-    
+    NS_LOG_INFO("installing ccnx stack");
+    CcnxStackHelper ccnx(Ccnx::NDN_FLOODING);
+    Ptr<CcnxFaceContainer> cf = ccnx.Install (nodes);
      
+    NS_LOG_INFO ("Installing Applications");
+    CcnxConsumerHelper helper ("/3");
+    ApplicationContainer app = helper.Install (nodes.Get(1));
+    app.Start (Seconds (1.0));
+    app.Stop (Seconds (1000.05));
+    
+    /*CcnxConsumerHelper helper2 ("/4");
+     ApplicationContainer app2 = helper2.Install(c.Get(5));
+     app2.Start (Seconds (1.0));
+     app2.Stop (Seconds (1000.05));
+     */
+    CcnxProducerHelper helper3 ("/3",120);
+    ApplicationContainer app3 = helper3.Install(nodes.Get(6));
+    app3.Start(Seconds(0.0));
+    app3.Stop(Seconds(1500.0));
+    /*
+     CcnxProducerHelper helper4 ("/4",150);
+     ApplicationContainer app4 = helper4.Install(c.Get(0));
+     app4.Start(Seconds(0.0));
+     app4.Stop(Seconds(1500.0));
+     */
+
+    NS_LOG_INFO("Routes");
+    ccnx.AddRoute("1","/3",0,1);
+    ccnx.AddRoute("3","/3",1,1);
+    ccnx.AddRoute("3","/3",2,2);
+    /*ccnx.AddRoute("4","/3",1,1);
+    ccnx.AddRoute("5","/3",2,1);
+*/
     
     // it creates little subnets, one for each couple of nodes.
     NS_LOG_INFO ("creating ipv4 interfaces");
diff --git a/examples/ccnx-grid.cc b/examples/ccnx-grid.cc
index 0427ae2..70cd015 100644
--- a/examples/ccnx-grid.cc
+++ b/examples/ccnx-grid.cc
@@ -88,7 +88,7 @@
             NS_LOG_INFO("Eventual name is " << ss.str());
         }
     }
-    CcnxStackHelper ccnx(Ccnx::NDN_BESTROUTE);
+    CcnxStackHelper ccnx(Ccnx::NDN_FLOODING/*Ccnx::NDN_BESTROUTE*/);
     Ptr<CcnxFaceContainer> cf = ccnx.Install (c);
 
     NS_LOG_INFO ("Installing Applications");
@@ -147,7 +147,7 @@
     NS_LOG_INFO ("Run Simulation.");
     Simulator::Run ();
     Simulator::Destroy ();
-    NS_LOG_INFO ("Done.");
+    NS_LOG_INFO ("Done!");
     
     return 0;
 
diff --git a/examples/syntactic-topology-ndnabstraction.cc b/examples/syntactic-topology-ndnabstraction.cc
index a1a92a1..61f5c49 100644
--- a/examples/syntactic-topology-ndnabstraction.cc
+++ b/examples/syntactic-topology-ndnabstraction.cc
@@ -1,17 +1,36 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; c-set-offset 'innamespace 0; -*- */
+/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
 /*
- *  sync-topology-ndnabstraction.cpp
- *  XcodeProject
+ * Copyright (c) 2011 University of California, Los Angeles
  *
- *  Created by Ilya on 7/18/11.
- *  Copyright 2011 __MyCompanyName__. All rights reserved.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
  *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Ilya Moiseenko <iliamo@cs.ucla.edu>
  */
+
 #include "ns3/core-module.h"
 #include "ns3/network-module.h"
-#include "ns3/internet-module.h"
 #include "ns3/point-to-point-module.h"
-#include "ns3/applications-module.h"
+#include "ns3/NDNabstraction-module.h"
+#include <ns3/point-to-point-grid.h>
+#include "ns3/ipv4-global-routing-helper.h"
+
+#include <iostream>
+#include <sstream>
+
+#include "ns3/visualizer-module.h"
+#include "ns3/ccnx.h"
+
 
 using namespace ns3;
 
@@ -20,11 +39,17 @@
 int 
 main (int argc, char *argv[])
 {
+  GlobalValue::Bind ("SimulatorImplementationType", StringValue
+                       ("ns3::VisualSimulatorImpl"));
+    
   // Set up some default values for the simulation.  Use the 
   
   Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210));
   Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("448kb/s"));
   
+    Packet::EnableChecking();
+    Packet::EnablePrinting();
+
   // Allow the user to override any of the defaults and the above
   // DefaultValue::Bind ()s at run-time, via command-line arguments
   CommandLine cmd;
@@ -34,25 +59,32 @@
   NS_LOG_INFO ("Create nodes.");
   NodeContainer c;
   c.Create (7);
-  
-  
+    Names::Add ("1", c.Get (0));
+    Names::Add ("2", c.Get (1));
+    Names::Add ("3", c.Get (2));
+    Names::Add ("4", c.Get (3));
+    Names::Add ("5", c.Get (4));
+    Names::Add ("6", c.Get (5));
+    Names::Add ("7", c.Get (6));
+    
+    
   NodeContainer n13 = NodeContainer (c.Get (0), c.Get (2));
-  NodeContainer n23 = NodeContainer (c.Get (1), c.Get (3));
+  NodeContainer n23 = NodeContainer (c.Get (1), c.Get (2));
   NodeContainer n35 = NodeContainer (c.Get (2), c.Get (4));
   NodeContainer n34 = NodeContainer (c.Get (2), c.Get (3));
   NodeContainer n45 = NodeContainer (c.Get (3), c.Get (4));
   NodeContainer n56 = NodeContainer (c.Get (4), c.Get (5));
   NodeContainer n57 = NodeContainer (c.Get (4), c.Get (6));
   
-  Ipv4StaticRoutingHelper staticRouting;
+  //Ipv4StaticRoutingHelper staticRouting;
   
-  Ipv4ListRoutingHelper list;
-  list.Add (staticRouting, 1);
+  //Ipv4ListRoutingHelper list;
+  //list.Add (staticRouting, 1);
   
   //Add static routing
-  InternetStackHelper internet;
-  internet.SetRoutingHelper (list); // has effect on the next Install ()
-  internet.Install (c);
+  //InternetStackHelper internet;
+  //internet.SetRoutingHelper (list); // has effect on the next Install ()
+  //internet.Install (c);
   
   // We create the channels first without any IP addressing information
   NS_LOG_INFO ("Create channels.");
@@ -76,6 +108,15 @@
   p2p.SetChannelAttribute ("Delay", StringValue ("50ms"));
   NetDeviceContainer nd35 = p2p.Install (n35);
   
+    InternetStackHelper stack;
+    Ipv4GlobalRoutingHelper ipv4RoutingHelper;
+    // Ptr<Ipv4RoutingHelper> ipv4RoutingHelper = stack.GetRoutingHelper ();
+    stack.SetRoutingHelper (ipv4RoutingHelper);
+    stack.Install(c);
+    // // Create router nodes, initialize routing database and set up the routing
+    // // tables in the nodes.
+    Ipv4GlobalRoutingHelper::PopulateRoutingTables ();
+    
   // Later, we add IP addresses.
   NS_LOG_INFO ("Assign IP Addresses.");
   Ipv4AddressHelper ipv4;
@@ -88,10 +129,59 @@
   Ipv4InterfaceContainer i56 = ipv4.Assign (nd56);
   Ipv4InterfaceContainer i57 = ipv4.Assign (nd57);
   
-  
+    
+    
+    
+    CcnxStackHelper ccnx(Ccnx::NDN_FLOODING/*Ccnx::NDN_BESTROUTE*/);
+    Ptr<CcnxFaceContainer> cf = ccnx.Install (c);
+    
+    NS_LOG_INFO ("Installing Applications");
+    CcnxConsumerHelper helper ("/3");
+    ApplicationContainer app = helper.Install (c.Get(1));
+    app.Start (Seconds (1.0));
+    app.Stop (Seconds (1000.05));
+    
+    /*CcnxConsumerHelper helper2 ("/4");
+    ApplicationContainer app2 = helper2.Install(c.Get(5));
+    app2.Start (Seconds (1.0));
+    app2.Stop (Seconds (1000.05));
+    */
+    CcnxProducerHelper helper3 ("/3",120);
+    ApplicationContainer app3 = helper3.Install(c.Get(6));
+    app3.Start(Seconds(0.0));
+    app3.Stop(Seconds(1500.0));
+    /*
+    CcnxProducerHelper helper4 ("/4",150);
+    ApplicationContainer app4 = helper4.Install(c.Get(0));
+    app4.Start(Seconds(0.0));
+    app4.Stop(Seconds(1500.0));
+  */
+    
+    ccnx.AddRoute("1","/3",0,1);
+    ccnx.AddRoute("3","/3",2,1);
+    ccnx.AddRoute("3","/3",3,1);
+    ccnx.AddRoute("4","/3",1,1);
+    ccnx.AddRoute("5","/3",2,1);
+    
+    /*ccnx.AddRoute ("1", "/3", 0, 1);
+    ccnx.AddRoute ("1", "/3", 1, 1);
+    
+    ccnx.AddRoute ("2", "/3", 1, 1);
+    
+    ccnx.AddRoute ("3", "/3", 1, 1);
+    
+    ccnx.AddRoute ("4", "/3", 2, 1);
+    
+    ccnx.AddRoute ("6", "/3", 2, 1);
+    
+    ccnx.AddRoute ("7", "/3", 1, 1);
+    
+    ccnx.AddRoute ("8", "/3", 1, 1);
+  */
+    
   // Create the OnOff application to send UDP datagrams of size
   // 210 bytes at a rate of 448 Kb/s from n0 to n4
-  NS_LOG_INFO ("Create Applications.");
+  /*NS_LOG_INFO ("Create Applications.");
   uint16_t port = 9;   // Discard port (RFC 863)
   
   std::string sendsizeattr = "SendSize";
@@ -125,9 +215,9 @@
   
   AsciiTraceHelper ascii;
   p2p.EnableAsciiAll (ascii.CreateFileStream ("sync-topology-ndnabstraction.tr"));
-  p2p.EnablePcapAll ("sync-topology-ndnabstraction");
+  p2p.EnablePcapAll ("sync-topology-ndnabstraction");*/
   
-  Simulator::Stop (Seconds (20));
+  Simulator::Stop (Seconds (2000));
   
   NS_LOG_INFO ("Run Simulation.");
   Simulator::Run ();
diff --git a/helper/ccnx-stack-helper.cc b/helper/ccnx-stack-helper.cc
index 33951c5..e045dcd 100644
--- a/helper/ccnx-stack-helper.cc
+++ b/helper/ccnx-stack-helper.cc
@@ -201,12 +201,13 @@
   node->AggregateObject (ccnx);
 
   Ptr<CcnxPit> pit = ccnx->GetPit();
-    NS_LOG_INFO("NODE #"<<node->GetNDevices());
+  NS_LOG_INFO("NODE->GetNDevices()="<<node->GetNDevices());
+    
   for (uint32_t index=0; index < node->GetNDevices (); index++)
     {
-        Ptr<PointToPointNetDevice> device = DynamicCast<PointToPointNetDevice>(node->GetDevice(index));
-        if(device == 0)
-            continue;
+      Ptr<PointToPointNetDevice> device = DynamicCast<PointToPointNetDevice>(node->GetDevice(index));
+      if(device == 0)
+        continue;
         
       Ptr<CcnxNetDeviceFace> face = Create<CcnxNetDeviceFace> (node->GetDevice (index));
       face->SetNode (node);
@@ -261,7 +262,7 @@
   
   Ptr<Node> node = Names::Find<Node> (nodeName);
   NS_ASSERT_MSG (node != 0, "Node [" << nodeName << "] does not exist");
-
+  
   Ptr<Ccnx>     ccnx = node->GetObject<Ccnx> ();
   NS_ASSERT_MSG (ccnx != 0, "Ccnx stack should be installed on the node");
 
@@ -288,7 +289,7 @@
   fib->Add (prefixValue.Get (), face, metric);
 }
 */
-    
+
 static void
 CcnxL3ProtocolRxTxSink (Ptr<const Packet> p, Ptr<Ccnx> ccnx, uint32_t face)
 {
diff --git a/model/ccnx-fib.cc b/model/ccnx-fib.cc
index 164b46b..f8c5956 100644
--- a/model/ccnx-fib.cc
+++ b/model/ccnx-fib.cc
@@ -27,6 +27,7 @@
 #include "ns3/node.h"
 #include "ns3/assert.h"
 #include "ns3/names.h"
+#include "ns3/log.h"
 
 #define NDN_RTO_ALPHA 0.125
 #define NDN_RTO_BETA 0.25
@@ -95,7 +96,8 @@
 }
 //////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////
-
+NS_LOG_COMPONENT_DEFINE ("CcnxFib");
+    
 using namespace __ccnx_private;
 
 TypeId 
@@ -147,16 +149,18 @@
 void
 CcnxFibEntry::AddOrUpdateRoutingMetric::operator () (CcnxFibEntry &entry)
 {
+  NS_LOG_FUNCTION(this);
+  NS_ASSERT_MSG (m_face != NULL, "Trying to Add or Update NULL face");
+
   CcnxFibFaceMetricByFace::type::iterator record = entry.m_faces.get<i_face> ().find (m_face);
   if (record == entry.m_faces.get<i_face> ().end ())
     {
       entry.m_faces.insert (CcnxFibFaceMetric (m_face, m_metric));
     }
   else
-    {
+  {
       entry.m_faces.modify (record, ChangeMetric (m_metric));
     }
-  
   // reordering random access index same way as by metric index
   entry.m_faces.get<i_nth> ().rearrange (entry.m_faces.get<i_metric> ().begin ());
 }
@@ -221,14 +225,17 @@
 CcnxFib::Add (const CcnxNameComponents &prefix, Ptr<CcnxFace> face, int32_t metric)
 {
 // CcnxFibFaceMetric
+  NS_LOG_FUNCTION(this << prefix << face << metric);
   CcnxFibEntryContainer::type::iterator entry = find (prefix);
   if (entry == end ())
     {
       entry = insert (end (), CcnxFibEntry (prefix));
       // insert new
     }
-  modify (entry, CcnxFibEntry::AddOrUpdateRoutingMetric (face, metric));
 
+  NS_ASSERT_MSG (face != NULL, "Trying to modify NULL face");
+  modify (entry, CcnxFibEntry::AddOrUpdateRoutingMetric (face, metric));
+    
   return entry;
 }
     
diff --git a/model/ccnx-l3-protocol.cc b/model/ccnx-l3-protocol.cc
index d045339..87217bc 100644
--- a/model/ccnx-l3-protocol.cc
+++ b/model/ccnx-l3-protocol.cc
@@ -586,34 +586,33 @@
     header->SetNack(false);
     header->SetCongested(false);
   
-      NS_ASSERT_MSG (m_forwardingStrategy != 0, "Need a forwarding protocol object to process packets");
+    NS_ASSERT_MSG (m_forwardingStrategy != 0, "Need a forwarding protocol object to process packets");
 
-      m_pit->modify (pitEntry, CcnxPitEntry::AddIncoming(incomingFace));
+    m_pit->modify (pitEntry, CcnxPitEntry::AddIncoming(incomingFace));
     
-      bool propagated = m_forwardingStrategy->
-        PropagateInterest (pitEntry, fibEntry,incomingFace, header, packet,
-                       MakeCallback (&CcnxL3Protocol::SendInterest, this)
-                       );
+    bool propagated = m_forwardingStrategy->
+                      PropagateInterest (pitEntry, fibEntry,incomingFace, header, packet,
+                                         MakeCallback (&CcnxL3Protocol::SendInterest, this)
+                                        );
 
-      // If interest wasn't propagated further (probably, a limit is reached),
-      // prune and delete PIT entry if there are no outstanding interests.
-      // Stop processing otherwise.
-      if( (!propagated) && (pitEntry->m_outgoing.size() == 0))
-        {
-          BOOST_FOREACH (const CcnxPitEntryIncomingFace face, pitEntry->m_incoming)
-            {
+    // If interest wasn't propagated further (probably, a limit is reached),
+    // prune and delete PIT entry if there are no outstanding interests.
+    // Stop processing otherwise.
+    if( (!propagated) && (pitEntry->m_outgoing.size() == 0))
+      {
+        BOOST_FOREACH (const CcnxPitEntryIncomingFace face, pitEntry->m_incoming)
+          {
+            header->SetNack(true);
+            header->SetCongested(true);
+              NS_LOG_INFO("Sending CONGESTION packet");
+            SendInterest (face.m_face, header, packet->Copy());
                 
-                
-                header->SetNack(true);
-                header->SetCongested(true);
-                SendInterest (face.m_face, header, packet->Copy());
-                
-                m_droppedInterestsTrace (header, DROP_CONGESTION,
+            m_droppedInterestsTrace (header, DROP_CONGESTION,
                                          m_node->GetObject<Ccnx> (), incomingFace);
-            }
+          }
       
           m_pit->erase (pitEntry);
-        }
+      }
     /*}
   else
     {
diff --git a/model/ccnx-pit.cc b/model/ccnx-pit.cc
index 7c3681b..8fd21e0 100644
--- a/model/ccnx-pit.cc
+++ b/model/ccnx-pit.cc
@@ -137,13 +137,13 @@
 {
     NS_LOG_INFO ("Face has " << m_bucketsPerFace[face->GetId()] << " packets with max allowance " << maxBucketsPerFace[face->GetId()]); 
     
-    /*if((face->IsLocal() == false) 
+    if((face->IsLocal() == false) 
        && (m_bucketsPerFace[face->GetId()]+1.0 >= maxBucketsPerFace[face->GetId()] ))
 	{
 		return false;
-	}*/
+	}
     
-    //m_bucketsPerFace[face->GetId()] = m_bucketsPerFace[face->GetId()] + 1.0;
+    m_bucketsPerFace[face->GetId()] = m_bucketsPerFace[face->GetId()] + 1.0;
 	
     NS_LOG_INFO(this->size());
     NS_LOG_INFO("before modify");
diff --git a/wscript b/wscript
index 41944aa..94a4269 100644
--- a/wscript
+++ b/wscript
@@ -29,7 +29,7 @@
 
 def build(bld):
     module = bld.create_ns3_module ('NDNabstraction', ['core', 'network', 'point-to-point',
-                                                       'topology-read','internet','applications'])
+                                                       'topology-read','internet','applications','visualizer'])
     module.uselib = 'BOOST BOOST_IOSTREAMS'
 
     tests = bld.create_ns3_module_test_library('NDNabstraction')
@@ -66,6 +66,12 @@
         obj = bld.create_ns3_program('ccnx-grid', ['NDNabstraction', 'point-to-point-layout'])
         obj.source = 'examples/ccnx-grid.cc'
 
+        obj = bld.create_ns3_program('syntactic-topology', ['NDNabstraction', 'point-to-point-layout'])
+        obj.source = 'examples/syntactic-topology-ndnabstraction.cc'
+
+        obj = bld.create_ns3_program('annotated-topology', ['NDNabstraction', 'point-to-point-layout'])
+        obj.source = 'examples/annotated-topology-read-example.cc'
+
     #     for path in ["examples"]:
     #         anode = bld.path.find_dir (path)
     #         if not anode or not anode.is_child_of(bld.srcnode):
