diff --git a/ndn-cpp/Closure.hpp b/ndn-cpp/Closure.hpp
index 9efbd03..c017a81 100644
--- a/ndn-cpp/Closure.hpp
+++ b/ndn-cpp/Closure.hpp
@@ -27,35 +27,35 @@
   UPCALL_FINAL              = 0, // handler is about to be deregistered
   UPCALL_INTEREST           = 1, // incoming interest
   UPCALL_CONSUMED_INTEREST  = 2, // incoming interest, someone has answered
-  UPCALL_CONTENT            = 3, // incoming verified content
+  UPCALL_DATA               = 3, // incoming verified data packet
   UPCALL_INTEREST_TIMED_OUT = 4, // interest timed out
-  UPCALL_CONTENT_UNVERIFIED = 5, // content that has not been verified
-  UPCALL_CONTENT_BAD        = 6  // verification failed  
+  UPCALL_DATA_UNVERIFIED    = 5, // data packet that has not been verified
+  UPCALL_DATA_BAD           = 6  // verification failed  
 };
 
 class NDN;
 class Interest;
-class ContentObject;
+class Data;
 
 class UpcallInfo {
 public:
-  UpcallInfo(NDN *ndn, ptr_lib::shared_ptr<Interest> &interest, int matchedComps, ptr_lib::shared_ptr<ContentObject> &contentObject) 
+  UpcallInfo(NDN *ndn, ptr_lib::shared_ptr<Interest> &interest, int matchedComps, ptr_lib::shared_ptr<Data> &data) 
   {
     ndn_ = ndn;
     interest_ = interest;
-    contentObject_ = contentObject;
+    data_ = data;
   }
   
   NDN *getNDN() { return ndn_; }
   
   ptr_lib::shared_ptr<Interest> &getInterest() { return interest_; }
   
-  ptr_lib::shared_ptr<ContentObject> &getContentObject() { return contentObject_; }
+  ptr_lib::shared_ptr<Data> &getData() { return data_; }
   
 private:
   NDN *ndn_;
   ptr_lib::shared_ptr<Interest> interest_;
-  ptr_lib::shared_ptr<ContentObject> contentObject_;
+  ptr_lib::shared_ptr<Data> data_;
 };
 
 class Closure {
diff --git a/ndn-cpp/NDN.cpp b/ndn-cpp/NDN.cpp
index 1299e94..206af43 100644
--- a/ndn-cpp/NDN.cpp
+++ b/ndn-cpp/NDN.cpp
@@ -5,7 +5,7 @@
 
 #include "encoding/BinaryXMLDecoder.hpp"
 #include "c/encoding/BinaryXML.h"
-#include "ContentObject.hpp"
+#include "data.hpp"
 #include "NDN.hpp"
 
 using namespace std;
@@ -30,12 +30,12 @@
   BinaryXmlDecoder decoder(element, elementLength);
   
   if (decoder.peekDTag(ndn_BinaryXml_DTag_ContentObject)) {
-    shared_ptr<ContentObject> contentObject(new ContentObject());
-    contentObject->decode(element, elementLength);
+    shared_ptr<Data> data(new Data());
+    data->decode(element, elementLength);
     
     shared_ptr<Interest> dummyInterest;
-    UpcallInfo upcallInfo(this, dummyInterest, 0, contentObject);
-    tempClosure_->upcall(UPCALL_CONTENT, upcallInfo);
+    UpcallInfo upcallInfo(this, dummyInterest, 0, data);
+    tempClosure_->upcall(UPCALL_DATA, upcallInfo);
   }
 }
 
