diff --git a/ndn-cpp/transport/tcp-transport.cpp b/ndn-cpp/transport/tcp-transport.cpp
index 9a712fb..cb8c1e6 100644
--- a/ndn-cpp/transport/tcp-transport.cpp
+++ b/ndn-cpp/transport/tcp-transport.cpp
@@ -1,3 +1,4 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /**
  * Copyright (C) 2013 Regents of the University of California.
  * @author: Jeff Thompson <jefft0@remap.ucla.edu>
@@ -5,9 +6,11 @@
  */
 
 #include <stdexcept>
-#include "../node.hpp"
+#include <ndn-cpp/node.hpp>
+#include "../c/transport/tcp-transport.h"
+#include "../c/encoding/binary-xml-element-reader.h"
 #include "../c/util/ndn_realloc.h"
-#include "tcp-transport.hpp"
+#include <ndn-cpp/transport/tcp-transport.hpp>
 
 using namespace std;
 
@@ -17,20 +20,27 @@
 {  
 }
 
+TcpTransport::TcpTransport() 
+  : elementListener_(0), isConnected_(false), transport_(new struct ndn_TcpTransport), elementReader_(new struct ndn_BinaryXmlElementReader)
+{
+  ndn_TcpTransport_initialize(transport_.get());
+  elementReader_->partialData.array = 0;
+}
+
 void 
 TcpTransport::connect(const Transport::ConnectionInfo& connectionInfo, ElementListener& elementListener)
 {
   const TcpTransport::ConnectionInfo& tcpConnectionInfo = dynamic_cast<const TcpTransport::ConnectionInfo&>(connectionInfo);
   
   ndn_Error error;
-  if ((error = ndn_TcpTransport_connect(&transport_, (char *)tcpConnectionInfo.getHost().c_str(), tcpConnectionInfo.getPort())))
+  if ((error = ndn_TcpTransport_connect(transport_.get(), (char *)tcpConnectionInfo.getHost().c_str(), tcpConnectionInfo.getPort())))
     throw std::runtime_error(ndn_getErrorString(error)); 
 
   // TODO: This belongs in the socket listener.
   const size_t initialLength = 1000;
   // Automatically cast elementReader_ to (struct ndn_ElementListener *)
   ndn_BinaryXmlElementReader_initialize
-    (&elementReader_, &elementListener, (uint8_t *)malloc(initialLength), initialLength, ndn_realloc);
+    (elementReader_.get(), &elementListener, (uint8_t *)malloc(initialLength), initialLength, ndn_realloc);
   
   isConnected_ = true;
   elementListener_ = &elementListener;
@@ -40,7 +50,7 @@
 TcpTransport::send(const uint8_t *data, size_t dataLength)
 {
   ndn_Error error;
-  if ((error = ndn_TcpTransport_send(&transport_, (uint8_t *)data, dataLength)))
+  if ((error = ndn_TcpTransport_send(transport_.get(), (uint8_t *)data, dataLength)))
     throw std::runtime_error(ndn_getErrorString(error));  
 }
 
@@ -49,17 +59,17 @@
 {
   int receiveIsReady;
   ndn_Error error;
-  if ((error = ndn_TcpTransport_receiveIsReady(&transport_, &receiveIsReady)))
+  if ((error = ndn_TcpTransport_receiveIsReady(transport_.get(), &receiveIsReady)))
     throw std::runtime_error(ndn_getErrorString(error));  
   if (!receiveIsReady)
     return;
 
   uint8_t buffer[8000];
   size_t nBytes;
-  if ((error = ndn_TcpTransport_receive(&transport_, buffer, sizeof(buffer), &nBytes)))
+  if ((error = ndn_TcpTransport_receive(transport_.get(), buffer, sizeof(buffer), &nBytes)))
     throw std::runtime_error(ndn_getErrorString(error));  
 
-  ndn_BinaryXmlElementReader_onReceivedData(&elementReader_, buffer, nBytes);
+  ndn_BinaryXmlElementReader_onReceivedData(elementReader_.get(), buffer, nBytes);
 }
 
 bool 
@@ -72,15 +82,15 @@
 TcpTransport::close()
 {
   ndn_Error error;
-  if ((error = ndn_TcpTransport_close(&transport_)))
+  if ((error = ndn_TcpTransport_close(transport_.get())))
     throw std::runtime_error(ndn_getErrorString(error));  
 }
 
 TcpTransport::~TcpTransport()
 {
-  if (elementReader_.partialData.array)
+  if (elementReader_->partialData.array)
     // Free the memory allocated in connect.
-    free(elementReader_.partialData.array);
+    free(elementReader_->partialData.array);
 }
 
 }
