Make everything compile
diff --git a/helper/ccnb-parser/ccnb-parser-commoh.h b/helper/ccnb-parser/ccnb-parser-common.h
similarity index 99%
rename from helper/ccnb-parser/ccnb-parser-commoh.h
rename to helper/ccnb-parser/ccnb-parser-common.h
index 2dc092c..4e4eb12 100644
--- a/helper/ccnb-parser/ccnb-parser-commoh.h
+++ b/helper/ccnb-parser/ccnb-parser-common.h
@@ -43,6 +43,14 @@
 class Dattr;
 class Ext;
 
+
+/**
+ * \brief Exception thrown if there is a parsing error
+ *
+ * \todo inherit this class from some exception class and provide meaningful error messages
+ */
+class CcnbDecodingException {};
+
 /**
  * \brief Type tag for a ccnb start marker.
  *
@@ -164,15 +172,7 @@
   CCN_DTAG_CCNProtocolDataUnit = 17702112
 };
 
-/**
- * \brief Exception thrown if there is a parsing error
- *
- * \todo inherit this class from some exception class and provide meaningful error messages
- */
-class CcnbDecodingException {};
-
 } // namespace CcnxParser
-
 } // namespace ns3
 
 #endif // _CCNB_PARSER_COMMON_H_
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-attr.cc b/helper/ccnb-parser/syntax-tree/ccnb-parser-attr.cc
index 3fe986e..397e940 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-attr.cc
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-attr.cc
@@ -19,6 +19,7 @@
  */
 
 #include "ccnb-parser-attr.h"
+#include "ns3/ccnb-parser-common.h"
 
 namespace ns3 {
 namespace CcnbParser {
@@ -33,7 +34,7 @@
     }
   m_value = DynamicCast<Udata> (Block::ParseBlock (start));
   if (m_value == 0)
-    throw CcnxDecodingException (); // "ATTR must be followed by UDATA field"
+    throw CcnbDecodingException (); // "ATTR must be followed by UDATA field"
 }
 
 }
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-attr.h b/helper/ccnb-parser/syntax-tree/ccnb-parser-attr.h
index 7864459..1b7d5e8 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-attr.h
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-attr.h
@@ -46,10 +46,10 @@
    */
   Attr (Buffer::Iterator &start, uint32_t length);
   
-  virtual void accept( Visitor &v )                           { v.visit( *this ); }
-  virtual void accept( GJVoidVisitor &v, boost::any param )   { v.visit( *this, param ); }
-  virtual boost::any accept( GJNoArguVisitor &v )             { return v.visit( *this ); }
-  virtual boost::any accept( GJVisitor &v, boost::any param ) { return v.visit( *this, param ); }
+  virtual void accept( VoidNoArguVisitor &v )               { v.visit( *this ); }
+  virtual void accept( VoidVisitor &v, boost::any param )   { v.visit( *this, param ); }
+  virtual boost::any accept( NoArguVisitor &v )             { return v.visit( *this ); }
+  virtual boost::any accept( Visitor &v, boost::any param ) { return v.visit( *this, param ); }
 
   std::string m_attr; ///< field holding name of the attribute
 };
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-base-attr.h b/helper/ccnb-parser/syntax-tree/ccnb-parser-base-attr.h
index f83f77e..9b20073 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-base-attr.h
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-base-attr.h
@@ -21,7 +21,6 @@
 #ifndef _CCNB_PARSER_BASE_ATTR_H_
 #define _CCNB_PARSER_BASE_ATTR_H_
 
-#include "ccnb-parser-block.h"
 #include "ccnb-parser-udata.h"
 
 namespace ns3 {
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-base-tag.h b/helper/ccnb-parser/syntax-tree/ccnb-parser-base-tag.h
index bfd1f5b..6b7fe76 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-base-tag.h
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-base-tag.h
@@ -47,5 +47,8 @@
   BaseTag() { }
 };
 
+}
+}
+
 #endif // _CCNB_PARSER_BASE_TAG_H_
 
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-blob.h b/helper/ccnb-parser/syntax-tree/ccnb-parser-blob.h
index 1693fbe..4b22d62 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-blob.h
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-blob.h
@@ -18,10 +18,11 @@
  * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
  */
 
-#ifndef _CCNB_PARSER_BLOCK_H_
-#define _CCNB_PARSER_BLOCK_H_
+#ifndef _CCNB_PARSER_BLOB_H_
+#define _CCNB_PARSER_BLOB_H_
 
 #include "ccnb-parser-block.h"
+#include "ns3/buffer.h"
 
 namespace ns3 {
 namespace CcnbParser {
@@ -45,10 +46,10 @@
    */
   Blob (Buffer::Iterator &start, uint32_t length);
   
-  virtual void accept( Visitor &v )                           { v.visit( *this ); }
-  virtual void accept( GJVoidVisitor &v, boost::any param )   { v.visit( *this, param ); }
-  virtual boost::any accept( GJNoArguVisitor &v )             { return v.visit( *this ); }
-  virtual boost::any accept( GJVisitor &v, boost::any param ) { return v.visit( *this, param ); }
+  virtual void accept( VoidNoArguVisitor &v )               { v.visit( *this ); }
+  virtual void accept( VoidVisitor &v, boost::any param )   { v.visit( *this, param ); }
+  virtual boost::any accept( NoArguVisitor &v )             { return v.visit( *this ); }
+  virtual boost::any accept( Visitor &v, boost::any param ) { return v.visit( *this, param ); }
 
   Buffer m_blob; ///< \brief field holding a parsed BLOB value of the block
 };
@@ -56,4 +57,4 @@
 }
 }
 
-#endif // _CCNB_PARSER_BLOCK_H_
+#endif // _CCNB_PARSER_BLOB_H_
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-block.cc b/helper/ccnb-parser/syntax-tree/ccnb-parser-block.cc
index 81d137f..e1e09fd 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-block.cc
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-block.cc
@@ -19,7 +19,14 @@
  */
 
 #include "ccnb-parser-block.h"
