diff --git a/src/security/pib/identity-container.cpp b/src/security/pib/identity-container.cpp
index 7c018ce..0e4749f 100644
--- a/src/security/pib/identity-container.cpp
+++ b/src/security/pib/identity-container.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -81,10 +81,10 @@
 }
 
 IdentityContainer::IdentityContainer(shared_ptr<PibImpl> pibImpl)
-  : m_pibImpl(pibImpl)
+  : m_pibImpl(std::move(pibImpl))
 {
-  BOOST_ASSERT(pibImpl != nullptr);
-  m_identityNames = pibImpl->getIdentities();
+  BOOST_ASSERT(m_pibImpl != nullptr);
+  m_identityNames = m_pibImpl->getIdentities();
 }
 
 IdentityContainer::const_iterator
@@ -116,8 +116,7 @@
 {
   if (m_identityNames.count(identityName) == 0) {
     m_identityNames.insert(identityName);
-    m_identities[identityName] =
-      shared_ptr<detail::IdentityImpl>(new detail::IdentityImpl(identityName, m_pibImpl, true));
+    m_identities[identityName] = make_shared<detail::IdentityImpl>(identityName, m_pibImpl, true);
   }
   return get(identityName);
 }
@@ -140,7 +139,7 @@
     id = it->second;
   }
   else {
-    id = shared_ptr<detail::IdentityImpl>(new detail::IdentityImpl(identityName, m_pibImpl, false));
+    id = make_shared<detail::IdentityImpl>(identityName, m_pibImpl, false);
     m_identities[identityName] = id;
   }
   return Identity(id);
diff --git a/src/security/pib/key-container.cpp b/src/security/pib/key-container.cpp
index 7dc8358..ee47e37 100644
--- a/src/security/pib/key-container.cpp
+++ b/src/security/pib/key-container.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -121,7 +121,7 @@
   }
 
   m_keyNames.insert(keyName);
-  m_keys[keyName] = shared_ptr<detail::KeyImpl>(new detail::KeyImpl(keyName, key, keyLen, m_pib));
+  m_keys[keyName] = make_shared<detail::KeyImpl>(keyName, key, keyLen, m_pib);
 
   return get(keyName);
 }
@@ -154,7 +154,7 @@
     key = it->second;
   }
   else {
-    key = shared_ptr<detail::KeyImpl>(new detail::KeyImpl(keyName, m_pib));
+    key = make_shared<detail::KeyImpl>(keyName, m_pib);
     m_keys[keyName] = key;
   }
 
diff --git a/src/security/pib/pib.cpp b/src/security/pib/pib.cpp
index 68b9add..4fba641 100644
--- a/src/security/pib/pib.cpp
+++ b/src/security/pib/pib.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -34,9 +34,9 @@
   , m_location(location)
   , m_isDefaultIdentityLoaded(false)
   , m_identities(impl)
-  , m_impl(impl)
+  , m_impl(std::move(impl))
 {
-  BOOST_ASSERT(impl != nullptr);
+  BOOST_ASSERT(m_impl != nullptr);
 }
 
 Pib::~Pib() = default;
diff --git a/src/security/pib/pib.hpp b/src/security/pib/pib.hpp
index 947e5a5..27d83da 100644
--- a/src/security/pib/pib.hpp
+++ b/src/security/pib/pib.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -67,7 +67,7 @@
   ~Pib();
 
   /**
-   * @brief return the scheme of the PibLocator
+   * @brief return the scheme of the PIB Locator
    */
   std::string
   getScheme() const
@@ -110,19 +110,21 @@
   Identity
   getIdentity(const Name& identityName) const;
 
-  /// @brief Get all the identities
+  /**
+   * @brief Get all the identities
+   */
   const IdentityContainer&
   getIdentities() const;
 
   /**
    * @brief Get the default identity.
-   * @throw Pib::Error if no default identity.
+   * @throw Pib::Error if no default identity exists.
    */
   const Identity&
   getDefaultIdentity() const;
 
 NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE: // write operations should be private