diff --git a/ndn-cpp/NDN.hpp b/ndn-cpp/NDN.hpp
index 2abb8f2..106431a 100644
--- a/ndn-cpp/NDN.hpp
+++ b/ndn-cpp/NDN.hpp
@@ -35,8 +35,8 @@
   /**
    * Encode name as an Interest. If interestTemplate is not 0, use its interest selectors.
    * Send the interest through the transport, read the entire response and call
-   * closure->upcall(UPCALL_CONTENT (or UPCALL_CONTENT_UNVERIFIED),
-   *                 UpcallInfo(this, interest, 0, contentObject)).
+   * closure->upcall(UPCALL_DATA (or UPCALL_DATA_UNVERIFIED),
+   *                 UpcallInfo(this, interest, 0, data)).
    * @param name reference to a Name for the interest.  This does not keep a pointer to the Name object.
    * @param closure a shared_ptr for the Closure.  This uses shared_ptr to take another reference to the object.
    * @param interestTemplate if not 0, copy interest selectors from the template.   This does not keep a pointer to the Interest object.
diff --git a/ndn-cpp/c/ContentObject.h b/ndn-cpp/c/data.h
similarity index 88%
rename from ndn-cpp/c/ContentObject.h
rename to ndn-cpp/c/data.h
index 36ede14..9338846 100644
--- a/ndn-cpp/c/ContentObject.h
+++ b/ndn-cpp/c/data.h
@@ -3,8 +3,8 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_CONTENTOBJECT_H
-#define	NDN_CONTENTOBJECT_H
+#ifndef NDN_DATA_H
+#define	NDN_DATA_H
 
 #include "Name.h"
 #include "PublisherPublicKeyDigest.h"
@@ -65,7 +65,7 @@
   ndn_KeyLocator_init(&self->keyLocator);
 }
 
-struct ndn_ContentObject {
+struct ndn_Data {
   struct ndn_Signature signature;
   struct ndn_Name name;
   struct ndn_SignedInfo signedInfo;
@@ -74,13 +74,13 @@
 };
 
 /**
- * Initialize an ndn_ContentObject struct with the pre-allocated nameComponents,
+ * Initialize an ndn_Data struct with the pre-allocated nameComponents,
  * and defaults for all the values.
- * @param self pointer to the ndn_ContentObject struct
+ * @param self pointer to the ndn_Data struct
  * @param nameComponents the pre-allocated array of ndn_NameComponent
  * @param maxNameComponents the number of elements in the allocated nameComponents array
  */
-static inline void ndn_ContentObject_init(struct ndn_ContentObject *self, struct ndn_NameComponent *nameComponents, unsigned int maxNameComponents) 
+static inline void ndn_Data_init(struct ndn_Data *self, struct ndn_NameComponent *nameComponents, unsigned int maxNameComponents) 
 {
   ndn_Signature_init(&self->signature);
   ndn_Name_init(&self->name, nameComponents, maxNameComponents);
diff --git a/ndn-cpp/c/encoding/BinaryXMLContentObject.h b/ndn-cpp/c/encoding/BinaryXMLContentObject.h
deleted file mode 100644
index eb7cc5e..0000000
--- a/ndn-cpp/c/encoding/BinaryXMLContentObject.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * @author: Jeff Thompson
- * See COPYING for copyright and distribution information.
- */
-
-#ifndef NDN_BINARYXMLCONTENTOBJECT_H
-#define	NDN_BINARYXMLCONTENTOBJECT_H
-
-#include "../errors.h"
-#include "../ContentObject.h"
-#include "BinaryXMLEncoder.h"
-#include "BinaryXMLDecoder.h"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-ndn_Error ndn_encodeBinaryXmlContentObject(struct ndn_ContentObject *contentObject, struct ndn_BinaryXmlEncoder *encoder);
-
-ndn_Error ndn_decodeBinaryXmlContentObject(struct ndn_ContentObject *contentObject, struct ndn_BinaryXmlDecoder *decoder);
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif
diff --git a/ndn-cpp/c/encoding/BinaryXMLContentObject.c b/ndn-cpp/c/encoding/binary-xml-data.c
similarity index 85%
rename from ndn-cpp/c/encoding/BinaryXMLContentObject.c
rename to ndn-cpp/c/encoding/binary-xml-data.c
index d95889c..8da14b2 100644
--- a/ndn-cpp/c/encoding/BinaryXMLContentObject.c
+++ b/ndn-cpp/c/encoding/binary-xml-data.c
@@ -8,7 +8,7 @@
 #include "BinaryXMLDecoder.h"
 #include "BinaryXMLName.h"
 #include "BinaryXMLPublisherPublicKeyDigest.h"
-#include "BinaryXMLContentObject.h"
+#include "binary-xml-data.h"
 
 static ndn_Error encodeSignature(struct ndn_Signature *signature, struct ndn_BinaryXmlEncoder *encoder)
 {
@@ -129,23 +129,23 @@
   return 0;
 }
 
-ndn_Error ndn_encodeBinaryXmlContentObject(struct ndn_ContentObject *contentObject, struct ndn_BinaryXmlEncoder *encoder)
+ndn_Error ndn_encodeBinaryXmlData(struct ndn_Data *data, struct ndn_BinaryXmlEncoder *encoder)
 {
   ndn_Error error;
   if (error = ndn_BinaryXmlEncoder_writeElementStartDTag(encoder, ndn_BinaryXml_DTag_ContentObject))
     return error;
   
-  if (error = encodeSignature(&contentObject->signature, encoder))
+  if (error = encodeSignature(&data->signature, encoder))
     return 0;
 
-  if (error = ndn_encodeBinaryXmlName(&contentObject->name, encoder))
+  if (error = ndn_encodeBinaryXmlName(&data->name, encoder))
     return error;
 
-  if (error = encodeSignedInfo(&contentObject->signedInfo, encoder))
+  if (error = encodeSignedInfo(&data->signedInfo, encoder))
     return 0;
 
   if (error = ndn_BinaryXmlEncoder_writeBlobDTagElement
-      (encoder, ndn_BinaryXml_DTag_Content, contentObject->content, contentObject->contentLength))
+      (encoder, ndn_BinaryXml_DTag_Content, data->content, data->contentLength))
     return error;
   
 	if (error = ndn_BinaryXmlEncoder_writeElementClose(encoder))
@@ -154,7 +154,7 @@
   return 0;
 }
 