diff --git a/ndn-cpp/transport/tcp-transport.hpp b/ndn-cpp/transport/tcp-transport.hpp
deleted file mode 100644
index e6c2a73..0000000
--- a/ndn-cpp/transport/tcp-transport.hpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Jeff Thompson <jefft0@remap.ucla.edu>
- * See COPYING for copyright and distribution information.
- */
-
-#ifndef NDN_TCPTRANSPORT_HPP
-#define NDN_TCPTRANSPORT_HPP
-
-#include <string>
-#include "../c/transport/tcp-transport.h"
-#include "../c/encoding/binary-xml-element-reader.h"
-#include "transport.hpp"
-
-namespace ndn {
-  
-class TcpTransport : public Transport {
-public:
-  /**
-   * A TcpTransport::ConnectionInfo extends Transport::ConnectionInfo to hold the host and port info for the TCP connection.
-   */
-  class ConnectionInfo : public Transport::ConnectionInfo {
-  public:
-    /**
-     * Create a ConnectionInfo with the given host and port.
-     * @param host The host for the connection.
-     * @param port The port number for the connection. If omitted, use 6363.
-     */
-    ConnectionInfo(const char *host, unsigned short port = 6363)
-    : host_(host), port_(port)
-    {
-    }
-
-    /**
-     * Get the host given to the constructor.
-     * @return A string reference for the host.
-     */
-    const std::string& 
-    getHost() const { return host_; }
-    
-    /**
-     * Get the port given to the constructor.
-     * @return The port number.
-     */
-    unsigned short 
-    getPort() const { return port_; }
-    
-    virtual 
-    ~ConnectionInfo();
-    
-  private:
-    std::string host_;
-    unsigned short port_;
-  };
-
-  TcpTransport() 
-  : elementListener_(0), isConnected_(false)
-  {
-    ndn_TcpTransport_initialize(&transport_);
-    elementReader_.partialData.array = 0;
-  }
-  
-  /**
-   * Connect according to the info in ConnectionInfo, and processEvents() will use elementListener.
-   * @param connectionInfo A reference to a TcpTransport::ConnectionInfo.
-   * @param elementListener Not a shared_ptr because we assume that it will remain valid during the life of this object.
-   */
-  virtual void connect(const Transport::ConnectionInfo& connectionInfo, ElementListener& elementListener);
-  
-  /**
-   * Set data to the host
-   * @param data A pointer to the buffer of data to send.
-   * @param dataLength The number of bytes in data.
-   */
-  virtual void send(const uint8_t *data, size_t dataLength);
-
-  /**
-   * Process any data to receive.  For each element received, call elementListener.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
-   * call this from an main event loop, you may want to catch and log/disregard all exceptions.
-   */
-  virtual void processEvents();
-
-  virtual bool getIsConnected();
-
-  /**
-   * Close the connection to the host.
-   */
-  virtual void close();
-  
-  ~TcpTransport();
-  
-private:
-  struct ndn_TcpTransport transport_;
-  bool isConnected_;
-  ElementListener *elementListener_;
-  // TODO: This belongs in the socket listener.
-  ndn_BinaryXmlElementReader elementReader_;
-};
-
-}
-
-#endif
diff --git a/ndn-cpp/transport/transport.cpp b/ndn-cpp/transport/transport.cpp
index b36b119..0dcf518 100644
--- a/ndn-cpp/transport/transport.cpp
+++ b/ndn-cpp/transport/transport.cpp
@@ -1,3 +1,4 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /**
  * Copyright (C) 2013 Regents of the University of California.
  * @author: Jeff Thompson <jefft0@remap.ucla.edu>
@@ -5,7 +6,7 @@
  */
 
 #include <stdexcept>
-#include "transport.hpp"
+#include <ndn-cpp/transport/transport.hpp>
 
 using namespace std;
 
