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 4b832a4..2f87922 100644
--- a/model/ccnx-l3-protocol.cc
+++ b/model/ccnx-l3-protocol.cc
@@ -570,34 +570,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 bd94d0f..847b0d3 100644
--- a/wscript
+++ b/wscript
@@ -27,7 +27,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')
@@ -64,6 +64,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):