-ndn_Error ndn_decodeBinaryXmlContentObject(struct ndn_ContentObject *contentObject, struct ndn_BinaryXmlDecoder *decoder)
+ndn_Error ndn_decodeBinaryXmlData(struct ndn_Data *data, struct ndn_BinaryXmlDecoder *decoder)
 {
   ndn_Error error;
   if (error = ndn_BinaryXmlDecoder_readElementStartDTag(decoder, ndn_BinaryXml_DTag_ContentObject))
@@ -164,27 +164,27 @@
   if (error = ndn_BinaryXmlDecoder_peekDTag(decoder, ndn_BinaryXml_DTag_Signature, &gotExpectedTag))
     return error;
   if (gotExpectedTag) {
-    if (error = decodeSignature(&contentObject->signature, decoder))
+    if (error = decodeSignature(&data->signature, decoder))
       return error;
   }
   else
-    ndn_Signature_init(&contentObject->signature);
+    ndn_Signature_init(&data->signature);
   
-  if (error = ndn_decodeBinaryXmlName(&contentObject->name, decoder))
+  if (error = ndn_decodeBinaryXmlName(&data->name, decoder))
     return error;
   
   if (error = ndn_BinaryXmlDecoder_peekDTag(decoder, ndn_BinaryXml_DTag_SignedInfo, &gotExpectedTag))
     return error;
   if (gotExpectedTag) {
-    if (error = decodeSignedInfo(&contentObject->signedInfo, decoder))
+    if (error = decodeSignedInfo(&data->signedInfo, decoder))
       return error;
   }
   else
-    ndn_SignedInfo_init(&contentObject->signedInfo);
+    ndn_SignedInfo_init(&data->signedInfo);
 
   // Require a Content element, but set allowNull to allow a missing BLOB.
   if (error = ndn_BinaryXmlDecoder_readBinaryDTagElement
-      (decoder, ndn_BinaryXml_DTag_Content, 1, &contentObject->content, &contentObject->contentLength))
+      (decoder, ndn_BinaryXml_DTag_Content, 1, &data->content, &data->contentLength))
     return error; 
   
   if (error = ndn_BinaryXmlDecoder_readElementClose(decoder))