-#include "ns3/ccnb-parser-common.h"
+
+#include "ccnb-parser-blob.h"
+#include "ccnb-parser-udata.h"
+#include "ccnb-parser-tag.h"
+#include "ccnb-parser-dtag.h"
+#include "ccnb-parser-attr.h"
+#include "ccnb-parser-dattr.h"
+#include "ccnb-parser-ext.h"
 
 namespace ns3 {
 namespace CcnbParser {
@@ -61,7 +68,7 @@
     case CCN_EXT:
       return Create<Ext> (start, value);
     default:
-      throw CcnxDecodingException ();
+      throw CcnbDecodingException ();
     }
 }
 
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-block.h b/helper/ccnb-parser/syntax-tree/ccnb-parser-block.h
index 6cbb6b3..1ff614b 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-block.h
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-block.h
@@ -56,10 +56,10 @@
   static Ptr<Block>
   ParseBlock (Buffer::Iterator &start);
   
-  virtual void accept (VoidNoArguVisitor &v )               =0; ///< \brief Method to dispatch VoidNoArguVisitor
-  virtual void accept (VoidVisitor &v, boost::any param)    =0; ///< \brief Method to dispatch VoidVisitor
-  virtual boost::any accept (NoArguVisitor &v )             =0; ///< \brief Method to dispatch NoArguVisitor 
-  virtual boost::any accept (Visitor &v, boost::any param ) =0; ///< \brief Method to dispatch Visitor
+  virtual void accept( VoidNoArguVisitor &v )               = 0;
+  virtual void accept( VoidVisitor &v, boost::any param )   = 0;
+  virtual boost::any accept( NoArguVisitor &v )             = 0;
+  virtual boost::any accept( Visitor &v, boost::any param ) = 0;
 };
 
 }
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-dattr.cc b/helper/ccnb-parser/syntax-tree/ccnb-parser-dattr.cc
index b8ef685..bb6be82 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-dattr.cc
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-dattr.cc
@@ -29,7 +29,7 @@
   m_dattr = dattr;
   m_value = DynamicCast<Udata> (Block::ParseBlock (start));
   if (m_value == 0)
-    throw CcnxDecodingException (); // "ATTR must be followed by UDATA field"
+    throw CcnbDecodingException (); // "ATTR must be followed by UDATA field"
 }
 
 }
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-dattr.h b/helper/ccnb-parser/syntax-tree/ccnb-parser-dattr.h
index 42de5f6..6775017 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-dattr.h
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-dattr.h
@@ -45,10 +45,10 @@
    */
   Dattr (Buffer::Iterator &start, uint32_t dattr);
 
-  virtual void accept( Visitor &v )                           { v.visit( *this ); }
-  virtual void accept( GJVoidVisitor &v, boost::any param )   { v.visit( *this, param ); }
-  virtual boost::any accept( GJNoArguVisitor &v )             { return v.visit( *this ); }
-  virtual boost::any accept( GJVisitor &v, boost::any param ) { return v.visit( *this, param ); }
+  virtual void accept( VoidNoArguVisitor &v )               { v.visit( *this ); }
+  virtual void accept( VoidVisitor &v, boost::any param )   { v.visit( *this, param ); }
+  virtual boost::any accept( NoArguVisitor &v )             { return v.visit( *this ); }
+  virtual boost::any accept( Visitor &v, boost::any param ) { return v.visit( *this, param ); }
 
   uint32_t m_dattr; ///< \brief Dictionary code of DATTR
 };
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-dtag.cc b/helper/ccnb-parser/syntax-tree/ccnb-parser-dtag.cc
index 0cfe4bd..8d9ecf7 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-dtag.cc
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-dtag.cc
@@ -19,7 +19,9 @@
  */
 
 #include "ccnb-parser-dtag.h"
-#include "ns3/ccnb-parser-common.h"
+
+#include "ccnb-parser-base-attr.h"
+#include "ccnb-parser-base-tag.h"
 
 namespace ns3 {
 namespace CcnbParser {
@@ -35,7 +37,7 @@
    * content (including virtual payload) will be stored in Packet
    * buffer
    */
-  if (dtag == Ccnx::CCN_DTAG_Content)
+  if (dtag == CCN_DTAG_Content)
     return; // hack #1. Do not process nesting block for <Content>
   
   // parse attributes until first nested block reached
@@ -55,17 +57,17 @@
   while (!start.IsEnd () && start.PeekU8 ()!=CCN_CLOSE)
     {
       // hack #2. Stop processing nested blocks if last block was <Content>
-      if (m_dtag == Ccnx::CCN_DTAG_ContentObject && // we are in <ContentObject>
-          DynamicCast<Dtag> (m_nestedBlocks.back())!=0 && // last block is DTAG
-          DynamicCast<Dtag> (m_nestedBlocks.back())->m_dtag == CCN_DTAG_Content) 
+      if (m_dtag == CCN_DTAG_ContentObject && // we are in <ContentObject>
+          DynamicCast<Dtag> (m_nestedTags.back())!=0 && // last block is DTAG
+          DynamicCast<Dtag> (m_nestedTags.back())->m_dtag == CCN_DTAG_Content) 
         {
           return; 
         }
 
-      m_nestedBlocks.push_back (Block::ParseBlock (start));
+      m_nestedTags.push_back (Block::ParseBlock (start));
     }
   if (start.IsEnd ())
-      throw CcnxDecodingException ();
+      throw CcnbDecodingException ();
 
   start.ReadU8 (); // read CCN_CLOSE
 }
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-dtag.h b/helper/ccnb-parser/syntax-tree/ccnb-parser-dtag.h
index 65a84f5..1ff75e3 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-dtag.h
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-dtag.h
@@ -50,10 +50,10 @@
    */
   Dtag (Buffer::Iterator &start, uint32_t dtag);
 
-  virtual void accept( Visitor &v )                           { v.visit( *this ); }
-  virtual void accept( GJVoidVisitor &v, boost::any param )   { v.visit( *this, param ); }
-  virtual boost::any accept( GJNoArguVisitor &v )             { return v.visit( *this ); }
-  virtual boost::any accept( GJVisitor &v, boost::any param ) { return v.visit( *this, param ); }
+  virtual void accept( VoidNoArguVisitor &v )               { v.visit( *this ); }
+  virtual void accept( VoidVisitor &v, boost::any param )   { v.visit( *this, param ); }
+  virtual boost::any accept( NoArguVisitor &v )             { return v.visit( *this ); }
+  virtual boost::any accept( Visitor &v, boost::any param ) { return v.visit( *this, param ); }
 
   uint32_t m_dtag; ///< \brief Dictionary code for DTAG
 };
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-ext.h b/helper/ccnb-parser/syntax-tree/ccnb-parser-ext.h
index 9a2f2c8..568706b 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-ext.h
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-ext.h
@@ -21,7 +21,7 @@
 #ifndef _CCNB_PARSER_EXT_H_
 #define _CCNB_PARSER_EXT_H_
 