diff --git a/ndn-cpp/transport/transport.hpp b/ndn-cpp/transport/transport.hpp
deleted file mode 100644
index 512a003..0000000
--- a/ndn-cpp/transport/transport.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Jeff Thompson <jefft0@remap.ucla.edu>
- * See COPYING for copyright and distribution information.
- */
-
-#ifndef NDN_TRANSPORT_HPP
-#define NDN_TRANSPORT_HPP
-
-#include <vector>
-
-namespace ndn {
-
-class ElementListener;
-
-class Transport {
-public:
-  /**
-   * A Transport::ConnectionInfo is a base class for connection information used by subclasses of Transport.
-   */
-  class ConnectionInfo { 
-  public:
-    virtual ~ConnectionInfo();
-  };
-  
-  /**
-   * Connect according to the info in ConnectionInfo, and processEvents() will use elementListener.
-   * @param connectionInfo A reference to an object of a subclass of ConnectionInfo.
-   * @param elementListener Not a shared_ptr because we assume that it will remain valid during the life of this object.
-   */
-  virtual void 
-  connect(const Transport::ConnectionInfo& connectionInfo, ElementListener& elementListener);
-  
-  /**
-   * Set data to the host
-   * @param data A pointer to the buffer of data to send.
-   * @param dataLength The number of bytes in data.
-   */
-  virtual void 
-  send(const uint8_t *data, size_t dataLength);
-  
-  void 
-  send(const std::vector<uint8_t>& data)
-  {
-    send(&data[0], data.size());
-  }
-  
-  /**
-   * Process any data to receive.  For each element received, call elementListener.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
-   * call this from an main event loop, you may want to catch and log/disregard all exceptions.
-   */
-  virtual void 
-  processEvents() = 0;
-
-  virtual bool 
-  getIsConnected();
-  
-  /**
-   * Close the connection.  This base class implementation does nothing, but your derived class can override.
-   */
-  virtual void 
-  close();
-  
-  virtual ~Transport();
-};
-
-}
-
-#endif
diff --git a/ndn-cpp/transport/udp-transport.cpp b/ndn-cpp/transport/udp-transport.cpp
index 4e65375..17250d4 100644
--- a/ndn-cpp/transport/udp-transport.cpp
+++ b/ndn-cpp/transport/udp-transport.cpp
@@ -1,3 +1,4 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /**
  * Copyright (C) 2013 Regents of the University of California.
  * @author: Jeff Thompson <jefft0@remap.ucla.edu>
@@ -5,9 +6,11 @@
  */
 
 #include <stdexcept>
-#include "../face.hpp"
+#include <ndn-cpp/face.hpp>
+#include "../c/transport/udp-transport.h"
+#include "../c/encoding/binary-xml-element-reader.h"
 #include "../c/util/ndn_realloc.h"
-#include "udp-transport.hpp"
+#include <ndn-cpp/transport/udp-transport.hpp>
 
 using namespace std;
 
@@ -17,20 +20,27 @@
 {  
 }
 
+UdpTransport::UdpTransport() 
+  : elementListener_(0), isConnected_(false), transport_(new struct ndn_UdpTransport), elementReader_(new struct ndn_BinaryXmlElementReader)
+{
+  ndn_UdpTransport_initialize(transport_.get());
+  elementReader_->partialData.array = 0;
+}
+
 void 
 UdpTransport::connect(const Transport::ConnectionInfo& connectionInfo, ElementListener& elementListener)
 {
   const UdpTransport::ConnectionInfo& udpConnectionInfo = dynamic_cast<const UdpTransport::ConnectionInfo&>(connectionInfo);
   
   ndn_Error error;
-  if ((error = ndn_UdpTransport_connect(&transport_, (char *)udpConnectionInfo.getHost().c_str(), udpConnectionInfo.getPort())))
+  if ((error = ndn_UdpTransport_connect(transport_.get(), (char *)udpConnectionInfo.getHost().c_str(), udpConnectionInfo.getPort())))
     throw std::runtime_error(ndn_getErrorString(error)); 
 
   // TODO: This belongs in the socket listener.
   const size_t initialLength = 1000;
   // Automatically cast elementReader_ to (struct ndn_ElementListener *)
   ndn_BinaryXmlElementReader_initialize
-    (&elementReader_, &elementListener, (uint8_t *)malloc(initialLength), initialLength, ndn_realloc);
+    (elementReader_.get(), &elementListener, (uint8_t *)malloc(initialLength), initialLength, ndn_realloc);
   
   isConnected_ = true;
   elementListener_ = &elementListener;
@@ -40,7 +50,7 @@
 UdpTransport::send(const uint8_t *data, size_t dataLength)
 {
   ndn_Error error;
-  if ((error = ndn_UdpTransport_send(&transport_, (uint8_t *)data, dataLength)))
+  if ((error = ndn_UdpTransport_send(transport_.get(), (uint8_t *)data, dataLength)))
     throw std::runtime_error(ndn_getErrorString(error));  
 }
 
@@ -49,17 +59,17 @@
 {
   int receiveIsReady;
   ndn_Error error;
-  if ((error = ndn_UdpTransport_receiveIsReady(&transport_, &receiveIsReady)))
+  if ((error = ndn_UdpTransport_receiveIsReady(transport_.get(), &receiveIsReady)))
     throw std::runtime_error(ndn_getErrorString(error));  
   if (!receiveIsReady)
     return;
 
   uint8_t buffer[8000];
   size_t nBytes;
-  if ((error = ndn_UdpTransport_receive(&transport_, buffer, sizeof(buffer), &nBytes)))
+  if ((error = ndn_UdpTransport_receive(transport_.get(), buffer, sizeof(buffer), &nBytes)))
     throw std::runtime_error(ndn_getErrorString(error));  
 
-  ndn_BinaryXmlElementReader_onReceivedData(&elementReader_, buffer, nBytes);
+  ndn_BinaryXmlElementReader_onReceivedData(elementReader_.get(), buffer, nBytes);
 }
 
 bool 
@@ -72,15 +82,15 @@
 UdpTransport::close()
 {
   ndn_Error error;
-  if ((error = ndn_UdpTransport_close(&transport_)))
+  if ((error = ndn_UdpTransport_close(transport_.get())))
     throw std::runtime_error(ndn_getErrorString(error));  
 }
 
 UdpTransport::~UdpTransport()
 {
-  if (elementReader_.partialData.array)
+  if (elementReader_->partialData.array)
     // Free the memory allocated in connect.
-    free(elementReader_.partialData.array);
+    free(elementReader_->partialData.array);
 }
 
 }
