diff --git a/tests/daemon/table/name-tree.t.cpp b/tests/daemon/table/name-tree.t.cpp
index 2649834..6c410aa 100644
--- a/tests/daemon/table/name-tree.t.cpp
+++ b/tests/daemon/table/name-tree.t.cpp
@@ -56,6 +56,7 @@
 }
 
 BOOST_AUTO_TEST_SUITE(Hashtable)
+
 using name_tree::Hashtable;
 
 BOOST_AUTO_TEST_CASE(Modifiers)
@@ -256,7 +257,7 @@
   npe.insertPitEntry(pit2);
   BOOST_CHECK_EQUAL(npe.getPitEntries().size(), 2);
 
-  pit::Entry* pit1ptr = pit1.get();
+  auto* pit1ptr = pit1.get();
   weak_ptr<pit::Entry> pit1weak(pit1);
   pit1.reset();
   BOOST_CHECK_EQUAL(pit1weak.use_count(), 1); // npe is the sole owner of pit1
@@ -338,7 +339,6 @@
   Entry* npe0 = nt.findExactMatch(name0);
   BOOST_CHECK(npe0 == nullptr);
 
-
   // findLongestPrefixMatch
 
   Entry* temp = nullptr;
@@ -493,12 +493,10 @@
   }
 
 protected:
-  static const size_t N_BUCKETS = 16;
+  static constexpr size_t N_BUCKETS = 16;
   NameTree nt;
 };
 
-const size_t EnumerationFixture::N_BUCKETS;
-
 BOOST_FIXTURE_TEST_CASE(IteratorFullEnumerate, EnumerationFixture)
 {
   nt.lookup("/a/b/c");
@@ -556,7 +554,7 @@
 
   // Accept "root" nameA only
   auto&& enumerable = nt.partialEnumerate("/a", [] (const Entry& entry) {
-    return std::make_pair(entry.getName() == "/a", true);
+    return std::pair(entry.getName() == "/a", true);
   });
 
   EnumerationVerifier(enumerable)
@@ -570,7 +568,7 @@
 
   // Accept anything except "root" nameA
   auto&& enumerable = nt.partialEnumerate("/a", [] (const Entry& entry) {
-    return std::make_pair(entry.getName() != "/a", true);
+    return std::pair(entry.getName() != "/a", true);
   });
 
   EnumerationVerifier(enumerable)
@@ -586,7 +584,7 @@
   // No NameA
   // No SubTree from NameAB
   auto&& enumerable = nt.partialEnumerate("/a", [] (const Entry& entry) {
-      return std::make_pair(entry.getName() != "/a", entry.getName() != "/a/b");
+      return std::pair(entry.getName() != "/a", entry.getName() != "/a/b");
     });
 
   EnumerationVerifier(enumerable)
@@ -604,7 +602,7 @@
   // No NameA
   // No SubTree from NameAC
   auto&& enumerable = nt.partialEnumerate("/a", [] (const Entry& entry) {
-      return std::make_pair(entry.getName() != "/a", entry.getName() != "/a/c");
+      return std::pair(entry.getName() != "/a", entry.getName() != "/a/c");
     });
 
   EnumerationVerifier(enumerable)
@@ -621,7 +619,7 @@
 
   // No Subtree from NameA
   auto&& enumerable = nt.partialEnumerate("/a", [] (const Entry& entry) {
-      return std::make_pair(true, entry.getName() != "/a");
+      return std::pair(true, entry.getName() != "/a");
     });
 
   EnumerationVerifier(enumerable)
@@ -647,23 +645,20 @@
   nt.lookup("/E");
   nt.lookup("/F");
 
-  auto&& enumerable = nt.partialEnumerate("/A",
-    [] (const Entry& entry) {
-      bool visitEntry = false;
-      bool visitChildren = false;
+  auto&& enumerable = nt.partialEnumerate("/A", [] (const Entry& entry) {
+    bool visitEntry = false;
+    bool visitChildren = false;
 
-      Name name = entry.getName();
+    const Name& name = entry.getName();
+    if (name == "/" || name == "/A/B" || name == "/A/B/C" || name == "/A/D") {
+      visitEntry = true;
+    }
+    if (name == "/" || name == "/A" || name == "/F") {
+      visitChildren = true;
+    }
 
-      if (name == "/" || name == "/A/B" || name == "/A/B/C" || name == "/A/D") {
-        visitEntry = true;
-      }
-
-      if (name == "/" || name == "/A" || name == "/F") {
-        visitChildren = true;
-      }
-
-      return std::make_pair(visitEntry, visitChildren);
-    });
+    return std::pair(visitEntry, visitChildren);
+  });
 
   EnumerationVerifier(enumerable)
     .expect("/A/B")
