diff --git a/ndn-cpp/Name.cpp b/ndn-cpp/Name.cpp
index c777ebe..3b98fa7 100644
--- a/ndn-cpp/Name.cpp
+++ b/ndn-cpp/Name.cpp
@@ -5,15 +5,20 @@
  */
 
 #include <sstream>
-#include "c/Name.h"
 #include "Name.hpp"
 
 using namespace std;
 
 namespace ndn {
 
-Name::Name() 
+void Name::get(struct ndn_Name &nameStruct) 
 {
+  if (nameStruct.maxComponents < components_.size())
+    throw runtime_error("nameStruct.maxComponents must be >= this name getNComponents()");
+  
+  nameStruct.nComponents = components_.size();
+  for (unsigned int i = 0; i < nameStruct.nComponents; ++i)
+    components_[i].get(nameStruct.components[i]);
 }
   
 void Name::set(struct ndn_Name &nameStruct) 
@@ -23,26 +28,14 @@
     addComponent(nameStruct.components[i].value, nameStruct.components[i].valueLength);  
 }
 
-void Name::get(struct ndn_Name &nameStruct) 
-{
-  if (nameStruct.maxComponents < components_.size())
-    throw runtime_error("nameStruct.maxComponents must be >= this name getNComponents()");
-  
-  nameStruct.nComponents = components_.size();
-  for (unsigned int i = 0; i < nameStruct.nComponents; ++i) {
-    nameStruct.components[i].value = &components_[i][0];
-    nameStruct.components[i].valueLength = components_[i].size();
-  }  
-}
-
 std::string Name::to_uri()
 {
   // TODO: implement fully.
   ostringstream output;
   for (unsigned int i = 0; i < components_.size(); ++i) {
     output << "/";
-    for (unsigned int j = 0; j < components_[i].size(); ++j)
-      output << components_[i][j];
+    for (unsigned int j = 0; j < components_[i].getValue().size(); ++j)
+      output << components_[i].getValue()[j];
   }
   
   return output.str();
diff --git a/ndn-cpp/Name.hpp b/ndn-cpp/Name.hpp
index 802aaae..3ec6511 100644
--- a/ndn-cpp/Name.hpp
+++ b/ndn-cpp/Name.hpp
@@ -9,15 +9,39 @@
 
 #include <vector>
 #include "common.h"
+#include "c/Name.h"
 #include "encoding/BinaryXMLWireFormat.hpp"
 
-extern "C" { struct ndn_Name; }
-
 namespace ndn {
   
+class NameComponent {
+public:
+  NameComponent(unsigned char * value, unsigned int valueLen) 
+  : value_(value, value + valueLen)
+  {
+  }
+  
+  /**
+   * Set the componentStruct to point to this component, without copying any memory.
+   * WARNING: The resulting pointer in componentStruct is invalid after a further use of this object which could reallocate memory.
+   * @param componentStruct the C ndn_NameComponent struct to receive the pointer.
+   */
+  void get(struct ndn_NameComponent &componentStruct) 
+  {
+    componentStruct.value = &value_[0];
+    componentStruct.valueLength = value_.size(); 
+  }
+  
+  const std::vector<unsigned char> &getValue() const { return value_; }
+  
+private:
+  std::vector<unsigned char> value_;
+}; 
+  
 class Name {
 public:
-  Name();
+  Name() {
+  }
   Name(const char *uri);
   
   void encode(std::vector<unsigned char> &output, WireFormat &wireFormat) {
@@ -34,23 +58,23 @@
   }
   
   /**
+   * Set the nameStruct to point to the components in this name, without copying any memory.
+   * WARNING: The resulting pointers in nameStruct are invalid after a further use of this object which could reallocate memory.
+   * @param nameStruct a C ndn_Name struct where the components array is already allocated.
+   */
+  void get(struct ndn_Name &nameStruct);
+  
+  /**
    * Clear the name, and set the components by copying from the name struct.
    * @param name a C ndn_Name struct
    */
   void set(struct ndn_Name &nameStruct);
   
   /**
-   * Set the nameStruct to point to the components in this name, without copying any memory.
-   * WARNING: The resulting pointers in nameStruct are invalid after a further use of this name which could reallocate the components memory.
-   * @param nameStruct a C ndn_Name struct where the components array is already allocated.
-   */
-  void get(struct ndn_Name &nameStruct);
-  
-  /**
    * Add a new component, copying from value of length valueLength.
    */
   void addComponent(unsigned char *value, unsigned int valueLength) {
-    components_.push_back(std::vector<unsigned char>(value, value + valueLength));
+    components_.push_back(NameComponent(value, valueLength));
   }
   
   /**
@@ -75,7 +99,7 @@
   std::string to_uri();
   
 private:
-  std::vector<std::vector<unsigned char> > components_;
+  std::vector<NameComponent> components_;
 };  
 
 }
