diff --git a/src/security/transform/base64-decode.cpp b/src/security/transform/base64-decode.cpp
index 8b047bc..5033b63 100644
--- a/src/security/transform/base64-decode.cpp
+++ b/src/security/transform/base64-decode.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2016 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -20,7 +20,6 @@
  */
 
 #include "base64-decode.hpp"
-#include "../../encoding/buffer.hpp"
 #include "../detail/openssl.hpp"
 
 namespace ndn {
@@ -59,12 +58,14 @@
 static const size_t BUFFER_LENGTH = 1024;
 
 Base64Decode::Base64Decode(bool expectNewlineEvery64Bytes)
-  : m_impl(new Impl)
+  : m_impl(make_unique<Impl>())
 {
   if (!expectNewlineEvery64Bytes)
     BIO_set_flags(m_impl->m_base64, BIO_FLAGS_BASE64_NO_NL);
 }
 
+Base64Decode::~Base64Decode() = default;
+
 void
 Base64Decode::preTransform()
 {
@@ -114,7 +115,7 @@
   // OpenSSL base64 BIO cannot give us the number bytes of partial decoded result,
   // so we just try to read a chunk.
   auto buffer = make_unique<OBuffer>(BUFFER_LENGTH);
-  int rLen = BIO_read(m_impl->m_base64, &(*buffer)[0], buffer->size());
+  int rLen = BIO_read(m_impl->m_base64, buffer->data(), buffer->size());
   if (rLen <= 0)
     return;
 
diff --git a/src/security/transform/base64-decode.hpp b/src/security/transform/base64-decode.hpp
index ea69b8d..203716f 100644
--- a/src/security/transform/base64-decode.hpp
+++ b/src/security/transform/base64-decode.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -44,8 +44,9 @@
   explicit
   Base64Decode(bool expectNewlineEvery64Bytes = true);
 
-private:
+  ~Base64Decode();
 
+private:
   /**
    * @brief Read partial transformation results into output buffer and write them into next module.
    */
diff --git a/src/security/transform/base64-encode.cpp b/src/security/transform/base64-encode.cpp
index 60bc25f..d9a8a7a 100644
--- a/src/security/transform/base64-encode.cpp
+++ b/src/security/transform/base64-encode.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2016 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -20,7 +20,6 @@
  */
 
 #include "base64-encode.hpp"
-#include "../../encoding/buffer.hpp"
 #include "../detail/openssl.hpp"
 
 namespace ndn {
@@ -53,12 +52,14 @@
 };
 
 Base64Encode::Base64Encode(bool needBreak)
-  : m_impl(new Impl)
+  : m_impl(make_unique<Impl>())
 {
   if (!needBreak)
     BIO_set_flags(m_impl->m_base64, BIO_FLAGS_BASE64_NO_NL);
 }
 
+Base64Encode::~Base64Encode() = default;
+
 void
 Base64Encode::preTransform()
 {
@@ -109,7 +110,7 @@
 
   // there is something to read from BIO
   auto buffer = make_unique<OBuffer>(nRead);
-  int rLen = BIO_read(m_impl->m_sink, &(*buffer)[0], nRead);
+  int rLen = BIO_read(m_impl->m_sink, buffer->data(), nRead);
   if (rLen < 0)
     return;
 
diff --git a/src/security/transform/base64-encode.hpp b/src/security/transform/base64-encode.hpp
index d62b5d8..34ad577 100644
--- a/src/security/transform/base64-encode.hpp
+++ b/src/security/transform/base64-encode.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -42,6 +42,8 @@
   explicit
   Base64Encode(bool needBreak = true);
 
+  ~Base64Encode();
+
 private:
   /**
    * @brief Read partial transformation result (if exists) from BIO
diff --git a/src/security/transform/block-cipher.cpp b/src/security/transform/block-cipher.cpp
index 327aba6..b1bb091 100644
--- a/src/security/transform/block-cipher.cpp
+++ b/src/security/transform/block-cipher.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2016 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -48,21 +48,24 @@
   BIO* m_sink; // BIO_f_cipher alone does not work without a sink
 };
 
+
 BlockCipher::BlockCipher(BlockCipherAlgorithm algo, CipherOperator op,
                          const uint8_t* key, size_t keyLen,
                          const uint8_t* iv, size_t ivLen)
-  : m_impl(new Impl)
+  : m_impl(make_unique<Impl>())
 {
   switch (algo) {
   case BlockCipherAlgorithm::AES_CBC:
     initializeAesCbc(key, keyLen, iv, ivLen, op);
     break;
   default:
-    BOOST_THROW_EXCEPTION(Error(getIndex(), "Cipher algorithm " +
-                                boost::lexical_cast<std::string>(algo) + " is not supported"));
+    BOOST_THROW_EXCEPTION(Error(getIndex(), "Unsupported block cipher algorithm " +
+                                boost::lexical_cast<std::string>(algo)));
   }
 }
 
+BlockCipher::~BlockCipher() = default;
+
 void
 BlockCipher::preTransform()
 {
@@ -113,7 +116,7 @@
 
   // there is something to read from BIO
   auto buffer = make_unique<OBuffer>(nRead);
-  int rLen = BIO_read(m_impl->m_sink, &(*buffer)[0], nRead);
+  int rLen = BIO_read(m_impl->m_sink, buffer->data(), nRead);
   if (rLen < 0)
     return;
 
diff --git a/src/security/transform/block-cipher.hpp b/src/security/transform/block-cipher.hpp
index 320e184..ee56682 100644
--- a/src/security/transform/block-cipher.hpp
+++ b/src/security/transform/block-cipher.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -52,6 +52,8 @@
               const uint8_t* key, size_t keyLen,
               const uint8_t* iv, size_t ivLen);
 
+  ~BlockCipher();
+
 private:
   /**
    * @brief Read partial transformation result (if exists) from BIO
diff --git a/src/security/transform/digest-filter.cpp b/src/security/transform/digest-filter.cpp
index 862d784..44fe429 100644
--- a/src/security/transform/digest-filter.cpp
+++ b/src/security/transform/digest-filter.cpp
@@ -71,6 +71,8 @@
                                 boost::lexical_cast<std::string>(algo)));
 }
 
+DigestFilter::~DigestFilter() = default;
+
 size_t
 DigestFilter::convert(const uint8_t* buf, size_t size)
 {
diff --git a/src/security/transform/digest-filter.hpp b/src/security/transform/digest-filter.hpp
index 0ccc81b..a9c023e 100644
--- a/src/security/transform/digest-filter.hpp
+++ b/src/security/transform/digest-filter.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -41,6 +41,8 @@
   explicit
   DigestFilter(DigestAlgorithm algo);
 
+  ~DigestFilter();
+
 private:
   /**
    * @brief Append data @p buf into digest calculation
diff --git a/src/security/transform/hmac-filter.cpp b/src/security/transform/hmac-filter.cpp
index e150a79..07a1796 100644
--- a/src/security/transform/hmac-filter.cpp
+++ b/src/security/transform/hmac-filter.cpp
@@ -68,8 +68,9 @@
 #endif // OPENSSL_VERSION_NUMBER < 0x1010000fL
 };
 
+
 HmacFilter::HmacFilter(DigestAlgorithm algo, const uint8_t* key, size_t keyLen)
-  : m_impl(new Impl)
+  : m_impl(make_unique<Impl>())
 {
   BOOST_ASSERT(key != nullptr);
   BOOST_ASSERT(keyLen > 0);
@@ -82,6 +83,8 @@
     BOOST_THROW_EXCEPTION(Error(getIndex(), "Cannot initialize HMAC"));
 }
 
+HmacFilter::~HmacFilter() = default;
+
 size_t
 HmacFilter::convert(const uint8_t* buf, size_t size)
 {
@@ -97,7 +100,7 @@
   auto buffer = make_unique<OBuffer>(EVP_MAX_MD_SIZE);
   unsigned int mdLen = 0;
 
-  if (HMAC_Final(*m_impl, &(*buffer)[0], &mdLen) == 0)
+  if (HMAC_Final(*m_impl, buffer->data(), &mdLen) == 0)
     BOOST_THROW_EXCEPTION(Error(getIndex(), "Failed to finalize HMAC"));
 
   buffer->erase(buffer->begin() + mdLen, buffer->end());
diff --git a/src/security/transform/hmac-filter.hpp b/src/security/transform/hmac-filter.hpp
index 002fda8..d0770b3 100644
--- a/src/security/transform/hmac-filter.hpp
+++ b/src/security/transform/hmac-filter.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -35,13 +35,14 @@
 class HmacFilter : public Transform
 {
 public:
-
   /**
    * @brief Create a HMAC module to generate HMAC using algorithm @p algo and @p key
    * @pre @p key must not be nullptr, and @p size must be a positive integer.
    */
   HmacFilter(DigestAlgorithm algo, const uint8_t* key, size_t keyLen);
 
+  ~HmacFilter();
+
 private:
   /**
    * @brief write data @p buf into HMAC signer
diff --git a/src/security/transform/verifier-filter.cpp b/src/security/transform/verifier-filter.cpp
index 1a7eebe..6e54c34 100644
--- a/src/security/transform/verifier-filter.cpp
+++ b/src/security/transform/verifier-filter.cpp
@@ -20,6 +20,7 @@
  */
 
 #include "verifier-filter.hpp"
+#include "public-key.hpp"
 #include "../detail/openssl-helper.hpp"
 
 #include <boost/lexical_cast.hpp>
@@ -56,9 +57,10 @@
   size_t m_sigLen;
 };
 
+
 VerifierFilter::VerifierFilter(DigestAlgorithm algo, const PublicKey& key,
                                const uint8_t* sig, size_t sigLen)
-  : m_impl(new Impl(key, sig, sigLen))
+  : m_impl(make_unique<Impl>(key, sig, sigLen))
 {
   const EVP_MD* md = detail::digestAlgorithmToEvpMd(algo);
   if (md == nullptr)
@@ -70,6 +72,8 @@
                                 boost::lexical_cast<std::string>(algo)));
 }
 
