diff --git a/src/util/blob-stream.hpp b/src/util/blob-stream.hpp
deleted file mode 100644
index 3bad4b7..0000000
--- a/src/util/blob-stream.hpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
-/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
- * @author: Jeff Thompson <jefft0@remap.ucla.edu>
- * See COPYING for copyright and distribution information.
- */
-
-#ifndef NDN_BLOB_STREAM_HPP
-#define NDN_BLOB_STREAM_HPP
-
-#include <ndn-cpp-dev/common.hpp>
-
-#if NDN_CPP_USE_SYSTEM_BOOST
-#include <boost/iostreams/detail/ios.hpp>
-#include <boost/iostreams/categories.hpp>
-#include <boost/iostreams/stream.hpp>
-namespace ndnboost = boost;
-#else
-// We can use ndnboost::iostreams because this is internal and will not conflict with the application if it uses boost::iostreams.
-#include <ndnboost/iostreams/detail/ios.hpp>
-#include <ndnboost/iostreams/categories.hpp>
-#include <ndnboost/iostreams/stream.hpp>
-#endif
-
-namespace ndn {
-
-class blob_append_device {
-public:
-  typedef char  char_type;
-  typedef ndnboost::iostreams::sink_tag category;
-  
-  blob_append_device(std::vector<uint8_t>& container)
-  : container_(container)
-  {
-  }
-  
-  std::streamsize
-  write(const char_type* s, std::streamsize n)
-  {
-    std::copy(s, s+n, std::back_inserter(container_));
-    return n;
-  }
-  
-protected:
-  std::vector<uint8_t>& container_;
-};
-
-/**
- * This is called "blob_stream" but it doesn't use an ndn::Blob which is immutable.  It uses a pointer to a vector<uint8_t>.
- * This is inteded for internal library use, not exported in the API.
- */
-struct blob_stream : public ndnboost::iostreams::stream<blob_append_device>
-{
-  blob_stream()
-    : buffer_(new std::vector<uint8_t>())
-    , device_(*buffer_)
-  {
-    open(device_);
-  }
-
-  ptr_lib::shared_ptr<std::vector<uint8_t> >
-  buf()
-  {
-    flush();
-    return buffer_;
-  }
-
-private:
-  ptr_lib::shared_ptr<std::vector<uint8_t> > buffer_;
-  blob_append_device device_;
-};
-
-}
-
-#endif
diff --git a/src/util/blob.cpp b/src/util/blob.cpp
deleted file mode 100644
index 46297c6..0000000
--- a/src/util/blob.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/* -*- 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>
- * See COPYING for copyright and distribution information.
- */
-
-#include "../c/util/blob.h"
-#include <ndn-cpp-dev/util/blob.hpp>
-
-using namespace std;
-
-namespace ndn {
-
-Blob::Blob(const struct ndn_Blob& blobStruct)
-  : ptr_lib::shared_ptr<const vector<uint8_t> >(new vector<uint8_t>(blobStruct.value, blobStruct.value + blobStruct.length))
-{
-}
-
-void 
-Blob::get(struct ndn_Blob& blobStruct) const 
-{
-  blobStruct.length = size(); 
-  if (size() > 0)
-    blobStruct.value = (uint8_t*)buf();
-  else
-    blobStruct.value = 0;
-}
-
-}
diff --git a/src/util/changed-event.cpp b/src/util/changed-event.cpp
deleted file mode 100644
index 08dcb98..0000000
--- a/src/util/changed-event.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/* -*- 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>
- * See COPYING for copyright and distribution information.
- */
-
-#include "changed-event.hpp"
-
-using namespace std;
-
-namespace ndn {
-
-void 
-ChangedEvent::fire()
-{
-  for (size_t i = 0; i < listeners_.size(); ++i)
-    listeners_[i]();
-}
-
-}
diff --git a/src/util/changed-event.hpp b/src/util/changed-event.hpp
deleted file mode 100644
index aee8549..0000000
--- a/src/util/changed-event.hpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- 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>
- * See COPYING for copyright and distribution information.
- */
-
-#ifndef NDN_CHANGED_EVENT_HPP
-#define NDN_CHANGED_EVENT_HPP
-
-#include <vector>
-#include <ndn-cpp-dev/common.hpp>
-
-namespace ndn {
-
-/**
- * An OnChanged function object is called to notify a listener of a changed event.
- */
-typedef func_lib::function<void()> OnChanged;
-
-class ChangedEvent {
-public:
-  /**
-   * Add onChanged to the listener list. This does not check if a duplicate is already in the list.
-   * @param onChanged The OnChanged function object.
-   */
-  void 
-  add(OnChanged onChanged)
-  {
-    listeners_.push_back(onChanged);
-  }
-  
-  /**
-   * Call all the listeners.
-   */
-  void 
-  fire();
-
-#if 0  
-private:
-#endif
-  std::vector<OnChanged> listeners_;
-};
-
-}
-
-#endif
diff --git a/src/util/crypto.cpp b/src/util/crypto.cpp
new file mode 100644
index 0000000..ce17259
--- /dev/null
+++ b/src/util/crypto.cpp
@@ -0,0 +1,19 @@
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * @author: Jeff Thompson <jefft0@remap.ucla.edu>
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "ndn-cpp-dev/util/crypto.hpp"
+
+namespace ndn {
+
+void ndn_digestSha256(const uint8_t *data, size_t dataLength, uint8_t *digest)
+{
+  SHA256_CTX sha256;
+  SHA256_Init(&sha256);
+  SHA256_Update(&sha256, data, dataLength);
+  SHA256_Final(digest, &sha256);
+}
+
+} // namespace ndn
diff --git a/src/util/dynamic-uint8-vector.cpp b/src/util/dynamic-uint8-vector.cpp
deleted file mode 100644
index 197fc0e..0000000
--- a/src/util/dynamic-uint8-vector.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- 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>
- * See COPYING for copyright and distribution information.
- */
-
-#include "dynamic-uint8-vector.hpp"
-
-using namespace std;
-
-namespace ndn {
-
-DynamicUInt8Vector::DynamicUInt8Vector(size_t initialLength)
-: vector_(new vector<uint8_t>(initialLength))
-{
-  ndn_DynamicUInt8Array_initialize(this, &vector_->front(), initialLength, DynamicUInt8Vector::realloc);
-}
-
-uint8_t*
-DynamicUInt8Vector::realloc(struct ndn_DynamicUInt8Array *self, uint8_t *array, size_t length)
-{
-  // Because this method is private, assume there is not a problem with upcasting.
-  DynamicUInt8Vector *thisObject = (DynamicUInt8Vector *)self;
-  
-  if (array != &thisObject->vector_->front())
-    // We don't expect this to ever happen. The caller didn't pass the array from this object.
-    return 0;
-  
-  thisObject->vector_->resize(length);
-  return &thisObject->vector_->front();
-}
-
-}
diff --git a/src/util/dynamic-uint8-vector.hpp b/src/util/dynamic-uint8-vector.hpp
deleted file mode 100644
index 55ed1ee..0000000
--- a/src/util/dynamic-uint8-vector.hpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- 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>
- * See COPYING for copyright and distribution information.
- */
-
-#ifndef NDN_DYNAMIC_UCHAR_VECTOR_HPP
-#define NDN_DYNAMIC_UCHAR_VECTOR_HPP
-
-#include <vector>
-#include <ndn-cpp-dev/common.hpp>
-#include "../c/util/dynamic-uint8-array.h"
-
-namespace ndn {
-
-/**
- * A DynamicUInt8Vector extends ndn_DynamicUInt8Array to hold a shared_ptr<vector<uint8_t> > for use with
- * C functions which need an ndn_DynamicUInt8Array.
- */
-class DynamicUInt8Vector : public ndn_DynamicUInt8Array {
-public:
-  /**
-   * Create a new DynamicUInt8Vector with an initial length.
-   * @param initialLength The initial size of the allocated vector.
-   */
-  DynamicUInt8Vector(size_t initialLength);
-  
-  /**
-   * Get the shared_ptr to the allocated vector.
-   * @return The shared_ptr to the allocated vector. 
-   */
-  ptr_lib::shared_ptr<std::vector<uint8_t> >& 
-  get() { return vector_; }
-  
-private:
-  /**
-   * Implement the static realloc function using vector resize.
-   * @param self A pointer to this object.
-   * @param array Should be the front of the vector.
-   * @param length The new length for the vector.
-   * @return The front of the allocated vector.
-   */
-  static uint8_t*
-  realloc(struct ndn_DynamicUInt8Array *self, uint8_t *array, size_t length);
-  
-  ptr_lib::shared_ptr<std::vector<uint8_t> > vector_;
-};
-
-}
-
-#endif
diff --git a/src/util/ndnd-id-fetcher.hpp b/src/util/ndnd-id-fetcher.hpp
index 6a1224e..e10eb38 100644
--- a/src/util/ndnd-id-fetcher.hpp
+++ b/src/util/ndnd-id-fetcher.hpp
@@ -9,7 +9,7 @@
 #define NDN_NDND_ID_FETCHER_HPP
 
 #include <ndn-cpp-dev/common.hpp>