-#include "ccnb-parser-ext.h"
+#include "ccnb-parser-block.h"
 
 namespace ns3 {
 namespace CcnbParser {
@@ -45,10 +45,10 @@
    */
   Ext (Buffer::Iterator &start, uint32_t extSubtype);
 
-  virtual void accept( Visitor &v )                           { v.visit( *this ); }
-  virtual void accept( GJVoidVisitor &v, boost::any param )   { v.visit( *this, param ); }
-  virtual boost::any accept( GJNoArguVisitor &v )             { return v.visit( *this ); }
-  virtual boost::any accept( GJVisitor &v, boost::any param ) { return v.visit( *this, param ); }
+  virtual void accept( VoidNoArguVisitor &v )               { v.visit( *this ); }
+  virtual void accept( VoidVisitor &v, boost::any param )   { v.visit( *this, param ); }
+  virtual boost::any accept( NoArguVisitor &v )             { return v.visit( *this ); }
+  virtual boost::any accept( Visitor &v, boost::any param ) { return v.visit( *this, param ); }
 
   uint64_t m_extSubtype; ///< \brief Extension type
 };
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-tag.cc b/helper/ccnb-parser/syntax-tree/ccnb-parser-tag.cc
index f045d55..c288be9 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-tag.cc
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-tag.cc
@@ -19,7 +19,8 @@
  */
 
 #include "ccnb-parser-tag.h"
-#include "ns3/ccnb-parser-common.h"
+
+#include "ccnb-parser-base-attr.h"
 
 namespace ns3 {
 namespace CcnbParser {
@@ -53,7 +54,7 @@
     }
   
   if (start.IsEnd ()) //should not be the end
-      throw CcnxDecodingException ();
+      throw CcnbDecodingException ();
 
   start.ReadU8 (); // read CCN_CLOSE
 }
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-tag.h b/helper/ccnb-parser/syntax-tree/ccnb-parser-tag.h
index aea0bcc..c80581d 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-tag.h
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-tag.h
@@ -46,10 +46,10 @@
    */
   Tag (Buffer::Iterator &start, uint32_t length);
 
-  virtual void accept( Visitor &v )                           { v.visit( *this ); }
-  virtual void accept( GJVoidVisitor &v, boost::any param )   { v.visit( *this, param ); }
-  virtual boost::any accept( GJNoArguVisitor &v )             { return v.visit( *this ); }
-  virtual boost::any accept( GJVisitor &v, boost::any param ) { return v.visit( *this, param ); }
+  virtual void accept( VoidNoArguVisitor &v )               { v.visit( *this ); }
+  virtual void accept( VoidVisitor &v, boost::any param )   { v.visit( *this, param ); }
+  virtual boost::any accept( NoArguVisitor &v )             { return v.visit( *this ); }
+  virtual boost::any accept( Visitor &v, boost::any param ) { return v.visit( *this, param ); }
 
   std::string m_tag; ///< \brief Name of TAG block
 };
diff --git a/helper/ccnb-parser/syntax-tree/ccnb-parser-udata.h b/helper/ccnb-parser/syntax-tree/ccnb-parser-udata.h
index c75fc9d..b6ef2c2 100644
--- a/helper/ccnb-parser/syntax-tree/ccnb-parser-udata.h
+++ b/helper/ccnb-parser/syntax-tree/ccnb-parser-udata.h
@@ -44,10 +44,10 @@
    */
   Udata (Buffer::Iterator &start, uint32_t length);
   
-  virtual void accept( Visitor &v )                           { v.visit( *this ); }
-  virtual void accept( GJVoidVisitor &v, boost::any param )   { v.visit( *this, param ); }
-  virtual boost::any accept( GJNoArguVisitor &v )             { return v.visit( *this ); }
-  virtual boost::any accept( GJVisitor &v, boost::any param ) { return v.visit( *this, param ); }
+  virtual void accept( VoidNoArguVisitor &v )               { v.visit( *this ); }
+  virtual void accept( VoidVisitor &v, boost::any param )   { v.visit( *this, param ); }
+  virtual boost::any accept( NoArguVisitor &v )             { return v.visit( *this ); }
+  virtual boost::any accept( Visitor &v, boost::any param ) { return v.visit( *this, param ); }
 
   std::string m_udata; ///< \brief field holding a parsed UDATA value of the block
 };
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-content-object-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-content-object-visitor.cc
index 64f7d0b..d694f11 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-content-object-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-content-object-visitor.cc
@@ -26,6 +26,10 @@
 #include "ns3/name-components.h"
 #include "ns3/assert.h"
 
