Clean up comments, shuffle some tests around.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7496124..6009c3a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -444,10 +444,6 @@
 endif(INET6)
 
 ######################################
-# External dependencies
-######################################
-
-######################################
 # Input files
 ######################################
 
@@ -837,6 +833,10 @@
     check_include_file(linux/net_tstamp.h HAVE_LINUX_NET_TSTAMP_H)
 endif()
 
+#
+# Check for additional native sniffing capabilities.
+#
+
 # Check for USB sniffing support on Linux.
 # On FreeBSD, it uses BPF, so we don't need to do anything special here.
 if(NOT DISABLE_USB)
@@ -999,6 +999,10 @@
     endif(LIBIBVERBS_HAS_IBV_GET_DEVICE_LIST)
 endif(NOT DISABLE_RDMA)
 
+#
+# Check for sniffing capabilities using third-party APIs.
+#
+
 # Check for Endace DAG card support.
 if(NOT DISABLE_DAG)
     #
@@ -1123,6 +1127,10 @@
     endif()
 endif() 
 
+#
+# Remote capture support.
+#
+
 if(ENABLE_REMOTE)
     set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C}
         pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c)
diff --git a/configure b/configure
index be3ad01..a326a77 100755
--- a/configure
+++ b/configure
@@ -744,8 +744,6 @@
 with_libnl
 enable_packet_ring
 enable_ipv6
-enable_optimizer_dbg
-enable_yydebug
 with_dag
 with_dag_includes
 with_dag_libraries
@@ -755,6 +753,8 @@
 with_snf_libraries
 with_turbocap
 enable_remote
+enable_optimizer_dbg
+enable_yydebug
 enable_universal
 enable_shared
 enable_usb
@@ -1393,10 +1393,10 @@
   --enable-packet-ring    enable Linux packet ring support [default=yes]
   --enable-ipv6           build IPv6-capable version [default=yes, if
                           getaddrinfo available]
-  --enable-optimizer-dbg  build optimizer debugging code
-  --enable-yydebug        build parser debugging code
   --enable-remote         enable remote packet capture [default=no]
   --disable-remote        disable remote packet capture
+  --enable-optimizer-dbg  build optimizer debugging code
+  --enable-yydebug        build parser debugging code
   --disable-universal     don't build universal on macOS
   --enable-shared         build shared libraries [default=yes, if support
                           available]
@@ -6237,36 +6237,6 @@
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build optimizer debugging code" >&5
-$as_echo_n "checking whether to build optimizer debugging code... " >&6; }
-# Check whether --enable-optimizer-dbg was given.
-if test "${enable_optimizer_dbg+set}" = set; then :
-  enableval=$enable_optimizer_dbg;
-fi
-
-if test "$enable_optimizer_dbg" = "yes"; then
-
-$as_echo "#define BDEBUG 1" >>confdefs.h
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_optimizer_dbg-no}" >&5
-$as_echo "${enable_optimizer_dbg-no}" >&6; }
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build parser debugging code" >&5
-$as_echo_n "checking whether to build parser debugging code... " >&6; }
-# Check whether --enable-yydebug was given.
-if test "${enable_yydebug+set}" = set; then :
-  enableval=$enable_yydebug;
-fi
-
-if test "$enable_yydebug" = "yes"; then
-
-$as_echo "#define YYDEBUG 1" >>confdefs.h
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_yydebug-no}" >&5
-$as_echo "${enable_yydebug-no}" >&6; }
-
 # Check for Endace DAG card support.
 
 # Check whether --with-dag was given.
@@ -7348,6 +7318,36 @@
 	;;
 esac
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build optimizer debugging code" >&5
+$as_echo_n "checking whether to build optimizer debugging code... " >&6; }
+# Check whether --enable-optimizer-dbg was given.
+if test "${enable_optimizer_dbg+set}" = set; then :
+  enableval=$enable_optimizer_dbg;
+fi
+
+if test "$enable_optimizer_dbg" = "yes"; then
+
+$as_echo "#define BDEBUG 1" >>confdefs.h
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_optimizer_dbg-no}" >&5
+$as_echo "${enable_optimizer_dbg-no}" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build parser debugging code" >&5
+$as_echo_n "checking whether to build parser debugging code... " >&6; }
+# Check whether --enable-yydebug was given.
+if test "${enable_yydebug+set}" = set; then :
+  enableval=$enable_yydebug;
+fi
+
+if test "$enable_yydebug" = "yes"; then
+
+$as_echo "#define YYDEBUG 1" >>confdefs.h
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_yydebug-no}" >&5
+$as_echo "${enable_yydebug-no}" >&6; }
+
 #
 # Look for {f}lex.
 #
@@ -7606,6 +7606,8 @@
 fi
 
 #
+# Do various checks for various OSes and versions of those OSes.
+#
 # Assume, by default, no support for shared libraries and V7/BSD convention
 # for man pages (file formats in section 5, miscellaneous info in section 7).
 # Individual cases can override this.
diff --git a/configure.ac b/configure.ac
index 1861347..00bcac2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -753,22 +753,6 @@
 	    ])
 fi
 
-AC_MSG_CHECKING(whether to build optimizer debugging code)
-AC_ARG_ENABLE(optimizer-dbg,
-AC_HELP_STRING([--enable-optimizer-dbg],[build optimizer debugging code]))
-if test "$enable_optimizer_dbg" = "yes"; then
-	AC_DEFINE(BDEBUG,1,[Enable optimizer debugging])
-fi
-AC_MSG_RESULT(${enable_optimizer_dbg-no})
-
-AC_MSG_CHECKING(whether to build parser debugging code)
-AC_ARG_ENABLE(yydebug,
-AC_HELP_STRING([--enable-yydebug],[build parser debugging code]))
-if test "$enable_yydebug" = "yes"; then
-	AC_DEFINE(YYDEBUG,1,[Enable parser debugging])
-fi
-AC_MSG_RESULT(${enable_yydebug-no})
-
 # Check for Endace DAG card support.
 AC_ARG_WITH([dag],
 AC_HELP_STRING([--with-dag@<:@=DIR@:>@],[include Endace DAG support (located in directory DIR, if supplied).  @<:@default=yes, if present@:>@]),
@@ -1208,6 +1192,22 @@
 	;;
 esac
 
+AC_MSG_CHECKING(whether to build optimizer debugging code)
+AC_ARG_ENABLE(optimizer-dbg,
+AC_HELP_STRING([--enable-optimizer-dbg],[build optimizer debugging code]))
+if test "$enable_optimizer_dbg" = "yes"; then
+	AC_DEFINE(BDEBUG,1,[Enable optimizer debugging])
+fi
+AC_MSG_RESULT(${enable_optimizer_dbg-no})
+
+AC_MSG_CHECKING(whether to build parser debugging code)
+AC_ARG_ENABLE(yydebug,
+AC_HELP_STRING([--enable-yydebug],[build parser debugging code]))
+if test "$enable_yydebug" = "yes"; then
+	AC_DEFINE(YYDEBUG,1,[Enable parser debugging])
+fi
+AC_MSG_RESULT(${enable_yydebug-no})
+
 #
 # Look for {f}lex.
 #
@@ -1252,6 +1252,8 @@
 fi
 
 #
+# Do various checks for various OSes and versions of those OSes.
+#
 # Assume, by default, no support for shared libraries and V7/BSD convention
 # for man pages (file formats in section 5, miscellaneous info in section 7).
 # Individual cases can override this.