diff --git a/ndn-cpp/data.hpp b/ndn-cpp/data.hpp
index ad87674..bca4507 100644
--- a/ndn-cpp/data.hpp
+++ b/ndn-cpp/data.hpp
@@ -148,7 +148,7 @@
   {
   }
   
-  ptr_lib::shared_ptr<std::vector<unsigned char> > wireEncode(WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()) const 
+  Blob wireEncode(WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()) const 
   {
     return wireFormat.encodeData(*this);
   }
@@ -200,7 +200,15 @@
   { 
     content_ = Blob(content, contentLength); 
   }
-    
+      
+  /**
+   * Set content to point to an existing byte array.  IMPORTANT: After calling this,
+   * if you keep a pointer to the array then you must treat the array as immutable and promise not to change it.
+   * @param content A pointer to a vector with the byte array.  This takes another reference and does not copy the bytes.
+   */
+  void setContent(const ptr_lib::shared_ptr<std::vector<unsigned char> > &content) { content_ = content; }
+  void setContent(const ptr_lib::shared_ptr<const std::vector<unsigned char> > &content) { content_ = content; }
+
 private:
   Signature signature_;
   Name name_;
diff --git a/ndn-cpp/encoding/binary-xml-wire-format.cpp b/ndn-cpp/encoding/binary-xml-wire-format.cpp
index 2bb2093..39f7b4a 100644
--- a/ndn-cpp/encoding/binary-xml-wire-format.cpp
+++ b/ndn-cpp/encoding/binary-xml-wire-format.cpp
@@ -24,7 +24,7 @@
   return new BinaryXmlWireFormat();
 }
   
-ptr_lib::shared_ptr<vector<unsigned char> > BinaryXmlWireFormat::encodeInterest(const Interest& interest) 
+Blob BinaryXmlWireFormat::encodeInterest(const Interest& interest) 
 {
   struct ndn_NameComponent nameComponents[100];
   struct ndn_ExcludeEntry excludeEntries[100];
@@ -59,8 +59,7 @@
   interest.set(interestStruct);
 }
 
-ptr_lib::shared_ptr<vector<unsigned char> > BinaryXmlWireFormat::encodeData
-  (const Data& data, unsigned int *signedFieldsBeginOffset, unsigned int *signedFieldsEndOffset) 
+Blob BinaryXmlWireFormat::encodeData(const Data& data, unsigned int *signedFieldsBeginOffset, unsigned int *signedFieldsEndOffset) 
 {
   struct ndn_NameComponent nameComponents[100];
   struct ndn_NameComponent keyNameComponents[100];
@@ -96,7 +95,7 @@
   data.set(dataStruct);
 }
 
