diff --git a/src/security/pib/identity.cpp b/src/security/pib/identity.cpp
index 0f7dc26..3239ac3 100644
--- a/src/security/pib/identity.cpp
+++ b/src/security/pib/identity.cpp
@@ -83,13 +83,7 @@
 
 Identity::operator bool() const
 {
-  return !(this->operator!());
-}
-
-bool
-Identity::operator!() const
-{
-  return m_impl.expired();
+  return !m_impl.expired();
 }
 
 shared_ptr<detail::IdentityImpl>
diff --git a/src/security/pib/identity.hpp b/src/security/pib/identity.hpp
index 228ef16..7c9f714 100644
--- a/src/security/pib/identity.hpp
+++ b/src/security/pib/identity.hpp
@@ -97,18 +97,12 @@
   const Key&
   getDefaultKey() const;
 
-  /*
+  /**
    * @return True if the identity instance is valid
    */
   explicit
   operator bool() const;
 
-  /**
-   * @return True if the identity instance is invalid
-   */
-  bool
-  operator!() const;
-
 NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE: // write operations should be private
   /**
    * @brief Add a @p key of @p keyLen bytes (in PKCS#8 format) with @p keyName.
diff --git a/src/security/pib/key.cpp b/src/security/pib/key.cpp
index 7396a5a..efb7df5 100644
--- a/src/security/pib/key.cpp
+++ b/src/security/pib/key.cpp
@@ -102,13 +102,7 @@
 
 Key::operator bool() const
 {
-  return !(this->operator!());
-}
-
-bool
-Key::operator!() const
-{
-  return m_impl.expired();
+  return !m_impl.expired();
 }
 
 shared_ptr<detail::KeyImpl>
diff --git a/src/security/pib/key.hpp b/src/security/pib/key.hpp
index fbbed24..b691960 100644
--- a/src/security/pib/key.hpp
+++ b/src/security/pib/key.hpp
@@ -77,7 +77,7 @@
   explicit
   Key(weak_ptr<detail::KeyImpl> impl);
 
-  /*
+  /**
    * @brief Get key name.
    */
   const Name&
@@ -128,12 +128,6 @@
   explicit
   operator bool() const;
 
-  /**
-   * @brief Check if the Key instance is invalid.
-   */
-  bool
-  operator!() const;
-
 NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE: // write operations should be private
   /**
    * @brief Add @p certificate.
diff --git a/src/util/scheduler.cpp b/src/util/scheduler.cpp
index 8e72e78..3170f61 100644
--- a/src/util/scheduler.cpp
+++ b/src/util/scheduler.cpp
@@ -21,6 +21,7 @@
 
 #include "scheduler.hpp"
 #include "detail/monotonic-deadline-timer.hpp"
+
 #include <boost/scope_exit.hpp>
 
 namespace ndn {
@@ -50,10 +51,9 @@
   EventQueue::const_iterator queueIt;
 };
 
-bool
-EventId::operator!() const
+EventId::operator bool() const
 {
-  return m_info.expired() || m_info.lock()->isExpired;
+  return !m_info.expired() && !m_info.lock()->isExpired;
 }
 
 bool
diff --git a/src/util/scheduler.hpp b/src/util/scheduler.hpp
index 2393535..2139c76 100644
--- a/src/util/scheduler.hpp
+++ b/src/util/scheduler.hpp
@@ -23,8 +23,9 @@
 #define NDN_UTIL_SCHEDULER_HPP
 
 #include "time.hpp"
-#include <set>
+
 #include <boost/asio/io_service.hpp>
+#include <set>
 
 namespace ndn {
 namespace util {
@@ -64,17 +65,7 @@
    * \retval false This EventId is empty, or the event is expired or cancelled.
    */
   explicit
-  operator bool() const
-  {
-    return !this->operator!();
-  }
-
-  /**
-   * \retval true This EventId is empty, or the event is expired or cancelled.
-   * \retval false The event is valid.
-   */
-  bool
-  operator!() const;
+  operator bool() const;
 
   /**
    * \return whether this and other refer to the same event, or are both empty/expired/cancelled
diff --git a/tests/integrated/scheduler-benchmark.cpp b/tests/integrated/scheduler-benchmark.cpp
index 5fa57b7..5cc191e 100644
--- a/tests/integrated/scheduler-benchmark.cpp
+++ b/tests/integrated/scheduler-benchmark.cpp
@@ -28,6 +28,7 @@
 #include "boost-test.hpp"
 #include "timed-execute.hpp"
 
+#include <boost/asio/io_service.hpp>
 #include <iostream>
 
 namespace ndn {
@@ -42,17 +43,17 @@
   boost::asio::io_service io;
   Scheduler sched(io);
 
-  const int nEvents = 1000000;
+  const size_t nEvents = 1000000;
   std::vector<EventId> eventIds(nEvents);
 
   auto d1 = timedExecute([&] {
-    for (int i = 0; i < nEvents; ++i) {
+    for (size_t i = 0; i < nEvents; ++i) {
       eventIds[i] = sched.scheduleEvent(time::seconds(1), []{});
     }
   });
 
   auto d2 = timedExecute([&] {
-    for (int i = 0; i < nEvents; ++i) {
+    for (size_t i = 0; i < nEvents; ++i) {
       sched.cancelEvent(eventIds[i]);
     }
   });
@@ -66,8 +67,8 @@
   boost::asio::io_service io;
   Scheduler sched(io);
 
-  const int nEvents = 1000000;
-  int nExpired = 0;
+  const size_t nEvents = 1000000;
+  size_t nExpired = 0;
 
   // Events should expire at t1, but execution finishes at t2. The difference is the overhead.
   time::steady_clock::TimePoint t1 = time::steady_clock::now() + time::seconds(5);
@@ -79,7 +80,7 @@
     BOOST_REQUIRE_EQUAL(nExpired, nEvents);
   });
 
-  for (int i = 0; i < nEvents; ++i) {
+  for (size_t i = 0; i < nEvents; ++i) {
     sched.scheduleEvent(t1 - time::steady_clock::now(), [&] { ++nExpired; });
   }
 