diff --git a/ndn-cpp/c/encoding/binary-xml-data.h b/ndn-cpp/c/encoding/binary-xml-data.h
new file mode 100644
index 0000000..f3b14e9
--- /dev/null
+++ b/ndn-cpp/c/encoding/binary-xml-data.h
@@ -0,0 +1,26 @@
+/**
+ * @author: Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NDN_BINARY_XML_DATA_H
+#define	NDN_BINARY_XML_DATA_H
+
+#include "../errors.h"
+#include "../data.h"
+#include "BinaryXMLEncoder.h"
+#include "BinaryXMLDecoder.h"
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+ndn_Error ndn_encodeBinaryXmlData(struct ndn_Data *data, struct ndn_BinaryXmlEncoder *encoder);
+
+ndn_Error ndn_decodeBinaryXmlData(struct ndn_Data *data, struct ndn_BinaryXmlDecoder *decoder);
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif
diff --git a/ndn-cpp/ContentObject.cpp b/ndn-cpp/data.cpp
similarity index 75%
rename from ndn-cpp/ContentObject.cpp
rename to ndn-cpp/data.cpp
index 637c066..322faff 100644
--- a/ndn-cpp/ContentObject.cpp
+++ b/ndn-cpp/data.cpp
@@ -4,7 +4,7 @@
  */
 
 #include "common.hpp"
-#include "ContentObject.hpp"
+#include "data.hpp"
 
 using namespace std;
 
@@ -64,25 +64,25 @@
   keyLocator_.set(signedInfoStruct.keyLocator);
 }
 
-void ContentObject::get(struct ndn_ContentObject &contentObjectStruct) const 
+void Data::get(struct ndn_Data &dataStruct) const 
 {
-  signature_.get(contentObjectStruct.signature);
-  name_.get(contentObjectStruct.name);
-  signedInfo_.get(contentObjectStruct.signedInfo);
+  signature_.get(dataStruct.signature);
+  name_.get(dataStruct.name);
+  signedInfo_.get(dataStruct.signedInfo);
   
-  contentObjectStruct.contentLength = content_.size();
+  dataStruct.contentLength = content_.size();
   if (content_.size() > 0)
-    contentObjectStruct.content = (unsigned char *)&content_[0];
+    dataStruct.content = (unsigned char *)&content_[0];
   else
-    contentObjectStruct.content = 0;
+    dataStruct.content = 0;
 }
 
-void ContentObject::set(const struct ndn_ContentObject &contentObjectStruct)
+void Data::set(const struct ndn_Data &dataStruct)
 {
-  signature_.set(contentObjectStruct.signature);
-  name_.set(contentObjectStruct.name);
-  signedInfo_.set(contentObjectStruct.signedInfo);
-  setVector(content_, contentObjectStruct.content, contentObjectStruct.contentLength);
+  signature_.set(dataStruct.signature);
+  name_.set(dataStruct.name);
+  signedInfo_.set(dataStruct.signedInfo);
+  setVector(content_, dataStruct.content, dataStruct.contentLength);
 }
 
 }
diff --git a/ndn-cpp/ContentObject.hpp b/ndn-cpp/data.hpp
similarity index 82%
rename from ndn-cpp/ContentObject.hpp
rename to ndn-cpp/data.hpp
index 18c69ea..883331f 100644
--- a/ndn-cpp/ContentObject.hpp
+++ b/ndn-cpp/data.hpp
@@ -3,13 +3,13 @@
  * See COPYING for copyright and distribution information.
  */
 
-#ifndef NDN_CONTENTOBJECT_HPP
-#define	NDN_CONTENTOBJECT_HPP
+#ifndef NDN_DATA_HPP
+#define	NDN_DATA_HPP
 
 #include "Name.hpp"
 #include "PublisherPublicKeyDigest.hpp"
 #include "Key.hpp"
-#include "c/ContentObject.h"
+#include "c/data.h"
 
 namespace ndn {
 
@@ -82,11 +82,11 @@
   KeyLocator keyLocator_;
 };
   