-  /*
+  /**
    * @brief Create a Pib instance
    *
    * @param scheme The scheme for the Pib
@@ -131,17 +133,8 @@
    */
   Pib(const std::string& scheme, const std::string& location, shared_ptr<PibImpl> impl);
 
-  /*
-   * @brief Create an identity with name @p identityName and return a reference to it.
-   *
-   * If there already exists an identity for the name @p identityName, then it is returned.
-   * If no default identity is set, the newly created identity will be set as the default.
-   *
-   * @param identityName The name for the identity to be added
-   */
-
   /**
-   * @brief Add an @p identity.
+   * @brief Add an identity.
    *
    * If no default identity is set before, the new identity will be set as the default identity
    *
@@ -150,8 +143,8 @@
   Identity
   addIdentity(const Name& identity);
 
-  /*
-   * @brief Remove an @p identity.
+  /**
+   * @brief Remove an identity.
    *
    * If the default identity is being removed, no default identity will be selected.
    */
@@ -159,7 +152,7 @@
   removeIdentity(const Name& identity);
 
   /**
-   * @brief Set an @p identity as the default identity.
+   * @brief Set an identity as the default identity.
    *
    * Create the identity if it does not exist.
    *
diff --git a/src/security/tpm/back-end-file.cpp b/src/security/tpm/back-end-file.cpp
index a560fad..12c1e37 100644
--- a/src/security/tpm/back-end-file.cpp
+++ b/src/security/tpm/back-end-file.cpp
@@ -125,11 +125,11 @@
   setKeyName(*keyHandle, identityName, params);
 
   try {
-    saveKey(keyHandle->getKeyName(), key);
+    saveKey(keyHandle->getKeyName(), *key);
     return keyHandle;
   }
   catch (const std::runtime_error& e) {
-    BOOST_THROW_EXCEPTION(Error("Cannot write key to disk: "s + e.what()));
+    BOOST_THROW_EXCEPTION(Error("Cannot write key to file: "s + e.what()));
   }
 }
 
@@ -137,27 +137,28 @@
 BackEndFile::doDeleteKey(const Name& keyName)
 {
   boost::filesystem::path keyPath(m_impl->toFileName(keyName));
+  if (!boost::filesystem::exists(keyPath))
+    return;
 
-  if (boost::filesystem::exists(keyPath)) {
-    try {
-      boost::filesystem::remove(keyPath);
-    }
-    catch (const boost::filesystem::filesystem_error&) {
-      BOOST_THROW_EXCEPTION(Error("Cannot delete key"));
-    }
+  try {
+    boost::filesystem::remove(keyPath);
+  }
+  catch (const boost::filesystem::filesystem_error& e) {
+    BOOST_THROW_EXCEPTION(Error("Cannot remove key file: "s + e.what()));
   }
 }
 
 ConstBufferPtr
 BackEndFile::doExportKey(const Name& keyName, const char* pw, size_t pwLen)
 {
-  shared_ptr<PrivateKey> key;
+  unique_ptr<PrivateKey> key;
   try {
     key = loadKey(keyName);
   }
-  catch (const PrivateKey::Error&) {
-    BOOST_THROW_EXCEPTION(Error("Cannot export private key"));
+  catch (const PrivateKey::Error& e) {
+    BOOST_THROW_EXCEPTION(Error("Cannot export private key: "s + e.what()));
   }
+
   OBufferStream os;
   key->savePkcs8(os, pw, pwLen);
   return os.buf();
@@ -167,33 +168,33 @@
 BackEndFile::doImportKey(const Name& keyName, const uint8_t* buf, size_t size, const char* pw, size_t pwLen)
 {
   try {
-    auto key = make_shared<PrivateKey>();
-    key->loadPkcs8(buf, size, pw, pwLen);
+    PrivateKey key;
+    key.loadPkcs8(buf, size, pw, pwLen);
     saveKey(keyName, key);
   }
-  catch (const PrivateKey::Error&) {
-    BOOST_THROW_EXCEPTION(Error("Cannot import private key"));
+  catch (const PrivateKey::Error& e) {
+    BOOST_THROW_EXCEPTION(Error("Cannot import private key: "s + e.what()));
   }
 }
 
-shared_ptr<PrivateKey>
+unique_ptr<PrivateKey>
 BackEndFile::loadKey(const Name& keyName) const
 {
-  auto key = make_shared<PrivateKey>();
-  std::fstream is(m_impl->toFileName(keyName).string(), std::ios_base::in);
+  std::ifstream is(m_impl->toFileName(keyName).string());
+  auto key = make_unique<PrivateKey>();
   key->loadPkcs1Base64(is);
   return key;
 }
 
 void
-BackEndFile::saveKey(const Name& keyName, shared_ptr<PrivateKey> key)
+BackEndFile::saveKey(const Name& keyName, const PrivateKey& key)
 {
   std::string fileName = m_impl->toFileName(keyName).string();
-  std::fstream os(fileName, std::ios_base::out);
-  key->savePkcs1Base64(os);
+  std::ofstream os(fileName);
+  key.savePkcs1Base64(os);
 
   // set file permission
-  ::chmod(fileName.c_str(), 0000400);
+  ::chmod(fileName.data(), 0000400);
 }
 
 } // namespace tpm
diff --git a/src/security/tpm/back-end-file.hpp b/src/security/tpm/back-end-file.hpp
index 5609cba..bd2838d 100644
--- a/src/security/tpm/back-end-file.hpp
+++ b/src/security/tpm/back-end-file.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -26,6 +26,7 @@
 
 namespace ndn {
 namespace security {
+
 namespace transform {
 class PrivateKey;
 } // namespace transform
@@ -123,14 +124,14 @@
   /**
    * @brief Load a private key with name @p keyName from the key file directory
    */
