diff --git a/ndn-cpp/closure.hpp b/ndn-cpp/closure.hpp
index e8cc191..81846f1 100644
--- a/ndn-cpp/closure.hpp
+++ b/ndn-cpp/closure.hpp
@@ -33,27 +33,27 @@
   UPCALL_DATA_BAD           = 6  // verification failed  
 };
 
-class Face;
+class Node;
 class Interest;
 class Data;
 
 class UpcallInfo {
 public:
-  UpcallInfo(Face *ndn, ptr_lib::shared_ptr<Interest> &interest, int matchedComps, ptr_lib::shared_ptr<Data> &data) 
+  UpcallInfo(Node *node, ptr_lib::shared_ptr<Interest> &interest, int matchedComps, ptr_lib::shared_ptr<Data> &data) 
   {
-    ndn_ = ndn;
+    node_ = node;
     interest_ = interest;
     data_ = data;
   }
   
-  Face *getNDN() { return ndn_; }
+  Node *getNode() { return node_; }
   
   ptr_lib::shared_ptr<Interest> &getInterest() { return interest_; }
   
   ptr_lib::shared_ptr<Data> &getData() { return data_; }
   
 private:
-  Face *ndn_;
+  Node *node_;
   ptr_lib::shared_ptr<Interest> interest_;
   ptr_lib::shared_ptr<Data> data_;
 };
diff --git a/ndn-cpp/face.cpp b/ndn-cpp/face.cpp
index 89462d6..7b0d3ea 100644
--- a/ndn-cpp/face.cpp
+++ b/ndn-cpp/face.cpp
@@ -3,50 +3,15 @@
  * See COPYING for copyright and distribution information.
  */
 
-#include "encoding/binary-xml-decoder.hpp"
-#include "c/encoding/binary-xml.h"
-#include "data.hpp"
 #include "face.hpp"
 
 using namespace std;
-using namespace ndn::ptr_lib;
 
 namespace ndn {
-
-void Face::expressInterest(const Name &name, Closure *closure, const Interest *interestTemplate)
-{
-  Interest interest(name);
-  shared_ptr<vector<unsigned char> > encoding = interest.wireEncode();  
-
-  // TODO: This should go in the PIT.
-  tempClosure_ = closure;
   
-  transport_->connect(*this);
-  transport_->send(*encoding);
-}
-
-void Face::processEvents()
-{
-  transport_->processEvents();
-}
-
 void Face::shutdown()
 {
-  transport_->close();
-}
-
-void Face::onReceivedElement(unsigned char *element, unsigned int elementLength)
-{
-  BinaryXmlDecoder decoder(element, elementLength);
-  
-  if (decoder.peekDTag(ndn_BinaryXml_DTag_ContentObject)) {
-    shared_ptr<Data> data(new Data());
-    data->wireDecode(element, elementLength);
-    
-    shared_ptr<Interest> dummyInterest;
-    UpcallInfo upcallInfo(this, dummyInterest, 0, data);
-    tempClosure_->upcall(UPCALL_DATA, upcallInfo);
-  }
+  node_.shutdown();
 }
 
 }
diff --git a/ndn-cpp/face.hpp b/ndn-cpp/face.hpp
index 64d835c..c98932c 100644
--- a/ndn-cpp/face.hpp
+++ b/ndn-cpp/face.hpp
@@ -6,19 +6,14 @@
 #ifndef NDN_FACE_HPP
 #define NDN_FACE_HPP
 
