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_;
 };
 
 }
