diff --git a/tools/peek/ndnpeek/main.cpp b/tools/peek/ndnpeek/main.cpp
index 774d759..f04cec4 100644
--- a/tools/peek/ndnpeek/main.cpp
+++ b/tools/peek/ndnpeek/main.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -50,14 +50,6 @@
 main(int argc, char* argv[])
 {
   PeekOptions options;
-  options.isVerbose = false;
-  options.mustBeFresh = false;
-  options.wantRightmostChild = false;
-  options.wantPayloadOnly = false;
-  options.minSuffixComponents = -1;
-  options.maxSuffixComponents = -1;
-  options.interestLifetime = time::milliseconds(-1);
-  options.timeout = time::milliseconds(-1);
 
   po::options_description genericOptDesc("Generic options");
   genericOptDesc.add_options()
@@ -73,18 +65,14 @@
 
   po::options_description interestOptDesc("Interest construction");
   interestOptDesc.add_options()
+    ("prefix,P", po::bool_switch(&options.canBePrefix),
+        "set CanBePrefix")
     ("fresh,f", po::bool_switch(&options.mustBeFresh),
         "set MustBeFresh")
-    ("rightmost,r", po::bool_switch(&options.wantRightmostChild),
-        "set ChildSelector to rightmost")
-    ("minsuffix,m", po::value<int>(&options.minSuffixComponents),
-        "set MinSuffixComponents")
-    ("maxsuffix,M", po::value<int>(&options.maxSuffixComponents),
-        "set MaxSuffixComponents")
+    ("link-file", po::value<std::string>(),
+        "set ForwardingHint from a file")
     ("lifetime,l", po::value<int>(),
         "set InterestLifetime (in milliseconds)")
-    ("link-file", po::value<std::string>(),
-        "set Link from a file")
   ;
 
   po::options_description visibleOptDesc;
@@ -92,13 +80,13 @@
 
   po::options_description hiddenOptDesc;
   hiddenOptDesc.add_options()
-    ("prefix", po::value<std::string>(), "Interest name");
+    ("name", po::value<std::string>(), "Interest name");
 
   po::options_description optDesc;
   optDesc.add(visibleOptDesc).add(hiddenOptDesc);
 
   po::positional_options_description optPos;
-  optPos.add("prefix", -1);
+  optPos.add("name", -1);
 
   po::variables_map vm;
   try {
@@ -120,8 +108,8 @@
     return 0;
   }
 
-  if (vm.count("prefix") > 0) {
-    options.prefix = vm["prefix"].as<std::string>();
+  if (vm.count("name") > 0) {
+    options.name = vm["name"].as<std::string>();
   }
   else {
     std::cerr << "ERROR: Interest name is missing" << std::endl;
@@ -129,18 +117,6 @@
     return 2;
   }
 
-  if (vm.count("minsuffix") > 0 && options.minSuffixComponents < 0) {
-    std::cerr << "ERROR: MinSuffixComponents must be a non-negative integer" << std::endl;
-    usage(std::cerr, visibleOptDesc);
-    return 2;
-  }
-
-  if (vm.count("maxsuffix") > 0 && options.maxSuffixComponents < 0) {
-    std::cerr << "ERROR: MaxSuffixComponents must be a non-negative integer" << std::endl;
-    usage(std::cerr, visibleOptDesc);
-    return 2;
-  }
-
   if (vm.count("lifetime") > 0) {
     if (vm["lifetime"].as<int>() >= 0) {
       options.interestLifetime = time::milliseconds(vm["lifetime"].as<int>());
diff --git a/tools/peek/ndnpeek/ndnpeek.cpp b/tools/peek/ndnpeek/ndnpeek.cpp
index 372a419..23833f1 100644
--- a/tools/peek/ndnpeek/ndnpeek.cpp
+++ b/tools/peek/ndnpeek/ndnpeek.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -37,8 +37,8 @@
   , m_timeout(options.timeout)
   , m_resultCode(ResultCode::TIMEOUT)
 {
-  if (m_timeout < time::milliseconds::zero()) {
-    m_timeout = m_options.interestLifetime < time::milliseconds::zero() ?
+  if (m_timeout < 0_ms) {
+    m_timeout = m_options.interestLifetime < 0_ms ?
                 DEFAULT_INTEREST_LIFETIME : m_options.interestLifetime;
   }
 }
@@ -68,25 +68,15 @@
 Interest
 NdnPeek::createInterest() const
 {
-  Interest interest(m_options.prefix);
-
-  if (m_options.minSuffixComponents >= 0)
-    interest.setMinSuffixComponents(m_options.minSuffixComponents);
-
-  if (m_options.maxSuffixComponents >= 0)
-    interest.setMaxSuffixComponents(m_options.maxSuffixComponents);
-
-  if (m_options.interestLifetime >= time::milliseconds::zero())
-    interest.setInterestLifetime(m_options.interestLifetime);
-
-  if (m_options.link != nullptr)
+  Interest interest(m_options.name);
+  interest.setCanBePrefix(m_options.canBePrefix);
+  interest.setMustBeFresh(m_options.mustBeFresh);
+  if (m_options.link != nullptr) {
     interest.setForwardingHint(m_options.link->getDelegationList());
-
-  if (m_options.mustBeFresh)
-    interest.setMustBeFresh(true);
-
-  if (m_options.wantRightmostChild)
-    interest.setChildSelector(1);
+  }
+  if (m_options.interestLifetime >= 0_ms) {
+    interest.setInterestLifetime(m_options.interestLifetime);
+  }
 
   if (m_options.isVerbose) {
     std::cerr << "INTEREST: " << interest << std::endl;
diff --git a/tools/peek/ndnpeek/ndnpeek.hpp b/tools/peek/ndnpeek/ndnpeek.hpp
index c8c58b9..4eac8d3 100644
--- a/tools/peek/ndnpeek/ndnpeek.hpp
+++ b/tools/peek/ndnpeek/ndnpeek.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -40,16 +40,17 @@
  */
 struct PeekOptions
 {
-  std::string prefix;
-  int minSuffixComponents;
-  int maxSuffixComponents;
-  time::milliseconds interestLifetime;
-  time::milliseconds timeout;
+  // Interest construction options
+  std::string name;
+  bool canBePrefix = false;
+  bool mustBeFresh = false;
   shared_ptr<Link> link;
-  bool isVerbose;
-  bool mustBeFresh;
-  bool wantRightmostChild;
-  bool wantPayloadOnly;
+  time::milliseconds interestLifetime = -1_ms;
+
+  // output behavior options
+  bool isVerbose = false;
+  time::milliseconds timeout = -1_ms;
+  bool wantPayloadOnly = false;
 };
 
 enum class ResultCode {