+VerifierFilter::~VerifierFilter() = default;
+
 size_t
 VerifierFilter::convert(const uint8_t* buf, size_t size)
 {
diff --git a/src/security/transform/verifier-filter.hpp b/src/security/transform/verifier-filter.hpp
index 4bc63e3..e08cc7d 100644
--- a/src/security/transform/verifier-filter.hpp
+++ b/src/security/transform/verifier-filter.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -23,26 +23,29 @@
 #define NDN_CXX_SECURITY_TRANSFORM_VERIFIER_FILTER_HPP
 
 #include "transform-base.hpp"
-#include "public-key.hpp"
 #include "../security-common.hpp"
 
 namespace ndn {
 namespace security {
 namespace transform {
 
+class PublicKey;
+
 /**
- * @brief The module to verify signature.
+ * @brief The module to verify signatures.
  *
- * The next module is usually SinkBool.
+ * The next module in the chain is usually BoolSink.
  */
 class VerifierFilter : public Transform
 {
 public:
   /**
-   * @brief Create a verifier module to verify signature @p sig using algorithm @p algo and @p key
+   * @brief Create a verifier module to verify signature @p sig using algorithm @p algo and key @p key
    */
   VerifierFilter(DigestAlgorithm algo, const PublicKey& key, const uint8_t* sig, size_t sigLen);
 
+  ~VerifierFilter();
+
 private:
   /**
    * @brief Write data @p buf into verifier