-class ContentObject {
+class Data {
 public:
   ptr_lib::shared_ptr<std::vector<unsigned char> > encode(WireFormat &wireFormat) const 
   {
-    return wireFormat.encodeContentObject(*this);
+    return wireFormat.encodeData(*this);
   }
   ptr_lib::shared_ptr<std::vector<unsigned char> > encode() const 
   {
@@ -94,7 +94,7 @@
   }
   void decode(const unsigned char *input, unsigned int inputLength, WireFormat &wireFormat) 
   {
-    wireFormat.decodeContentObject(*this, input, inputLength);
+    wireFormat.decodeData(*this, input, inputLength);
   }
   void decode(const unsigned char *input, unsigned int inputLength) 
   {
@@ -110,17 +110,17 @@
   }
   
   /**
-   * Set the contentObjectStruct to point to the values in this interest, without copying any memory.
-   * WARNING: The resulting pointers in contentObjectStruct are invalid after a further use of this object which could reallocate memory.
-   * @param contentObjectStruct a C ndn_ContentObject struct where the name components array is already allocated.
+   * Set the dataStruct to point to the values in this interest, without copying any memory.
+   * WARNING: The resulting pointers in dataStruct are invalid after a further use of this object which could reallocate memory.
+   * @param dataStruct a C ndn_Data struct where the name components array is already allocated.
    */
-  void get(struct ndn_ContentObject &contentObjectStruct) const;
+  void get(struct ndn_Data &dataStruct) const;
 
   /**
-   * Clear this content object, and set the values by copying from the ndn_ContentObject struct.
-   * @param contentObjectStruct a C ndn_ContentObject struct
+   * Clear this data object, and set the values by copying from the ndn_Data struct.
+   * @param dataStruct a C ndn_Data struct
    */
-  void set(const struct ndn_ContentObject &contentObjectStruct);
+  void set(const struct ndn_Data &dataStruct);
 
   const Signature &getSignature() const { return signature_; }
   
diff --git a/ndn-cpp/encoding/BinaryXMLWireFormat.cpp b/ndn-cpp/encoding/BinaryXMLWireFormat.cpp
index e0b2b1c..1c6b7b1 100644
--- a/ndn-cpp/encoding/BinaryXMLWireFormat.cpp
+++ b/ndn-cpp/encoding/BinaryXMLWireFormat.cpp
@@ -5,9 +5,9 @@
 
 #include <stdexcept>
 #include "../c/encoding/BinaryXMLInterest.h"
-#include "../c/encoding/BinaryXMLContentObject.h"
+#include "../c/encoding/binary-xml-data.h"
 #include "../Interest.hpp"
-#include "../ContentObject.hpp"
+#include "../data.hpp"
 #include "BinaryXMLEncoder.hpp"
 #include "BinaryXMLDecoder.hpp"
 #include "BinaryXMLWireFormat.hpp"
@@ -51,33 +51,33 @@
   interest.set(interestStruct);
 }
 
-ptr_lib::shared_ptr<vector<unsigned char> > BinaryXmlWireFormat::encodeContentObject(const ContentObject &contentObject) 
+ptr_lib::shared_ptr<vector<unsigned char> > BinaryXmlWireFormat::encodeData(const Data &data) 
 {
   struct ndn_NameComponent nameComponents[100];
-  struct ndn_ContentObject contentObjectStruct;
-  ndn_ContentObject_init
-    (&contentObjectStruct, nameComponents, sizeof(nameComponents) / sizeof(nameComponents[0]));
-  contentObject.get(contentObjectStruct);
+  struct ndn_Data dataStruct;
+  ndn_Data_init
+    (&dataStruct, nameComponents, sizeof(nameComponents) / sizeof(nameComponents[0]));
+  data.get(dataStruct);
 
   BinaryXmlEncoder encoder;
-  ndn_encodeBinaryXmlContentObject(&contentObjectStruct, &encoder);
+  ndn_encodeBinaryXmlData(&dataStruct, &encoder);
      
   return encoder.getOutput();
 }
 
-void BinaryXmlWireFormat::decodeContentObject(ContentObject &contentObject, const unsigned char *input, unsigned int inputLength)
+void BinaryXmlWireFormat::decodeData(Data &data, const unsigned char *input, unsigned int inputLength)
 {
   struct ndn_NameComponent nameComponents[100];
-  struct ndn_ContentObject contentObjectStruct;
-  ndn_ContentObject_init
-    (&contentObjectStruct, nameComponents, sizeof(nameComponents) / sizeof(nameComponents[0]));
+  struct ndn_Data dataStruct;
+  ndn_Data_init
+    (&dataStruct, nameComponents, sizeof(nameComponents) / sizeof(nameComponents[0]));
     
   BinaryXmlDecoder decoder(input, inputLength);  
   ndn_Error error;
-  if (error = ndn_decodeBinaryXmlContentObject(&contentObjectStruct, &decoder))
+  if (error = ndn_decodeBinaryXmlData(&dataStruct, &decoder))
     throw std::runtime_error(ndn_getErrorString(error));
 
-  contentObject.set(contentObjectStruct);
+  data.set(dataStruct);
 }
 
 }