-#include "closure.hpp"
-#include "interest.hpp"
-#include "transport/udp-transport.hpp"
-#include "encoding/binary-xml-element-reader.hpp"
-
-using namespace std;
+#include "node.hpp"
 
 namespace ndn {
 
 /**
  * The Face class provides the main methods for NDN communication.
  */
-class Face : public ElementListener {
+class Face {
 public:
   /**
    * Create a new Face for communication with an NDN hub at host:port with the given Transport object.
@@ -27,7 +22,7 @@
    * @param transport A pointer to a Transport object used for communication.
    */
   Face(const char *host, unsigned short port, const ptr_lib::shared_ptr<Transport> &transport)
-  : host_(host), port_(port), transport_(transport), tempClosure_(0)
+  : node_(host, port, transport)
   {
   }
   
@@ -37,7 +32,7 @@
    * @param port The port of the NDN hub.
    */
   Face(const char *host, unsigned short port)
-  : host_(host), port_(port), transport_(new UdpTransport()), tempClosure_(0)
+  : node_(host, port)
   {
   }
   
@@ -46,7 +41,7 @@
    * @param host The host of the NDN hub.
    */
   Face(const char *host)
-  : host_(host), port_(9695), transport_(new UdpTransport()), tempClosure_(0)
+  : node_(host)
   {
   }
 
@@ -59,37 +54,36 @@
    * @param closure a pointer for the Closure.  The caller must manage the memory for the Closure.  This will not try to delete it.
    * @param interestTemplate if not 0, copy interest selectors from the template.   This does not keep a pointer to the Interest object.
    */
-  void expressInterest(const Name &name, Closure *closure, const Interest *interestTemplate);
+  void expressInterest(const Name &name, Closure *closure, const Interest *interestTemplate)
+  {
+    node_.expressInterest(name, closure, interestTemplate);
+  }
   
   void expressInterest(const Name &name, Closure *closure)
   {
-    expressInterest(name, closure, 0);
+    node_.expressInterest(name, closure);
   }
   
   /**
-   * Process any data to receive.  For each element received, call face.onReceivedElement.
+   * Process any data to receive or call timeout callbacks.
    * This is non-blocking and will return immediately if there is no data to receive.
    * You should repeatedly call this from an event loop, with calls to sleep as needed so that the loop doesn't use 100% of the CPU.
    * @throw This may throw an exception for reading data or in the callback for processing the data.  If you
    * call this from an main event loop, you may want to catch and log/disregard all exceptions.
    */
-  void processEvents();
+  void processEvents()
+  {
+    // Just call Node's processEvents.
+    node_.processEvents();
+  }
 
+  /**
+   * Shut down and disconnect this Face.
+   */
   void shutdown();
   
-  const char *getHost() const { return host_.c_str(); }
-  
-  unsigned short getPort() const { return port_; }
-  
-  const ptr_lib::shared_ptr<Transport> &getTransport() { return transport_; }
-  
-  virtual void onReceivedElement(unsigned char *element, unsigned int elementLength);
-  
 private:
-  ptr_lib::shared_ptr<Transport> transport_;
-  string host_;
-  unsigned short port_;
-  Closure *tempClosure_;
+  Node node_;
 };
 
 }
diff --git a/ndn-cpp/node.cpp b/ndn-cpp/node.cpp
new file mode 100644
index 0000000..fed4c8e
--- /dev/null
+++ b/ndn-cpp/node.cpp
@@ -0,0 +1,52 @@
+/**
+ * @author: Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "encoding/binary-xml-decoder.hpp"
+#include "c/encoding/binary-xml.h"
+#include "data.hpp"
+#include "Node.hpp"
+
+using namespace std;
+using namespace ndn::ptr_lib;
+
+namespace ndn {
+
+void Node::expressInterest(const Name &name, Closure *closure, const Interest *interestTemplate)
+{
+  Interest interest(name);
+  shared_ptr<vector<unsigned char> > encoding = interest.wireEncode();  
+
+  // TODO: This should go in the PIT.
+  tempClosure_ = closure;
+  
+  transport_->connect(*this);
+  transport_->send(*encoding);
+}
+
+void Node::processEvents()
+{
+  transport_->processEvents();
+}
+
+void Node::onReceivedElement(unsigned char *element, unsigned int elementLength)
+{
+  BinaryXmlDecoder decoder(element, elementLength);
+  
+  if (decoder.peekDTag(ndn_BinaryXml_DTag_ContentObject)) {
+    shared_ptr<Data> data(new Data());
+    data->wireDecode(element, elementLength);
+    
+    shared_ptr<Interest> dummyInterest;
+    UpcallInfo upcallInfo(this, dummyInterest, 0, data);
+    tempClosure_->upcall(UPCALL_DATA, upcallInfo);
+  }
+}
+
+void Node::shutdown()
+{
+  transport_->close();
+}
+
+}
diff --git a/ndn-cpp/node.hpp b/ndn-cpp/node.hpp
new file mode 100644
index 0000000..789a584
--- /dev/null
+++ b/ndn-cpp/node.hpp
@@ -0,0 +1,94 @@
+/**
+ * @author: Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NDN_NODE_HPP
+#define NDN_NODE_HPP
+
+#include "interest.hpp"
+#include "closure.hpp"
+#include "transport/udp-transport.hpp"
+#include "encoding/binary-xml-element-reader.hpp"
+
+namespace ndn {
+
+class Face;
+  
+class Node : public ElementListener {
+public:
+  /**
+   * Create a new Node for communication with an NDN hub at host:port with the given Transport object.
+   * @param host The host of the NDN hub.
+   * @param port The port of the NDN hub.
+   * @param transport A pointer to a Transport object used for communication.
+   */
+  Node(const char *host, unsigned short port, const ptr_lib::shared_ptr<Transport> &transport)
+  : host_(host), port_(port), transport_(transport), tempClosure_(0)
+  {
+  }
+  
+  /**
+   * Create a new Node for communication with an NDN hub at host:port using the default UdpTransport.
+   * @param host The host of the NDN hub.
+   * @param port The port of the NDN hub.
+   */
+  Node(const char *host, unsigned short port)
+  : host_(host), port_(port), transport_(new UdpTransport()), tempClosure_(0)
+  {
+  }
+  
+  /**
+   * Create a new Node for communication with an NDN hub at host with the default port 9695 and using the default UdpTransport.
+   * @param host The host of the NDN hub.
+   */
+  Node(const char *host)
+  : host_(host), port_(9695), transport_(new UdpTransport()), tempClosure_(0)
+  {
+  }
+
+  /**
+   * 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_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 pointer for the Closure.  The caller must manage the memory for the Closure.  This will not try to delete it.
+   * @param interestTemplate if not 0, copy interest selectors from the template.   This does not keep a pointer to the Interest object.
+   */
+  void expressInterest(const Name &name, Closure *closure, const Interest *interestTemplate);
+  
+  void expressInterest(const Name &name, Closure *closure)
+  {
+    expressInterest(name, closure, 0);
+  }
+
+  /**
+   * Process any data to receive.  For each element received, call onReceivedElement.
+   * This is non-blocking and will return immediately if there is no data to receive.
+   * You should repeatedly call this from an event loop, with calls to sleep as needed so that the loop doesn't use 100% of the CPU.
+   * @throw This may throw an exception for reading data or in the callback for processing the data.  If you
+   * call this from an main event loop, you may want to catch and log/disregard all exceptions.
+   */
+  void processEvents();
+  
+  const char *getHost() const { return host_.c_str(); }
+  
+  unsigned short getPort() const { return port_; }
+  
+  const ptr_lib::shared_ptr<Transport> &getTransport() { return transport_; }
+  
+  virtual void onReceivedElement(unsigned char *element, unsigned int elementLength);
+  
+  void shutdown();
+
+private:
+  ptr_lib::shared_ptr<Transport> transport_;
+  std::string host_;
+  unsigned short port_;
+  Closure *tempClosure_;
+};
+
+}
+
+#endif
diff --git a/ndn-cpp/transport/tcp-transport.cpp b/ndn-cpp/transport/tcp-transport.cpp
index aa438bc..a0a53de 100644
--- a/ndn-cpp/transport/tcp-transport.cpp
+++ b/ndn-cpp/transport/tcp-transport.cpp
@@ -4,7 +4,7 @@
  */
 
 #include <stdexcept>
