diff --git a/lib/command.c b/lib/command.c
index bb94c28..662f8a3 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -441,7 +441,7 @@
   char *dummy;
 
   if (!state->in_multiple)
-    format_parser_error(state, "Unepexted ')'");
+    format_parser_error(state, "Unexpected ')'");
 
   if (vector_active(state->curvect) == 0)
     format_parser_error(state, "Empty multiple section");
@@ -785,54 +785,6 @@
   return cnode->cmd_vector;
 }
 
-#if 0
-/* Filter command vector by symbol.  This function is not actually used;
- * should it be deleted? */
-static int
-cmd_filter_by_symbol (char *command, char *symbol)
-{
-  int i, lim;
-
-  if (strcmp (symbol, "IPV4_ADDRESS") == 0)
-    {
-      i = 0;
-      lim = strlen (command);
-      while (i < lim)
-	{
-	  if (! (isdigit ((int) command[i]) || command[i] == '.' || command[i] == '/'))
-	    return 1;
-	  i++;
-	}
-      return 0;
-    }
-  if (strcmp (symbol, "STRING") == 0)
-    {
-      i = 0;
-      lim = strlen (command);
-      while (i < lim)
-	{
-	  if (! (isalpha ((int) command[i]) || command[i] == '_' || command[i] == '-'))
-	    return 1;
-	  i++;
-	}
-      return 0;
-    }
-  if (strcmp (symbol, "IFNAME") == 0)
-    {
-      i = 0;
-      lim = strlen (command);
-      while (i < lim)
-	{
-	  if (! isalnum ((int) command[i]))
-	    return 1;
-	  i++;
-	}
-      return 0;
-    }
-  return 0;
-}
-#endif
-
 /* Completion match types. */
 enum match_type 
 {
@@ -1145,14 +1097,6 @@
   if (mask < 0 || mask > 128)
     return no_match;
   
-/* I don't know why mask < 13 makes command match partly.
-   Forgive me to make this comments. I Want to set static default route
-   because of lack of function to originate default in ospf6d; sorry
-       yasu
-  if (mask < 13)
-    return partly_match;
-*/
-
   return exact_match;
 }
 
@@ -2458,15 +2402,6 @@
 	  *status = CMD_ERR_AMBIGUOUS;
 	  return NULL;
 	}
-      /*
-	   else if (ret == 2)
-	   {
-	   vector_free (cmd_vector);
-	   cmd_matches_free(&matches);
-	   *status = CMD_ERR_NO_MATCH;
-	   return NULL;
-	   }
-	 */
     }
   
   /* Prepare match vector. */
@@ -2538,8 +2473,6 @@
 	      memcpy (lcdstr, matchvec->index[0], lcd);
 	      lcdstr[lcd] = '\0';
 
-	      /* match_str = (char **) &lcdstr; */
-
 	      /* Free matchvec. */
 	      for (i = 0; i < vector_active (matchvec); i++)
                 {