diff --git a/ndn-cpp/transport/udp-transport.hpp b/ndn-cpp/transport/udp-transport.hpp
deleted file mode 100644
index a7a40b1..0000000
--- a/ndn-cpp/transport/udp-transport.hpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Jeff Thompson <jefft0@remap.ucla.edu>
- * See COPYING for copyright and distribution information.
- */
-
-#ifndef NDN_UDPTRANSPORT_HPP
-#define NDN_UDPTRANSPORT_HPP
-
-#include <string>
-#include "../c/transport/udp-transport.h"
-#include "../c/encoding/binary-xml-element-reader.h"
-#include "transport.hpp"
-
-namespace ndn {
-  
-class UdpTransport : public Transport {
-public:
-  /**
-   * A UdpTransport::ConnectionInfo extends Transport::ConnectionInfo to hold the host and port info for the UDP connection.
-   */
-  class ConnectionInfo : public Transport::ConnectionInfo {
-  public:
-    /**
-     * Create a ConnectionInfo with the given host and port.
-     * @param host The host for the connection.
-     * @param port The port number for the connection. If omitted, use 6363.
-     */
-    ConnectionInfo(const char *host, unsigned short port = 6363)
-    : host_(host), port_(port)
-    {
-    }
-
-    /**
-     * Get the host given to the constructor.
-     * @return A string reference for the host.
-     */
-    const std::string& 
-    getHost() const { return host_; }
-    
-    /**
-     * Get the port given to the constructor.
-     * @return The port number.
-     */
-    unsigned short 
-    getPort() const { return port_; }
-    
-    virtual 
-    ~ConnectionInfo();
-
-  private:
-    std::string host_;
-    unsigned short port_;
-  };
-
-  UdpTransport() 
-  : elementListener_(0), isConnected_(false)
-  {
-    ndn_UdpTransport_initialize(&transport_);
-    elementReader_.partialData.array = 0;
-  }
-  
-  /**
-   * Connect according to the info in ConnectionInfo, and processEvents() will use elementListener.
-   * @param connectionInfo A reference to a TcpTransport::ConnectionInfo.
-   * @param elementListener Not a shared_ptr because we assume that it will remain valid during the life of this object.
-   */
-  virtual void 
-  connect(const Transport::ConnectionInfo& connectionInfo, ElementListener& elementListener);
-  
-  /**
-   * Set data to the host
-   * @param data A pointer to the buffer of data to send.
-   * @param dataLength The number of bytes in data.
-   */
-  virtual void 
-  send(const uint8_t *data, size_t dataLength);
-
-  /**
-   * Process any data to receive.  For each element received, call elementListener.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
-   * call this from an main event loop, you may want to catch and log/disregard all exceptions.
-   */
-  virtual void 
-  processEvents();
-  
-  virtual bool 
-  getIsConnected();
-
-  /**
-   * Close the connection to the host.
-   */
-  virtual void 
-  close();
-
-  ~UdpTransport();
-  
-private:
-  struct ndn_UdpTransport transport_;
-  bool isConnected_;
-  ElementListener *elementListener_;
-  // TODO: This belongs in the socket listener.
-  ndn_BinaryXmlElementReader elementReader_;
-};
-
-}
-
-#endif