-#include "../face.hpp"
+#include "../node.hpp"
 #include "../c/util/ndn_realloc.h"
 #include "tcp-transport.hpp"
 
@@ -12,20 +12,20 @@
 
 namespace ndn {
 
-void TcpTransport::connect(Face &face)
+void TcpTransport::connect(Node &node)
 {
   ndn_Error error;
-  if ((error = ndn_TcpTransport_connect(&transport_, (char *)face.getHost(), face.getPort())))
+  if ((error = ndn_TcpTransport_connect(&transport_, (char *)node.getHost(), node.getPort())))
     throw std::runtime_error(ndn_getErrorString(error)); 
 
   // TODO: This belongs in the socket listener.
   const unsigned int initialLength = 1000;
   // Automatically cast ndn_ to (struct ndn_ElementListener *)
   ndn_BinaryXmlElementReader_init
-    (&elementReader_, &face, (unsigned char *)malloc(initialLength), initialLength, ndn_realloc);
+    (&elementReader_, &node, (unsigned char *)malloc(initialLength), initialLength, ndn_realloc);
   
   // TODO: Properly indicate connected status.
-  face_ = &face;
+  node_ = &node;
 }
 
 void TcpTransport::send(const unsigned char *data, unsigned int dataLength)
diff --git a/ndn-cpp/transport/tcp-transport.hpp b/ndn-cpp/transport/tcp-transport.hpp
index f3c5e91..1028def 100644
--- a/ndn-cpp/transport/tcp-transport.hpp
+++ b/ndn-cpp/transport/tcp-transport.hpp
@@ -15,17 +15,17 @@
 class TcpTransport : public Transport {
 public:
   TcpTransport() 
+  : node_(0)
   {
     ndn_TcpTransport_init(&transport_);
-    face_ = 0;
     elementReader_.partialData.array = 0;
   }
   
   /**
-   * Connect to the host specified in face.
-   * @param face Not a shared_ptr because we assume that it will remain valid during the life of this Transport object.
+   * Connect to the host specified in node.
+   * @param node Not a shared_ptr because we assume that it will remain valid during the life of this Transport object.
    */
-  virtual void connect(Face &face);
+  virtual void connect(Node &node);
   
   /**
    * Set data to the host
@@ -35,7 +35,7 @@
   virtual void send(const unsigned char *data, unsigned int dataLength);
 
   /**
-   * Process any data to receive.  For each element received, call face.onReceivedElement.
+   * Process any data to receive.  For each element received, call node.onReceivedElement.
    * This is non-blocking and will return immediately if there is no data to receive.
    * You should normally not call this directly since it is called by Face.processEvents.
    * @throw This may throw an exception for reading data or in the callback for processing the data.  If you
@@ -52,7 +52,7 @@
   
 private:
   struct ndn_TcpTransport transport_;
-  Face *face_;
+  Node *node_;
   // TODO: This belongs in the socket listener.
   ndn_BinaryXmlElementReader elementReader_;
 };
diff --git a/ndn-cpp/transport/transport.cpp b/ndn-cpp/transport/transport.cpp
index e16a879..cbcb659 100644
--- a/ndn-cpp/transport/transport.cpp
+++ b/ndn-cpp/transport/transport.cpp
@@ -10,7 +10,7 @@
 
 namespace ndn {
 
-void Transport::connect(Face &face) 
+void Transport::connect(Node &node) 
 {
   throw logic_error("unimplemented");
 }
diff --git a/ndn-cpp/transport/transport.hpp b/ndn-cpp/transport/transport.hpp
index 3246340..9159b99 100644
--- a/ndn-cpp/transport/transport.hpp
+++ b/ndn-cpp/transport/transport.hpp
@@ -10,14 +10,14 @@
 
 namespace ndn {
 
-class Face;  
+class Node;  
 class Transport {
 public:
   /**
-   * Connect to the host specified in face.
-   * @param face Not a shared_ptr because we assume that it will remain valid during the life of this Transport object.
+   * Connect to the host specified in node.
+   * @param node Not a shared_ptr because we assume that it will remain valid during the life of this Transport object.
    */
-  virtual void connect(Face &face);
+  virtual void connect(Node &node);
   
   /**
    * Set data to the host
@@ -32,7 +32,7 @@
   }
   
   /**
-   * Process any data to receive.  For each element received, call face.onReceivedElement.
+   * Process any data to receive.  For each element received, call node.onReceivedElement.
    * This is non-blocking and will silently time out after a brief period if there is no data to receive.
    * You should repeatedly call this from an event loop.
    * @throw This may throw an exception for reading data or in the callback for processing the data.  If you
diff --git a/ndn-cpp/transport/udp-transport.cpp b/ndn-cpp/transport/udp-transport.cpp
index 4ae9e37..b1d90e8 100644
--- a/ndn-cpp/transport/udp-transport.cpp
+++ b/ndn-cpp/transport/udp-transport.cpp
@@ -12,20 +12,20 @@
 
 namespace ndn {
 
-void UdpTransport::connect(Face &face)
+void UdpTransport::connect(Node &node)
 {
   ndn_Error error;
-  if ((error = ndn_UdpTransport_connect(&transport_, (char *)face.getHost(), face.getPort())))
+  if ((error = ndn_UdpTransport_connect(&transport_, (char *)node.getHost(), node.getPort())))
     throw std::runtime_error(ndn_getErrorString(error)); 
 
   // TODO: This belongs in the socket listener.
   const unsigned int initialLength = 1000;
   // Automatically cast ndn_ to (struct ndn_ElementListener *)
   ndn_BinaryXmlElementReader_init
-    (&elementReader_, &face, (unsigned char *)malloc(initialLength), initialLength, ndn_realloc);
+    (&elementReader_, &node, (unsigned char *)malloc(initialLength), initialLength, ndn_realloc);
   
   // TODO: Properly indicate connected status.
-  face_ = &face;
+  node_ = &node;
 }
 
 void UdpTransport::send(const unsigned char *data, unsigned int dataLength)
diff --git a/ndn-cpp/transport/udp-transport.hpp b/ndn-cpp/transport/udp-transport.hpp
index 4ea6324..ceeda72 100644
--- a/ndn-cpp/transport/udp-transport.hpp
+++ b/ndn-cpp/transport/udp-transport.hpp
@@ -15,17 +15,17 @@
 class UdpTransport : public Transport {
 public:
   UdpTransport() 
+  : node_(0)
   {
     ndn_UdpTransport_init(&transport_);
-    face_ = 0;
     elementReader_.partialData.array = 0;
   }
   
   /**
-   * Connect to the host specified in face.
-   * @param face Not a shared_ptr because we assume that it will remain valid during the life of this Transport object.
+   * Connect to the host specified in node.
+   * @param node Not a shared_ptr because we assume that it will remain valid during the life of this Transport object.
    */
-  virtual void connect(Face &face);
+  virtual void connect(Node &node);
   
   /**
    * Set data to the host
@@ -35,7 +35,7 @@
   virtual void send(const unsigned char *data, unsigned int dataLength);
 
   /**
-   * Process any data to receive.  For each element received, call face.onReceivedElement.
+   * Process any data to receive.  For each element received, call node.onReceivedElement.
    * This is non-blocking and will return immediately if there is no data to receive.
    * You should normally not call this directly since it is called by Face.processEvents.
    * @throw This may throw an exception for reading data or in the callback for processing the data.  If you
@@ -52,7 +52,7 @@
   
 private:
   struct ndn_UdpTransport transport_;
-  Face *face_;
+  Node *node_;
   // TODO: This belongs in the socket listener.
   ndn_BinaryXmlElementReader elementReader_;
 };
