diff --git a/src/security/pib/certificate-container.cpp b/src/security/pib/certificate-container.cpp
index e68b0cc..a671cb0 100644
--- a/src/security/pib/certificate-container.cpp
+++ b/src/security/pib/certificate-container.cpp
@@ -71,7 +71,7 @@
   bool isOtherEnd = other.m_container == nullptr || other.m_it == other.m_container->m_certNames.end();
   return ((isThisEnd || isOtherEnd) ?
           (isThisEnd == isOtherEnd) :
-          m_container->m_impl == other.m_container->m_impl && m_it == other.m_it);
+          m_container->m_pib == other.m_container->m_pib && m_it == other.m_it);
 }
 
 bool
@@ -80,12 +80,12 @@
   return !(*this == other);
 }
 
-CertificateContainer::CertificateContainer(const Name& keyName, shared_ptr<PibImpl> impl)
+CertificateContainer::CertificateContainer(const Name& keyName, shared_ptr<PibImpl> pibImpl)
   : m_keyName(keyName)
-  , m_impl(impl)
+  , m_pib(std::move(pibImpl))
 {
-  BOOST_ASSERT(impl != nullptr);
-  m_certNames = impl->getCertificatesOfKey(keyName);
+  BOOST_ASSERT(m_pib != nullptr);
+  m_certNames = m_pib->getCertificatesOfKey(keyName);
 }
 
 CertificateContainer::const_iterator
@@ -122,7 +122,7 @@
   const Name& certName = certificate.getName();
   m_certNames.insert(certName);
   m_certs[certName] = certificate;
-  m_impl->addCertificate(certificate);
+  m_pib->addCertificate(certificate);
 }
 
 void
@@ -136,7 +136,7 @@
 
   m_certNames.erase(certName);
   m_certs.erase(certName);
-  m_impl->removeCertificate(certName);
+  m_pib->removeCertificate(certName);
 }
 
 v2::Certificate
@@ -153,14 +153,14 @@
                                                 "is invalid or does not match key name"));
   }
 
-  m_certs[certName] = m_impl->getCertificate(certName);
+  m_certs[certName] = m_pib->getCertificate(certName);
   return m_certs[certName];
 }
 
 bool
 CertificateContainer::isConsistent() const
 {
-  return m_certNames == m_impl->getCertificatesOfKey(m_keyName);
+  return m_certNames == m_pib->getCertificatesOfKey(m_keyName);
 }
 
 } // namespace pib