-  shared_ptr<transform::PrivateKey>
+  unique_ptr<transform::PrivateKey>
   loadKey(const Name& keyName) const;
 
   /**
    * @brief Save a private key with name @p keyName into the key file directory
    */
   void
-  saveKey(const Name& keyName, shared_ptr<transform::PrivateKey> key);
+  saveKey(const Name& keyName, const transform::PrivateKey& key);
 
 private:
   class Impl;
diff --git a/src/security/tpm/tpm.hpp b/src/security/tpm/tpm.hpp
index 4ce57f2..367a6b9 100644
--- a/src/security/tpm/tpm.hpp
+++ b/src/security/tpm/tpm.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -144,7 +144,7 @@
   unlockTpm(const char* password, size_t passwordLength) const;
 
 NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
-  /*
+  /**
    * @brief Create a new TPM instance with the specified @p location.
    *
    * @param scheme The scheme for the TPM
diff --git a/src/security/v2/trust-anchor-container.cpp b/src/security/v2/trust-anchor-container.cpp
index 80ef5cc..9137d6f 100644
--- a/src/security/v2/trust-anchor-container.cpp
+++ b/src/security/v2/trust-anchor-container.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -85,6 +85,7 @@
   auto cert = m_anchors.lower_bound(keyName);
   if (cert == m_anchors.end() || !keyName.isPrefixOf(cert->getName()))
     return nullptr;
+
   return &*cert;
 }
 
@@ -123,7 +124,7 @@
 TrustAnchorContainer::refresh()
 {
   for (auto it = m_groups.begin(); it != m_groups.end(); ++it) {
-    m_groups.modify(it, [] (shared_ptr<TrustAnchorGroup>& group) { group->refresh(); });
+    m_groups.modify(it, [] (const auto& group) { group->refresh(); });
   }
 }
 