+#include "ns3/ccnx-content-object-header.h"
+
+#include <boost/foreach.hpp>
+
 namespace ns3 {
 namespace CcnbParser {
 
@@ -35,7 +39,7 @@
 {
   // uint32_t n.m_dtag;
   // std::list<Ptr<Block> > n.m_nestedBlocks;
-  static NameComponentsVisitor m_nameComponentsVisitor;
+  static NameComponentsVisitor nameComponentsVisitor;
   
   CcnxContentObjectHeader &contentObject = boost::any_cast<CcnxContentObjectHeader&> (param);
   
@@ -43,7 +47,7 @@
     {
     case CCN_DTAG_ContentObject:
       // process nested blocks
-      BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+      BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
         {
           block->accept (*this, param);
         }
@@ -53,7 +57,7 @@
         // process name components
         Ptr<Name::Components> name = Create<Name::Components> ();
         
-        BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+        BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
           {
             block->accept (nameComponentsVisitor, *name);
           }
@@ -66,7 +70,7 @@
       break;
     case CCN_DTAG_Content: // !!! HACK
       // This hack was necessary for memory optimizations (i.e., content is virtual payload)
-      NS_ASSERT_MSG (n.m_nestedBlocks.size() == 0, "Parser should have stopped just after processing <Content> tag");
+      NS_ASSERT_MSG (n.m_nestedTags.size() == 0, "Parser should have stopped just after processing <Content> tag");
       break;
     }
 }
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-depth-first-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-depth-first-visitor.cc
index aa78e85..514f444 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-depth-first-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-depth-first-visitor.cc
@@ -34,21 +34,21 @@
 namespace CcnbParser {
 
 boost::any
-GJDepthFirstVisitor::visit (Blob &n, boost::any param)
+DepthFirstVisitor::visit (Blob &n, boost::any param)
 {
   // Buffer n.m_blob;
   return n.m_blob;
 }
  
 boost::any
-GJDepthFirstVisitor::visit (Udata &n, boost::any param)
+DepthFirstVisitor::visit (Udata &n, boost::any param)
 {
   // std::string n.m_udata;
   return n.m_udata;
 }
  
 boost::any
-GJDepthFirstVisitor::visit (Tag &n, boost::any param)
+DepthFirstVisitor::visit (Tag &n, boost::any param)
 {
   // std::string n.m_tag;
   // std::list<Ptr<Block> > n.m_attrs;
@@ -57,7 +57,7 @@
     {
       block->accept (*this, param);
     }
-  BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+  BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
     {
       block->accept (*this, param);
     }
@@ -65,7 +65,7 @@
 }
 
 boost::any
-GJDepthFirstVisitor::visit (Dtag &n, boost::any param)
+DepthFirstVisitor::visit (Dtag &n, boost::any param)
 {
   // std::string n.m_tag;
   // std::list<Ptr<Block> > n.m_attrs;
@@ -74,7 +74,7 @@
     {
       block->accept (*this, param);
     }
-  BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+  BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
     {
       block->accept (*this, param);
     }
@@ -82,7 +82,7 @@
 }
 
 boost::any
-GJDepthFirstVisitor::visit (Attr &n, boost::any param)
+DepthFirstVisitor::visit (Attr &n, boost::any param)
 {
   // std::string n.m_attr;
   // Ptr<Udata> n.m_value;
@@ -90,7 +90,7 @@
 }
 
 boost::any
-GJDepthFirstVisitor::visit (Dattr &n, boost::any param)
+DepthFirstVisitor::visit (Dattr &n, boost::any param)
 {
   // uint32_t n.m_dattr;
   // Ptr<Udata> n.m_value;
@@ -98,7 +98,7 @@
 }
  
 boost::any
-GJDepthFirstVisitor::visit (Ext &n, boost::any param)
+DepthFirstVisitor::visit (Ext &n, boost::any param)
 {
   // uint64_t n.m_extSubtype;
   return n.m_extSubtype;
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-interest-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-interest-visitor.cc
index d33b2b0..ccb40b2 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-interest-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-interest-visitor.cc
@@ -20,6 +20,15 @@
 
 #include "ccnb-parser-interest-visitor.h"
 
+#include "ns3/ccnb-parser-block.h"
+#include "ns3/ccnb-parser-dtag.h"
+#include "ns3/name-components.h"
+#include "ns3/assert.h"
+
+#include "ns3/ccnx-interest-header.h"
+
+#include <boost/foreach.hpp>
+
 namespace ns3 {
 namespace CcnbParser {
 
@@ -31,7 +40,7 @@
   // std::list<Ptr<Block> > n.m_nestedBlocks;
 
   static NonNegativeIntegerVisitor nonNegativeIntegerVisitor;
-  static NameComponentsVisitor     m_nameComponentsVisitor;
+  static NameComponentsVisitor     nameComponentsVisitor;
   
   CcnxInterestHeader &interest = boost::any_cast<CcnxInterestHeader&> (param);
   
@@ -39,7 +48,7 @@
     {
     case CCN_DTAG_Interest:
       // process nested blocks
-      BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+      BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
         {
           block->accept (*this, param);
         }
@@ -49,7 +58,7 @@
         // process name components
         Ptr<Name::Components> name = Create<Name::Components> ();
         
-        BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+        BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
           {
             block->accept (nameComponentsVisitor, *name);
           }
@@ -57,20 +66,20 @@
         break;
       }
     case CCN_DTAG_MinSuffixComponents:
-      if (n.m_nestedBlocks.size()!=1) // should be exactly one UDATA inside this tag
-        throw CcnxDecodingException ();
+      if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
+        throw CcnbDecodingException ();
       interest.SetMinSuffixComponents (
                boost::any_cast<uint32_t> (
-                                          (*n.m_nestedBlocks.begin())->accept(
+                                          (*n.m_nestedTags.begin())->accept(
                                                                            nonNegativeIntegerVisitor
                                                                            )));
       break;
     case CCN_DTAG_MaxSuffixComponents:
-      if (n.m_nestedBlocks.size()!=1) // should be exactly one UDATA inside this tag
-        throw CcnxDecodingException ();
+      if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
+        throw CcnbDecodingException ();
       interest.SetMaxSuffixComponents (
                boost::any_cast<uint32_t> (
-                                          (*n.m_nestedBlocks.begin())->accept(
+                                          (*n.m_nestedTags.begin())->accept(
                                                                            nonNegativeIntegerVisitor
                                                                            )));
       break;
@@ -79,7 +88,7 @@
         // process exclude components
         Ptr<Name::Components> exclude = Create<Name::Components> ();
         
-        BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+        BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
           {
             block->accept (nameComponentsVisitor, *exclude);
           }
@@ -87,42 +96,42 @@
         break;
       }
     case CCN_DTAG_ChildSelector:
-      if (n.m_nestedBlocks.size()!=1) // should be exactly one UDATA inside this tag
-        throw CcnxDecodingException ();
+      if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
+        throw CcnbDecodingException ();
 
       interest.SetChildSelector (
                1 == boost::any_cast<uint32_t> (
-                                          (*n.m_nestedBlocks.begin())->accept(
+                                          (*n.m_nestedTags.begin())->accept(
                                                                            nonNegativeIntegerVisitor
                                                                            )));
       break;
     case CCN_DTAG_AnswerOriginKind:
-      if (n.m_nestedBlocks.size()!=1) // should be exactly one UDATA inside this tag
-        throw CcnxDecodingException ();
+      if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
+        throw CcnbDecodingException ();
       interest.SetAnswerOriginKind (
                1 == boost::any_cast<uint32_t> (
-                                          (*n.m_nestedBlocks.begin())->accept(
+                                          (*n.m_nestedTags.begin())->accept(
                                                                            nonNegativeIntegerVisitor
                                                                            )));
       break;
     case CCN_DTAG_Scope: 
-      if (n.m_nestedBlocks.size()!=1) // should be exactly one UDATA inside this tag
-        throw CcnxDecodingException ();
+      if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
+        throw CcnbDecodingException ();
       interest.SetScope (
                boost::any_cast<uint32_t> (
-                                          (*n.m_nestedBlocks.begin())->accept(
+                                          (*n.m_nestedTags.begin())->accept(
                                                                            nonNegativeIntegerVisitor
                                                                            )));
       break;
     case CCN_DTAG_InterestLifetime:
-      if (n.m_nestedBlocks.size()!=1) // should be exactly one UDATA inside this tag
-        throw CcnxDecodingException ();
+      if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
+        throw CcnbDecodingException ();
 
       /// \todo Decode InterestLifetime
       break;
     case CCN_DTAG_Nonce:
-      if (n.m_nestedBlocks.size()!=1) // should be exactly one UDATA inside this tag
-        throw CcnxDecodingException ();
+      if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
+        throw CcnbDecodingException ();
 
       /// \todo Decode Nonce
       break;
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-name-components-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-name-components-visitor.cc
index 5ffd71f..3138be1 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-name-components-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-name-components-visitor.cc
@@ -39,10 +39,10 @@
   switch (n.m_dtag)
     {
     case CCN_DTAG_Component:
-      if (n.m_nestedBlocks.size()!=1) // should be exactly one UDATA inside this tag
-        throw CcnxDecodingException ();
+      if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
+        throw CcnbDecodingException ();
       components.Add (
-                      boost::any_cast<std::string> ((*n.m_nestedBlocks.begin())->accept(
+                      boost::any_cast<std::string> ((*n.m_nestedTags.begin())->accept(
                                                                                         stringVisitor
                                                                                         )));
       break;
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-no-argu-depth-first-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-no-argu-depth-first-visitor.cc
index 6cd9aac..f81a350 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-no-argu-depth-first-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-no-argu-depth-first-visitor.cc
@@ -57,7 +57,7 @@
     {
       block->accept (*this);
     }
-  BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+  BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
     {
       block->accept (*this);
     }
@@ -74,7 +74,7 @@
     {
       block->accept (*this);
     }
-  BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+  BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
     {
       block->accept (*this);
     }
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-no-argu-visitor.h b/helper/ccnb-parser/visitors/ccnb-parser-no-argu-visitor.h
index ea3b56b..3e1750f 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-no-argu-visitor.h
+++ b/helper/ccnb-parser/visitors/ccnb-parser-no-argu-visitor.h
@@ -21,7 +21,7 @@
 #ifndef _CCNB_PARSER_NO_ARGU_VISITOR_H_
 #define _CCNB_PARSER_NO_ARGU_VISITOR_H_
 
-#include "ccnb-parser-commoh.h"
+#include "ns3/ccnb-parser-commoh.h"
 #include <boost/any.hpp>
 
 namespace ns3 {
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-non-negative-integer-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-non-negative-integer-visitor.cc
index 319eefa..e393770 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-non-negative-integer-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-non-negative-integer-visitor.cc
@@ -31,7 +31,7 @@
 NonNegativeIntegerVisitor::visit (Blob &n) //to throw parsing error
 {
   // Buffer n.m_blob;
-  throw CcnxDecodingException ();
+  throw CcnbDecodingException ();
 }
 
 boost::any
@@ -42,7 +42,7 @@
   int32_t value;
   is >> value;
   if (value<0) // value should be non-negative
-    throw CcnxDecodingException ();
+    throw CcnbDecodingException ();
 
   return static_cast<uint32_t> (value);
 }
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-string-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-string-visitor.cc
index 078b326..33c9465 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-string-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-string-visitor.cc
@@ -19,6 +19,7 @@
  */
 
 #include "ccnb-parser-string-visitor.h"
+#include "ns3/ccnb-parser-udata.h"
 
 namespace ns3 {
 namespace CcnbParser {
@@ -27,7 +28,7 @@
 StringVisitor::visit (Blob &n) 
 {
   // Buffer n.m_blob;
-  throw CcnxDecodingException ();
+  throw CcnbDecodingException ();
 }
 
 boost::any
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-visitor.h b/helper/ccnb-parser/visitors/ccnb-parser-visitor.h
index d098c3e..aa6911b 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-visitor.h
+++ b/helper/ccnb-parser/visitors/ccnb-parser-visitor.h
@@ -21,7 +21,7 @@
 #ifndef _CCNB_PARSER_VISITOR_H_
 #define _CCNB_PARSER_VISITOR_H_
 
-#include "ccnb-parser-commoh.h"
+#include "ns3/ccnb-parser-commoh.h"
 #include <boost/any.hpp>
 
 namespace ns3 {
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-void-depth-first-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-void-depth-first-visitor.cc
index c2b8401..1c9a28a 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-void-depth-first-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-void-depth-first-visitor.cc
@@ -55,7 +55,7 @@
     {
       block->accept (*this, param);
     }
-  BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+  BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
     {
       block->accept (*this, param);
     }
@@ -71,7 +71,7 @@
     {
       block->accept (*this, param);
     }
-  BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+  BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
     {
       block->accept (*this, param);
     }
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-void-no-argu-depth-first-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-void-no-argu-depth-first-visitor.cc
index 7f8e6de..1944b2a 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-void-no-argu-depth-first-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-void-no-argu-depth-first-visitor.cc
@@ -55,7 +55,7 @@
     {
       block->accept (*this);
     }
-  BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+  BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
     {
       block->accept (*this);
     }
@@ -71,7 +71,7 @@
     {
       block->accept (*this);
     }
-  BOOST_FOREACH (Ptr<Block> block, n.m_nestedBlocks)
+  BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
     {
       block->accept (*this);
     }
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-void-no-argu-visitor.h b/helper/ccnb-parser/visitors/ccnb-parser-void-no-argu-visitor.h
index ef45c98..5941350 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-void-no-argu-visitor.h
+++ b/helper/ccnb-parser/visitors/ccnb-parser-void-no-argu-visitor.h
@@ -21,7 +21,7 @@
 #ifndef _CCNB_PARSER_VOID_NO_ARGU_VISITOR_H_
 #define _CCNB_PARSER_VOID_NO_ARGU_VISITOR_H_
 
-#include "ccnb-parser-commoh.h"
+#include "ns3/ccnb-parser-commoh.h"
 
 namespace ns3 {
 namespace CcnbParser {
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-void-visitor.h b/helper/ccnb-parser/visitors/ccnb-parser-void-visitor.h
index 7f412c2..9ef1e3c 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-void-visitor.h
+++ b/helper/ccnb-parser/visitors/ccnb-parser-void-visitor.h
@@ -21,7 +21,7 @@
 #ifndef _CCNB_PARSER_VOID_VISITOR_H_
 #define _CCNB_PARSER_VOID_VISITOR_H_
 
-#include "ccnb-parser-commoh.h"
+#include "ns3/ccnb-parser-commoh.h"
 #include <boost/any.hpp>
 
 namespace ns3 {
diff --git a/helper/ccnx-decoding-helper.cc b/helper/ccnx-decoding-helper.cc
index 553beb3..1ebb0e8 100644
--- a/helper/ccnx-decoding-helper.cc
+++ b/helper/ccnx-decoding-helper.cc
@@ -20,18 +20,22 @@
 
 #include "ccnx-decoding-helper.h"
 
-// #include "ns3/ccnx-interest-header.h"
-// #include "ns3/ccnx-content-object-header.h"
+#include "ns3/ccnx-interest-header.h"
+#include "ns3/ccnx-content-object-header.h"
+
+#include "ns3/ccnb-parser-interest-visitor.h"
+#include "ns3/ccnb-parser-content-object-visitor.h"
+#include "ns3/ccnb-parser-block.h"
 
 namespace ns3 {
 
 size_t
 CcnxDecodingHelper::Deserialize (Buffer::Iterator start, const CcnxInterestHeader &interest)
 {
-  static InterestVisitor interestVisitor;
+  static CcnbParser::InterestVisitor interestVisitor;
 
   Buffer::Iterator i = start;
-  Ptr<CcnxParser::Block> root = CcnxParser::Block::ParseBlock (i);
+  Ptr<CcnbParser::Block> root = CcnbParser::Block::ParseBlock (i);
   root->accept (interestVisitor, interest);
 
   return i.GetDistanceFrom (start);
@@ -40,10 +44,10 @@
 size_t
 CcnxDecodingHelper::Deserialize (Buffer::Iterator start, const CcnxContentObjectHeader &contentObject)
 {
-  static ContentObjectVisitor contentObjectVisitor;
+  static CcnbParser::ContentObjectVisitor contentObjectVisitor;
 
   Buffer::Iterator i = start;
-  Ptr<CcnxParser::Block> root = CcnxParser::Block::ParseBlock (i);
+  Ptr<CcnbParser::Block> root = CcnbParser::Block::ParseBlock (i);
   root->accept (contentObjectVisitor, contentObject);
 
   return i.GetDistanceFrom (start);
diff --git a/helper/ccnx-decoding-helper.h b/helper/ccnx-decoding-helper.h
index 375a57a..2e41769 100644
--- a/helper/ccnx-decoding-helper.h
+++ b/helper/ccnx-decoding-helper.h
@@ -21,6 +21,9 @@
 #ifndef _CCNX_DECODING_HELPER_H_
 #define _CCNX_DECODING_HELPER_H_
 
+#include <cstring>
+#include "ns3/buffer.h"
+
 namespace ns3 {
 
 class CcnxInterestHeader;
diff --git a/helper/ccnx-encoding-helper.cc b/helper/ccnx-encoding-helper.cc
index 21ca9ae..7783d7a 100644
--- a/helper/ccnx-encoding-helper.cc
+++ b/helper/ccnx-encoding-helper.cc
@@ -35,17 +35,17 @@
 #define CCN_TT_HBIT ((unsigned char)(1 << 7))
 
 size_t
-CcnxEncodingHelper::AppendBlockHeader (Buffer::Iterator start, size_t val, Ccnx::ccn_tt tt)
+CcnxEncodingHelper::AppendBlockHeader (Buffer::Iterator start, size_t val, CcnbParser::ccn_tt tt)
 {
   unsigned char buf[1+8*((sizeof(val)+6)/7)];
   unsigned char *p = &(buf[sizeof(buf)-1]);
   size_t n = 1;
-  p[0] = (CCN_TT_HBIT & ~Ccnx::CCN_CLOSE) |
+  p[0] = (CCN_TT_HBIT & ~CcnbParser::CCN_CLOSE) |
   ((val & CCN_MAX_TINY) << CCN_TT_BITS) |
   (CCN_TT_MASK & tt);
   val >>= (7-CCN_TT_BITS);
   while (val != 0) {
-    (--p)[0] = (((unsigned char)val) & ~CCN_TT_HBIT) | Ccnx::CCN_CLOSE;
+    (--p)[0] = (((unsigned char)val) & ~CCN_TT_HBIT) | CcnbParser::CCN_CLOSE;
     n++;
     val >>= 7;
   }
@@ -60,7 +60,7 @@
   os << number;
 
   size_t written = 0;
-  written += AppendBlockHeader (start, os.str().size(), Ccnx::CCN_UDATA);
+  written += AppendBlockHeader (start, os.str().size(), CcnbParser::CCN_UDATA);
   written += os.str().size();
   start.Write (reinterpret_cast<const unsigned char*>(os.str().c_str()), os.str().size());
 
@@ -71,7 +71,7 @@
 size_t
 CcnxEncodingHelper::CcnxEncodingHelper::AppendCloser (Buffer::Iterator start)
 {
-  start.WriteU8 (Ccnx::CCN_CLOSE);
+  start.WriteU8 (CcnbParser::CCN_CLOSE);
   return 1;
 }
 
@@ -81,7 +81,7 @@
   size_t written = 0;
   BOOST_FOREACH (const std::string &component, name.GetComponents())
     {
-      written += AppendTaggedBlob (start, Ccnx::CCN_DTAG_Component,
+      written += AppendTaggedBlob (start, CcnbParser::CCN_DTAG_Component,
                                    reinterpret_cast<const uint8_t*>(component.c_str()), component.size());
     }
   return written;
@@ -98,7 +98,7 @@
   for (;  required_bytes < 7 && ts != 0; ts >>= 8) // not more than 6 bytes?
      required_bytes++;
   
-  size_t len = AppendBlockHeader(start, required_bytes, Ccnx::CCN_BLOB);
+  size_t len = AppendBlockHeader(start, required_bytes, CcnbParser::CCN_BLOB);
 
   // write part with seconds
   ts = time.ToInteger (Time::S) >> 4;
@@ -114,13 +114,13 @@
 }
 
 size_t
-CcnxEncodingHelper::AppendTaggedBlob (Buffer::Iterator start, Ccnx::ccn_dtag dtag,
+CcnxEncodingHelper::AppendTaggedBlob (Buffer::Iterator start, CcnbParser::ccn_dtag dtag,
                   const uint8_t *data, size_t size)
 {
-  size_t written = AppendBlockHeader (start, dtag, Ccnx::CCN_DTAG);
+  size_t written = AppendBlockHeader (start, dtag, CcnbParser::CCN_DTAG);
   if (size>0)
     {
-      written += AppendBlockHeader (start, size, Ccnx::CCN_BLOB);
+      written += AppendBlockHeader (start, size, CcnbParser::CCN_BLOB);
       start.Write (data, size);
       written += size;
     }
@@ -134,58 +134,58 @@
 CcnxEncodingHelper::Serialize (Buffer::Iterator start, const CcnxInterestHeader &interest)
 {
   size_t written = 0;
-  written += AppendBlockHeader (start, Ccnx::CCN_DTAG_Interest, Ccnx::CCN_DTAG); // <Interest>
+  written += AppendBlockHeader (start, CcnbParser::CCN_DTAG_Interest, CcnbParser::CCN_DTAG); // <Interest>
   
-  written += AppendBlockHeader (start, Ccnx::CCN_DTAG_Name, Ccnx::CCN_DTAG); // <Name>
+  written += AppendBlockHeader (start, CcnbParser::CCN_DTAG_Name, CcnbParser::CCN_DTAG); // <Name>
   written += AppendNameComponents (start, interest.GetName());                // <Component>...</Component>...
   written += AppendCloser (start);                               // </Name>
 
   if (interest.GetMinSuffixComponents() >= 0)
     {
-      written += AppendBlockHeader (start, Ccnx::CCN_DTAG_MinSuffixComponents, Ccnx::CCN_DTAG);
+      written += AppendBlockHeader (start, CcnbParser::CCN_DTAG_MinSuffixComponents, CcnbParser::CCN_DTAG);
       written += AppendNumber (start, interest.GetMinSuffixComponents ());
       written += AppendCloser (start);
     }
   if (interest.GetMaxSuffixComponents() >= 0)
     {
-      written += AppendBlockHeader (start, Ccnx::CCN_DTAG_MaxSuffixComponents, Ccnx::CCN_DTAG);
+      written += AppendBlockHeader (start, CcnbParser::CCN_DTAG_MaxSuffixComponents, CcnbParser::CCN_DTAG);
       written += AppendNumber (start, interest.GetMaxSuffixComponents ());
       written += AppendCloser (start);
     }
   if (interest.GetExclude().size() > 0)
     {
-      written += AppendBlockHeader (start, Ccnx::CCN_DTAG_Exclude, Ccnx::CCN_DTAG); // <Exclude>
+      written += AppendBlockHeader (start, CcnbParser::CCN_DTAG_Exclude, CcnbParser::CCN_DTAG); // <Exclude>
       written += AppendNameComponents (start, interest.GetExclude());                // <Component>...</Component>...
       written += AppendCloser (start);                                  // </Exclude>
     }
   if (interest.IsEnabledChildSelector())
     {
-      written += AppendBlockHeader (start, Ccnx::CCN_DTAG_ChildSelector, Ccnx::CCN_DTAG);
+      written += AppendBlockHeader (start, CcnbParser::CCN_DTAG_ChildSelector, CcnbParser::CCN_DTAG);
       written += AppendNumber (start, 1);
       written += AppendCloser (start);
     }
   if (interest.IsEnabledAnswerOriginKind())
     {
-      written += AppendBlockHeader (start, Ccnx::CCN_DTAG_AnswerOriginKind, Ccnx::CCN_DTAG);
+      written += AppendBlockHeader (start, CcnbParser::CCN_DTAG_AnswerOriginKind, CcnbParser::CCN_DTAG);
       written += AppendNumber (start, 1);
       written += AppendCloser (start);
     }
   if (interest.GetScope() >= 0)
     {
-      written += AppendBlockHeader (start, Ccnx::CCN_DTAG_Scope, Ccnx::CCN_DTAG);
+      written += AppendBlockHeader (start, CcnbParser::CCN_DTAG_Scope, CcnbParser::CCN_DTAG);
       written += AppendNumber (start, interest.GetScope ());
       written += AppendCloser (start);
     }
   if (!interest.GetInterestLifetime().IsZero())
     {
-      written += AppendBlockHeader (start, Ccnx::CCN_DTAG_InterestLifetime, Ccnx::CCN_DTAG);
+      written += AppendBlockHeader (start, CcnbParser::CCN_DTAG_InterestLifetime, CcnbParser::CCN_DTAG);
       written += AppendTimestampBlob (start, interest.GetInterestLifetime());
       written += AppendCloser (start);
     }
   if (interest.GetNonce()>0)
     {
       uint32_t nonce = interest.GetNonce();
-      written += AppendTaggedBlob (start, Ccnx::CCN_DTAG_Nonce,
+      written += AppendTaggedBlob (start, CcnbParser::CCN_DTAG_Nonce,
                                    reinterpret_cast<const uint8_t*>(&nonce),
                                    sizeof(nonce));
     }
@@ -198,32 +198,32 @@
 CcnxEncodingHelper::Serialize (Buffer::Iterator start, const CcnxContentObjectHeader &contentObject)
 {
   size_t written = 0;
-  written += AppendBlockHeader (start, Ccnx::CCN_DTAG_ContentObject, Ccnx::CCN_DTAG); // <ContentObject>
+  written += AppendBlockHeader (start, CcnbParser::CCN_DTAG_ContentObject, CcnbParser::CCN_DTAG); // <ContentObject>
 
   // fake signature
-  written += AppendBlockHeader (start, Ccnx::CCN_DTAG_Signature, Ccnx::CCN_DTAG); // <Signature>
+  written += AppendBlockHeader (start, CcnbParser::CCN_DTAG_Signature, CcnbParser::CCN_DTAG); // <Signature>
   // Signature ::= DigestAlgorithm? 
   //               Witness?         
   //               SignatureBits   
-  written += AppendTaggedBlob (start, Ccnx::CCN_DTAG_SignatureBits, 0, 0);      // <SignatureBits />
+  written += AppendTaggedBlob (start, CcnbParser::CCN_DTAG_SignatureBits, 0, 0);      // <SignatureBits />
   written += AppendCloser (start);                                    // </Signature>  
 
-  written += AppendBlockHeader (start, Ccnx::CCN_DTAG_Name, Ccnx::CCN_DTAG);    // <Name>
+  written += AppendBlockHeader (start, CcnbParser::CCN_DTAG_Name, CcnbParser::CCN_DTAG);    // <Name>
   written += AppendNameComponents (start, contentObject.GetName()); //   <Component>...</Component>...
   written += AppendCloser (start);                                  // </Name>  
 
   // fake signature
-  written += AppendBlockHeader (start, Ccnx::CCN_DTAG_SignedInfo, Ccnx::CCN_DTAG); // <SignedInfo>
+  written += AppendBlockHeader (start, CcnbParser::CCN_DTAG_SignedInfo, CcnbParser::CCN_DTAG); // <SignedInfo>
   // SignedInfo ::= PublisherPublicKeyDigest
   //                Timestamp
   //                Type?
   //                FreshnessSeconds?
   //                FinalBlockID?
   //                KeyLocator?
-  written += AppendTaggedBlob (start, Ccnx::CCN_DTAG_PublisherPublicKeyDigest, 0, 0); // <PublisherPublicKeyDigest />
+  written += AppendTaggedBlob (start, CcnbParser::CCN_DTAG_PublisherPublicKeyDigest, 0, 0); // <PublisherPublicKeyDigest />
   written += AppendCloser (start);                                     // </SignedInfo>
 
-  written += AppendBlockHeader (start, Ccnx::CCN_DTAG_Content, Ccnx::CCN_DTAG); // <Content>
+  written += AppendBlockHeader (start, CcnbParser::CCN_DTAG_Content, CcnbParser::CCN_DTAG); // <Content>
 
   // there is no closing tag !!!
   return written;
diff --git a/helper/ccnx-encoding-helper.h b/helper/ccnx-encoding-helper.h
index 90fad22..da5066a 100644
--- a/helper/ccnx-encoding-helper.h
+++ b/helper/ccnx-encoding-helper.h
@@ -23,7 +23,7 @@
 
 #include <sys/types.h>
 
-#include "ns3/ccnx.h"
+#include "ns3/ccnb-parser-common.h"
 #include "ns3/ptr.h"
 #include "ns3/nstime.h"
 #include "ns3/buffer.h"
@@ -50,7 +50,7 @@
 
 private:
   static size_t
-  AppendBlockHeader (Buffer::Iterator start, size_t value, Ccnx::ccn_tt block_type);
+  AppendBlockHeader (Buffer::Iterator start, size_t value, CcnbParser::ccn_tt block_type);
 
   static size_t
   AppendNumber (Buffer::Iterator start, uint32_t number);
@@ -86,7 +86,7 @@
    * @returns written length
    */
   static size_t
-  AppendTaggedBlob (Buffer::Iterator start, Ccnx::ccn_dtag dtag,
+  AppendTaggedBlob (Buffer::Iterator start, CcnbParser::ccn_dtag dtag,
                     const uint8_t *data, size_t size);
   
 };