diff --git a/ndn.cxx/name-component.cc b/ndn.cxx/name-component.cc
index fed4bab..8aa522c 100644
--- a/ndn.cxx/name-component.cc
+++ b/ndn.cxx/name-component.cc
@@ -23,6 +23,24 @@
 
 Component::Component (const std::string &uri)
 {
+  copy (uri.begin (), uri.end (), back_inserter (*this));
+}
+
+Component::Component (std::string::const_iterator begin, std::string::const_iterator end)
+{
+  copy (begin, end, back_inserter (*this));
+}
+
+Component::Component (const void *buf, size_t length)
+{
+  copy (static_cast<const char*> (buf),
+        static_cast<const char*> (buf)+length,
+        back_inserter (*this));
+}
+
+Component &
+Component::fromUri (const std::string &uri)
+{
   try
     {
       Uri::fromEscaped (uri.begin (), uri.end (), back_inserter (*this));
@@ -34,9 +52,12 @@
                              << error::msg (uri)
                              << error::pos (error::get_pos (err)));
     }
+
+  return *this;
 }
 
-Component::Component (std::string::const_iterator begin, std::string::const_iterator end)
+Component &
+Component::fromUri (std::string::const_iterator begin, std::string::const_iterator end)
 {
   try
     {
@@ -49,13 +70,7 @@
                              << error::msg (std::string (begin, end))
                              << error::pos (error::get_pos (err)));
     }
-}
-
-Component::Component (const void *buf, size_t length)
-{
-  copy (static_cast<const char*> (buf),
-        static_cast<const char*> (buf)+length,
-        back_inserter (*this));
+  return *this;
 }
 
 int
@@ -76,33 +91,31 @@
   return (std::lexicographical_compare (diff.first, end (), diff.second, other.end ())) ? -1 : +1;    
 }
 
-Component
+Component &
 Component::fromNumber (uint64_t number)
 {
-  Component comp;
   while (number > 0)
     {
-      comp.push_back (static_cast<unsigned char> (number & 0xFF));
+      this->push_back (static_cast<unsigned char> (number & 0xFF));
       number >>= 8;
     }
-  std::reverse (comp.begin (), comp.end ());
-  return comp;
+  std::reverse (this->begin (), this->end ());
+  return *this;
 }
 
-Component
+Component &
 Component::fromNumberWithMarker (uint64_t number, unsigned char marker)
 {
-  Component comp;
-  comp.push_back (marker);
+  this->push_back (marker);
 
   while (number > 0)
     {
-      comp.push_back (static_cast<unsigned char> (number & 0xFF));
+      this->push_back (static_cast<unsigned char> (number & 0xFF));
       number >>= 8;
     }
 
-  std::reverse (comp.begin () + 1, comp.end ());
-  return comp;
+  std::reverse (this->begin () + 1, this->end ());
+  return *this;
 }
 
 std::string
diff --git a/ndn.cxx/name-component.h b/ndn.cxx/name-component.h
index 56291ea..e1b7296 100644
--- a/ndn.cxx/name-component.h
+++ b/ndn.cxx/name-component.h
@@ -104,9 +104,27 @@
   ////////////////////////////////////
 
   /**
+   * @brief Create component from URI encoded string
+   * @param uri URI encoded name component (convert escaped with % characters)
+   * @return *this
+   */
+  Component &
+  fromUri (const std::string &uri);
+
+  /**
+   * @brief Create component from URI encoded string, with string specified by a pair of iterators
+   * @param begin begin iterator pointing to the URI encoded name
+   * @param end end iterator
+   * @return *this
+   */
+  Component &
+  fromUri (std::string::const_iterator begin, std::string::const_iterator end);
+  
+  /**
    * @brief Create network-ordered numeric component
    *
    * @param number number to be encoded and added as a component
+   * @return *this
    *
    * Number is encoded and added in network order. Tail zero-bytes are not included.
    * For example, if the number is 1, then 1-byte binary blob will be added  0x01.
@@ -114,7 +132,7 @@
    *
    * If the number is zero, an empty component will be created
    */
-  static Component
+  Component &
   fromNumber (uint64_t number);
 
   /**
@@ -134,7 +152,7 @@
    *
    * @see fromNumber
    */
-  static Component
+  Component &
   fromNumberWithMarker (uint64_t number, unsigned char marker);
   
   //////////////////////////////////////////////////////////////////////////////////
diff --git a/ndn.cxx/name.cc b/ndn.cxx/name.cc
index 3bb2416..c0a1a57 100644
--- a/ndn.cxx/name.cc
+++ b/ndn.cxx/name.cc
@@ -92,7 +92,8 @@
         break;
       
       string::const_iterator endOfComponent = std::find (i, end, '/');
-      append (name::Component (i, endOfComponent));
+      name::Component comp;
+      appendBySwap (comp.fromUri (i, endOfComponent));
 
       i = endOfComponent;
     }
diff --git a/ndn.cxx/name.h b/ndn.cxx/name.h
index b456bc7..8731323 100644
--- a/ndn.cxx/name.h
+++ b/ndn.cxx/name.h
@@ -483,16 +483,14 @@
 Name::appendNumber (uint64_t number)
 {
   name::Component comp;
-  name::Component::fromNumber (number).swap (comp);
-  return appendBySwap (comp);
+  return appendBySwap (comp.fromNumber (number));
 }
 
 Name &
 Name::appendNumberWithMarker (uint64_t number, unsigned char marker)
 {
   name::Component comp;
-  name::Component::fromNumberWithMarker (number, marker).swap (comp);
-  return appendBySwap (comp);
+  return appendBySwap (comp.fromNumberWithMarker (number, marker));
 }
 
 inline Name &