-ptr_lib::shared_ptr<vector<unsigned char> > BinaryXmlWireFormat::encodeForwardingEntry(const ForwardingEntry& forwardingEntry) 
+Blob BinaryXmlWireFormat::encodeForwardingEntry(const ForwardingEntry& forwardingEntry) 
 {
   struct ndn_NameComponent prefixNameComponents[100];
   struct ndn_ForwardingEntry forwardingEntryStruct;
diff --git a/ndn-cpp/encoding/binary-xml-wire-format.hpp b/ndn-cpp/encoding/binary-xml-wire-format.hpp
index aca140d..6647566 100644
--- a/ndn-cpp/encoding/binary-xml-wire-format.hpp
+++ b/ndn-cpp/encoding/binary-xml-wire-format.hpp
@@ -19,9 +19,9 @@
   /**
    * Encode interest in binary XML and return the encoding.
    * @param interest The Interest object to encode.
-   * @return A shared_ptr with the vector<unsigned char> containing the encoding.
+   * @return A Blob containing the encoding.
    */  
-  virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeInterest(const Interest& interest);
+  virtual Blob encodeInterest(const Interest& interest);
     
   /**
    * Decode input as an interest in binary XML and set the fields of the interest object.
@@ -38,9 +38,9 @@
    * If you are not encoding in order to sign, you can call encodeData(const Data& data) to ignore this returned value.
    * @param signedFieldsEndOffset Return the offset in the encoding of the end of the fields which are signed.
    * If you are not encoding in order to sign, you can call encodeData(const Data& data) to ignore this returned value.
-   * @return A shared_ptr with the vector<unsigned char> containing the encoding.
+   * @return A Blob containing the encoding.
    */
-  virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeData
+  virtual Blob encodeData
     (const Data& data, unsigned int *signedFieldsBeginOffset, unsigned int *signedFieldsEndOffset);
   
   /**
@@ -61,9 +61,9 @@
   /**
    * Encode forwardingEntry in binary XML and return the encoding. 
    * @param forwardingEntry The ForwardingEntry object to encode.
-   * @return A shared_ptr with the vector<unsigned char> containing the encoding.
+   * @return A Blob containing the encoding.
    */
-  virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeForwardingEntry(const ForwardingEntry& forwardingEntry);
+  virtual Blob encodeForwardingEntry(const ForwardingEntry& forwardingEntry);
   
   /**
    * Decode input as a forwarding entry in binary XML and set the fields of the forwardingEntry object. 
diff --git a/ndn-cpp/encoding/wire-format.cpp b/ndn-cpp/encoding/wire-format.cpp
index e0a4fc0..ced4c18 100644
--- a/ndn-cpp/encoding/wire-format.cpp
+++ b/ndn-cpp/encoding/wire-format.cpp
@@ -26,7 +26,7 @@
   return defaultWireFormat_;
 }
 
-ptr_lib::shared_ptr<vector<unsigned char> > WireFormat::encodeInterest(const Interest& interest) 
+Blob WireFormat::encodeInterest(const Interest& interest) 
 {
   throw logic_error("unimplemented");
 }
@@ -35,8 +35,7 @@
   throw logic_error("unimplemented");
 }
 
-ptr_lib::shared_ptr<vector<unsigned char> > WireFormat::encodeData
-  (const Data& data, unsigned int *signedFieldsBeginOffset, unsigned int *signedFieldsEndOffset) 
+Blob WireFormat::encodeData(const Data& data, unsigned int *signedFieldsBeginOffset, unsigned int *signedFieldsEndOffset) 
 {
   throw logic_error("unimplemented");
 }
@@ -46,7 +45,7 @@
   throw logic_error("unimplemented");
 }
 
-ptr_lib::shared_ptr<vector<unsigned char> > WireFormat::encodeForwardingEntry(const ForwardingEntry& forwardingEntry) 
+Blob WireFormat::encodeForwardingEntry(const ForwardingEntry& forwardingEntry) 
 {
   throw logic_error("unimplemented");
 }
diff --git a/ndn-cpp/encoding/wire-format.hpp b/ndn-cpp/encoding/wire-format.hpp
index b0b2ea4..575b441 100644
--- a/ndn-cpp/encoding/wire-format.hpp
+++ b/ndn-cpp/encoding/wire-format.hpp
@@ -7,7 +7,7 @@
 #define NDN_WIREFORMAT_HPP
 
 #include "../common.hpp"
-#include <vector>
+#include "../util/blob.hpp"
 
 namespace ndn {
   
@@ -20,10 +20,10 @@
   /**
    * Encode interest and return the encoding.  Your derived class should override.
    * @param interest The Interest object to encode.
-   * @return A shared_ptr with the vector<unsigned char> containing the encoding.
+   * @return A Blob containing the encoding.
    * @throw logic_error for unimplemented if the derived class does not override.
    */
-  virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeInterest(const Interest& interest);
+  virtual Blob encodeInterest(const Interest& interest);
   
   /**
    * Decode input as an interest and set the fields of the interest object.  Your derived class should override.
@@ -41,19 +41,19 @@
    * If you are not encoding in order to sign, you can call encodeData(const Data& data) to ignore this returned value.
    * @param signedFieldsEndOffset Return the offset in the encoding of the end of the fields which are signed.
    * If you are not encoding in order to sign, you can call encodeData(const Data& data) to ignore this returned value.
-   * @return A shared_ptr with the vector<unsigned char> containing the encoding.
+   * @return A Blob containing the encoding.
    * @throw logic_error for unimplemented if the derived class does not override.
    */
-  virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeData
+  virtual Blob encodeData
     (const Data& data, unsigned int *signedFieldsBeginOffset, unsigned int *signedFieldsEndOffset);
 
   /**
    * Encode data and return the encoding.
    * @param data The Data object to encode.
-   * @return A shared_ptr with the vector<unsigned char> containing the encoding.
+   * @return A Blob containing the encoding.
    * @throw logic_error for unimplemented if the derived class does not override.
    */
-  ptr_lib::shared_ptr<std::vector<unsigned char> > encodeData(const Data& data)
+  Blob encodeData(const Data& data)
   {
     unsigned int dummyBeginOffset, dummyEndOffset;
     return encodeData(data, &dummyBeginOffset, &dummyEndOffset);
@@ -84,10 +84,10 @@
   /**
    * Encode forwardingEntry and return the encoding.  Your derived class should override.
    * @param forwardingEntry The ForwardingEntry object to encode.
-   * @return A shared_ptr with the vector<unsigned char> containing the encoding.
+   * @return A Blob containing the encoding.
    * @throw logic_error for unimplemented if the derived class does not override.
    */
-  virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeForwardingEntry(const ForwardingEntry& forwardingEntry);
+  virtual Blob encodeForwardingEntry(const ForwardingEntry& forwardingEntry);
   
   /**
    * Decode input as a forwarding entry and set the fields of the forwardingEntry object.  Your derived class should override.
diff --git a/ndn-cpp/forwarding-entry.hpp b/ndn-cpp/forwarding-entry.hpp
index 9919f49..177e5c4 100644
--- a/ndn-cpp/forwarding-entry.hpp
+++ b/ndn-cpp/forwarding-entry.hpp
@@ -31,30 +31,18 @@
   {
   }
   
-  ptr_lib::shared_ptr<std::vector<unsigned char> > wireEncode(WireFormat& wireFormat) const 
+  Blob wireEncode(WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()) const 
   {
     return wireFormat.encodeForwardingEntry(*this);
   }
-  ptr_lib::shared_ptr<std::vector<unsigned char> > wireEncode() const 
-  {
-    return wireEncode(*WireFormat::getDefaultWireFormat());
-  }
-  void wireDecode(const unsigned char *input, unsigned int inputLength, WireFormat& wireFormat) 
+  void wireDecode(const unsigned char *input, unsigned int inputLength, WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()) 
   {
     wireFormat.decodeForwardingEntry(*this, input, inputLength);
   }
-  void wireDecode(const unsigned char *input, unsigned int inputLength) 
-  {
-    wireDecode(input, inputLength, *WireFormat::getDefaultWireFormat());
-  }
-  void wireDecode(const std::vector<unsigned char>& input, WireFormat& wireFormat) 
+  void wireDecode(const std::vector<unsigned char>& input, WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()) 
   {
     wireDecode(&input[0], input.size(), wireFormat);
   }
-  void wireDecode(const std::vector<unsigned char>& input) 
-  {
-    wireDecode(&input[0], input.size());
-  }
   
   /**
    * Set the forwardingEntryStruct to point to the components in this forwarding entry, without copying any memory.
diff --git a/ndn-cpp/interest.hpp b/ndn-cpp/interest.hpp
index 50baaa4..bd7991f 100644
--- a/ndn-cpp/interest.hpp
+++ b/ndn-cpp/interest.hpp
@@ -159,7 +159,7 @@
     construct();
   }
   
-  ptr_lib::shared_ptr<std::vector<unsigned char> > wireEncode(WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()) const 
+  Blob wireEncode(WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()) const 
   {
     return wireFormat.encodeInterest(*this);
   }
diff --git a/ndn-cpp/key.hpp b/ndn-cpp/key.hpp
index 9f4f30e..b28cd33 100644
--- a/ndn-cpp/key.hpp
+++ b/ndn-cpp/key.hpp
@@ -60,7 +60,7 @@
   }
   
   /**
-   * Set keyData to point to an existing byte array.  IMPORTANT: After calling this constructor,
+   * Set keyData to point to an existing byte array.  IMPORTANT: After calling this,
    * if you keep a pointer to the array then you must treat the array as immutable and promise not to change it.
    * @param keyData A pointer to a vector with the byte array.  This takes another reference and does not copy the bytes.
    */
diff --git a/ndn-cpp/node.cpp b/ndn-cpp/node.cpp
index 7fb34fd..2170fe9 100644
--- a/ndn-cpp/node.cpp
+++ b/ndn-cpp/node.cpp
@@ -37,7 +37,7 @@
   
   pit_.push_back(shared_ptr<PitEntry>(new PitEntry(shared_ptr<const Interest>(new Interest(interest)), onData, onTimeout)));
   
-  shared_ptr<vector<unsigned char> > encoding = interest.wireEncode();  
+  Blob encoding = interest.wireEncode();  
   transport_->send(*encoding);
 }
 
@@ -73,15 +73,15 @@
 {
   // Create a ForwardingEntry.
   ForwardingEntry forwardingEntry("selfreg", prefix, PublisherPublicKeyDigest(), -1, 3, 2147483647);
-  ptr_lib::shared_ptr<vector<unsigned char> > content = forwardingEntry.wireEncode();
+  Blob content = forwardingEntry.wireEncode();
 
   // Set the ForwardingEntry as the content of a Data packet and sign.
   Data data;
-  data.setContent(*content);
+  data.setContent(content);
   data.getMetaInfo().setTimestampMilliseconds(time(NULL) * 1000.0);
   // TODO: Should we sign with a different key?
   KeyChain::defaultSign(data);
-  ptr_lib::shared_ptr<vector<unsigned char> > encodedData = data.wireEncode();
+  Blob encodedData = data.wireEncode();
   
   // Create an interest where the name has the encoded Data packet.
   Name interestName;
@@ -90,11 +90,11 @@
   interestName.addComponent(component0, sizeof(component0) - 1);
   interestName.addComponent(ndndId_);
   interestName.addComponent(component2, sizeof(component2) - 1);
-  interestName.addComponent(*encodedData);
+  interestName.addComponent(encodedData);
   
   Interest interest(interestName);
   interest.setScope(1);
-  ptr_lib::shared_ptr<vector<unsigned char> > encodedInterest = interest.wireEncode();
+  Blob encodedInterest = interest.wireEncode();
   
   // Save the onInterest callback and send the registration interest.
   registeredPrefixTable_.push_back(shared_ptr<PrefixEntry>(new PrefixEntry(shared_ptr<const Name>(new Name(prefix)), onInterest)));
diff --git a/ndn-cpp/security/key-chain.cpp b/ndn-cpp/security/key-chain.cpp
index 5ba46ba..ba36071 100644
--- a/ndn-cpp/security/key-chain.cpp
+++ b/ndn-cpp/security/key-chain.cpp
@@ -67,9 +67,9 @@
 static void digestDataFieldsSha256(const Data& data, WireFormat& wireFormat, unsigned char *digest)
 {
   unsigned int signedFieldsBeginOffset, signedFieldsEndOffset;
-  ptr_lib::shared_ptr<vector<unsigned char> > encoding = wireFormat.encodeData(data, &signedFieldsBeginOffset, &signedFieldsEndOffset);
+  Blob encoding = wireFormat.encodeData(data, &signedFieldsBeginOffset, &signedFieldsEndOffset);
   
-  ndn_digestSha256(&encoding->front() + signedFieldsBeginOffset, signedFieldsEndOffset - signedFieldsBeginOffset, digest);
+  ndn_digestSha256(encoding.buf() + signedFieldsBeginOffset, signedFieldsEndOffset - signedFieldsBeginOffset, digest);
 }
 
 void KeyChain::sign
diff --git a/tests/test-encode-decode-data.cpp b/tests/test-encode-decode-data.cpp
index 1e4c165..616b4b0 100644
--- a/tests/test-encode-decode-data.cpp
+++ b/tests/test-encode-decode-data.cpp
@@ -155,7 +155,7 @@
     dumpData(data);
     cout << "Decoded Data signature verification: " << (KeyChain::selfVerifyData(Data1, sizeof(Data1)) ? "VERIFIED" : "FAILED") << endl;
     
-    ptr_lib::shared_ptr<vector<unsigned char> > encoding = data.wireEncode();
+    Blob encoding = data.wireEncode();
     
     Data reDecodedData;
     reDecodedData.wireDecode(*encoding);
@@ -171,7 +171,7 @@
     KeyChain::defaultSign(freshData);
     cout << endl << "Freshly-signed Data:" << endl;
     dumpData(freshData);
-    ptr_lib::shared_ptr<vector<unsigned char> > freshEncoding = freshData.wireEncode();
+    Blob freshEncoding = freshData.wireEncode();
     cout << "Freshly-signed Data signature verification: " << (KeyChain::selfVerifyData(&freshEncoding->front(), freshEncoding->size()) ? "VERIFIED" : "FAILED") << endl;
   } catch (exception& e) {
     cout << "exception: " << e.what() << endl;
diff --git a/tests/test-encode-decode-forwarding-entry.cpp b/tests/test-encode-decode-forwarding-entry.cpp
index dfa780e..1ee801a 100644
--- a/tests/test-encode-decode-forwarding-entry.cpp
+++ b/tests/test-encode-decode-forwarding-entry.cpp
@@ -59,6 +59,9 @@
 
 static inline string toString(const vector<unsigned char>& v)
 {
+  if (!&v)
+    return "";
+  
   return string(&v[0], &v[0] + v.size());
 }
 
@@ -67,7 +70,7 @@
   cout << "action: " << forwardingEntry.getAction() << endl;
   cout << "prefix: " << forwardingEntry.getPrefix().to_uri() << endl;
   cout << "publisherPublicKeyDigest: " 
-       << (forwardingEntry.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest().size() > 0 ? toHex(forwardingEntry.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest()) : "<none>") << endl;
+       << (forwardingEntry.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest().size() > 0 ? toHex(*forwardingEntry.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest()) : "<none>") << endl;
   cout << "faceId: ";
   if (forwardingEntry.getFaceId() >= 0)
     cout << forwardingEntry.getFaceId() << endl;
@@ -101,16 +104,16 @@
     cout << interest.getScope() << endl;
   else
     cout << "<none>" << endl;
-  cout << "name[0]: " << toString(interest.getName().getComponent(0).getValue()) << endl;
-  cout << "name[1]: " << toHex(interest.getName().getComponent(1).getValue()) << endl;
-  cout << "name[2]: " << toString(interest.getName().getComponent(2).getValue()) << endl;
+  cout << "name[0]: " << toString(*interest.getName().getComponent(0).getValue()) << endl;
+  cout << "name[1]: " << toHex(*interest.getName().getComponent(1).getValue()) << endl;
+  cout << "name[2]: " << toString(*interest.getName().getComponent(2).getValue()) << endl;
   cout << "name[3] decoded as Data, showing content as ForwardingEntry: " << endl;
   
   Data data;
-  data.wireDecode(interest.getName().getComponent(3).getValue());
+  data.wireDecode(*interest.getName().getComponent(3).getValue());
   
   ForwardingEntry forwardingEntry;
-  forwardingEntry.wireDecode(data.getContent());
+  forwardingEntry.wireDecode(*data.getContent());
   dumpForwardingEntry(forwardingEntry);
 }
 
@@ -122,7 +125,7 @@
     cout << "Interest:" << endl;
     dumpInterestWithForwardingEntry(interest);
     
-    ptr_lib::shared_ptr<vector<unsigned char> > encoding = interest.wireEncode();
+    Blob encoding = interest.wireEncode();
     cout << endl << "Re-encoded interest " << toHex(*encoding) << endl;
 
     Interest reDecodedInterest;
diff --git a/tests/test-encode-decode-interest.cpp b/tests/test-encode-decode-interest.cpp
index ad638ce..9326893 100644
--- a/tests/test-encode-decode-interest.cpp
+++ b/tests/test-encode-decode-interest.cpp
@@ -44,7 +44,7 @@
   else
     cout << "<none>" << endl;
   cout << "publisherPublicKeyDigest: " 
-       << (interest.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest().size() > 0 ? toHex(interest.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest()) : "<none>") << endl;
+       << (interest.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest().size() > 0 ? toHex(*interest.getPublisherPublicKeyDigest().getPublisherPublicKeyDigest()) : "<none>") << endl;
   cout << "exclude: " 
        << (interest.getExclude().getEntryCount() > 0 ? interest.getExclude().toUri() : "<none>") << endl;
   cout << "lifetimeMilliseconds: ";
@@ -79,7 +79,7 @@
     cout << "Interest:" << endl;
     dumpInterest(interest);
     
-    ptr_lib::shared_ptr<vector<unsigned char> > encoding = interest.wireEncode();
+    Blob encoding = interest.wireEncode();
     cout << endl << "Re-encoded interest " << toHex(*encoding) << endl;
 
     Interest reDecodedInterest;
diff --git a/tests/test-get-async.cpp b/tests/test-get-async.cpp
index 3c55b31..7c92997 100644
--- a/tests/test-get-async.cpp
+++ b/tests/test-get-async.cpp
@@ -29,7 +29,7 @@
     ++callbackCount_;
     cout << "Got data packet with name " << data->getName().to_uri() << endl;
     for (unsigned int i = 0; i < data->getContent().size(); ++i)
-      cout << data->getContent()[i];
+      cout << (*data->getContent())[i];
     cout << endl;  
   }
 
diff --git a/tests/test-publish-async.cpp b/tests/test-publish-async.cpp
index 49129c8..87fad40 100644
--- a/tests/test-publish-async.cpp
+++ b/tests/test-publish-async.cpp
@@ -32,7 +32,7 @@
     data.setContent((const unsigned char *)&content[0], content.size());
     data.getMetaInfo().setTimestampMilliseconds(time(NULL) * 1000.0);
     KeyChain::defaultSign(data);
-    shared_ptr<vector<unsigned char> > encodedData = data.wireEncode();
+    Blob encodedData = data.wireEncode();
 
     cout << "Sent content " << content << endl;
     transport.send(*encodedData);