-#include "ndn-cpp-dev/c/util/crypto.h"
+#include "ndn-cpp-dev/util/crypto.hpp"
 
 namespace ndn {
 
diff --git a/src/util/time.cpp b/src/util/time.cpp
new file mode 100644
index 0000000..03eb81b
--- /dev/null
+++ b/src/util/time.cpp
@@ -0,0 +1,85 @@
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * @author: Jeff Thompson <jefft0@remap.ucla.edu>
+ * See COPYING for copyright and distribution information.
+ */
+
+#include <ndn-cpp-dev/ndn-cpp-config.h>
+#if NDN_CPP_HAVE_TIME_H
+#include <time.h>
+#endif
+#if NDN_CPP_HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include "time.hpp"
+
+namespace ndn {
+
+MillisecondsSince1970 
+ndn_getNowMilliseconds()
+{
+  struct timeval t;
+  // Note: configure.ac requires gettimeofday.
+  gettimeofday(&t, 0);
+  return t.tv_sec * 1000.0 + t.tv_usec / 1000.0;
+}
+
+int
+ndn_toIsoString(MillisecondsSince1970 milliseconds, char *isoString)
+{
+#if NDN_CPP_HAVE_GMTIME_SUPPORT
+  if (milliseconds < 0)
+    return -1;
+  else if (milliseconds > 2e14)
+    // 2e14 is about the year 8300.  We don't want to go over a 4-digit year.
+    return -1;
+  
+  double secondsSince1970 = milliseconds / 1000.0;
+  char fractionBuffer[10];
+  sprintf(fractionBuffer, "%.06lf", fmod(secondsSince1970, 1.0));
+  const char *fraction = strchr(fractionBuffer, '.');
+  if (!fraction)
+    // Don't expect this to happen.
+    fraction = ".000000";
+    
+  time_t seconds = (time_t)secondsSince1970;
+  struct tm* gmt = gmtime(&seconds);
+  sprintf(isoString, "%04d%02d%02dT%02d%02d%02d%s", 1900 + gmt->tm_year, gmt->tm_mon + 1, gmt->tm_mday,
+    gmt->tm_hour, gmt->tm_min, gmt->tm_sec, fraction);
+  
+  return 0;
+#else
+  return -1;
+#endif
+}
+
+int
+ndn_fromIsoString(const char* isoString, MillisecondsSince1970 *milliseconds)
+{
+#if NDN_CPP_HAVE_GMTIME_SUPPORT
+  // Initialize time zone, etc.
+  time_t dummyTime = 0;
+  struct tm tm1 = *gmtime(&dummyTime);
+  
+  sscanf(isoString, "%4d%2d%2dT%2d%2d", &tm1.tm_year, &tm1.tm_mon, &tm1.tm_mday, &tm1.tm_hour, &tm1.tm_min);
+  // Skip the time past minutes and get the float seconds.
+  double seconds;
+  sscanf(isoString + (4 + 2 + 2 + 1 + 2 + 2), "%lf", &seconds);
+  
+  // tm_year starts from 1900.
+  tm1.tm_year -= 1900;
+  // tm_mon starts from 0, not 1.
+  tm1.tm_mon -= 1;
+  tm1.tm_sec = 0;
+  
+  *milliseconds = (timegm(&tm1) + seconds) * 1000.0;
+  return 0;
+#else
+  return -1;
+#endif
+}
+
+} // namespace ndn
diff --git a/src/util/time.hpp b/src/util/time.hpp
index 90482d9..5e5dc7c 100644
--- a/src/util/time.hpp
+++ b/src/util/time.hpp
@@ -8,11 +8,19 @@
 #ifndef NDN_TIME_HPP
 #define NDN_TIME_HPP
 
-#include <stdexcept>
-#include "../c/util/time.h"
+#include "ndn-cpp-dev/common.hpp"
 
 namespace ndn {
 
+MillisecondsSince1970 
+ndn_getNowMilliseconds();
+
+int
+ndn_toIsoString(MillisecondsSince1970 milliseconds, char *isoString);
+
+int
+ndn_fromIsoString(const char* isoString, MillisecondsSince1970 *milliseconds);
+
 /**
  * Convert to the ISO string representation of the time.
  * @param time Milliseconds since 1/1/1970.
@@ -22,9 +30,9 @@
 toIsoString(const MillisecondsSince1970& time)
 {
   char isoString[25];
-  ndn_Error error;
+  int error;
   if ((error = ndn_toIsoString(time, isoString)))
-    throw std::runtime_error(ndn_getErrorString(error));
+    throw std::runtime_error("toIsoString");
   
   return isoString;
 }
@@ -38,9 +46,9 @@
 fromIsoString(const std::string& isoString)
 {
   MillisecondsSince1970 milliseconds;
-  ndn_Error error;
+  int error;
   if ((error = ndn_fromIsoString(isoString.c_str(), &milliseconds)))
-    throw std::runtime_error(ndn_getErrorString(error));
+    throw std::runtime_error("fromIsoString");
   
   return milliseconds;
 }