diff --git a/ndn-cpp/encoding/BinaryXMLWireFormat.hpp b/ndn-cpp/encoding/BinaryXMLWireFormat.hpp
index ff73218..ffc19b0 100644
--- a/ndn-cpp/encoding/BinaryXMLWireFormat.hpp
+++ b/ndn-cpp/encoding/BinaryXMLWireFormat.hpp
@@ -15,8 +15,8 @@
   virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeInterest(const Interest &interest);
   virtual void decodeInterest(Interest &interest, const unsigned char *input, unsigned int inputLength);
 
-  virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeContentObject(const ContentObject &contentObject);
-  virtual void decodeContentObject(ContentObject &contentObject, const unsigned char *input, unsigned int inputLength);
+  virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeData(const Data &data);
+  virtual void decodeData(Data &data, const unsigned char *input, unsigned int inputLength);
   
   static BinaryXmlWireFormat &getInstance() { return instance_; }
   
diff --git a/ndn-cpp/encoding/WireFormat.cpp b/ndn-cpp/encoding/WireFormat.cpp
index 238ce9c..39d2e11 100644
--- a/ndn-cpp/encoding/WireFormat.cpp
+++ b/ndn-cpp/encoding/WireFormat.cpp
@@ -18,11 +18,11 @@
   throw logic_error("unimplemented");
 }
 
-ptr_lib::shared_ptr<vector<unsigned char> > WireFormat::encodeContentObject(const ContentObject &contentObject) 
+ptr_lib::shared_ptr<vector<unsigned char> > WireFormat::encodeData(const Data &data) 
 {
   throw logic_error("unimplemented");
 }
-void WireFormat::decodeContentObject(ContentObject &contentObject, const unsigned char *input, unsigned int inputLength) 
+void WireFormat::decodeData(Data &data, const unsigned char *input, unsigned int inputLength) 
 {
   throw logic_error("unimplemented");
 }
diff --git a/ndn-cpp/encoding/WireFormat.hpp b/ndn-cpp/encoding/WireFormat.hpp
index 1afe25f..a7d62bc 100644
--- a/ndn-cpp/encoding/WireFormat.hpp
+++ b/ndn-cpp/encoding/WireFormat.hpp
@@ -12,15 +12,15 @@
 namespace ndn {
   
 class Interest;
-class ContentObject;
+class Data;
   
 class WireFormat {
 public:
   virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeInterest(const Interest &interest);
   virtual void decodeInterest(Interest &interest, const unsigned char *input, unsigned int inputLength);
 
-  virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeContentObject(const ContentObject &contentObject);
-  virtual void decodeContentObject(ContentObject &contentObject, const unsigned char *input, unsigned int inputLength);
+  virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeData(const Data &data);
+  virtual void decodeData(Data &data, const unsigned char *input, unsigned int inputLength);
 };
 
 }
