diff --git a/tools/dicttool/src/android/inputmethod/latin/dicttool/Compress.java b/tools/dicttool/src/android/inputmethod/latin/dicttool/Compress.java
index 307f5964c8ef9d0e532ad36b54699096c8cb678d..a76ec50e046d9be5d7598481f91282ef3034e43d 100644
--- a/tools/dicttool/src/android/inputmethod/latin/dicttool/Compress.java
+++ b/tools/dicttool/src/android/inputmethod/latin/dicttool/Compress.java
@@ -55,11 +55,10 @@ public class Compress {
             return "compress <filename>: Compresses a file using gzip compression";
         }
 
-        public int getArity() {
-            return 1;
-        }
-
         public void run() throws IOException {
+            if (mArgs.length < 1) {
+                throw new RuntimeException("Not enough arguments for command " + COMMAND);
+            }
             final String inFilename = mArgs[0];
             final String outFilename = inFilename + SUFFIX;
             final FileInputStream input = new FileInputStream(new File(inFilename));
@@ -79,11 +78,10 @@ public class Compress {
             return "uncompress <filename>: Uncompresses a file compressed with gzip compression";
         }
 
-        public int getArity() {
-            return 1;
-        }
-
         public void run() throws IOException {
+            if (mArgs.length < 1) {
+                throw new RuntimeException("Not enough arguments for command " + COMMAND);
+            }
             final String inFilename = mArgs[0];
             final String outFilename = inFilename + SUFFIX;
             final FileInputStream input = new FileInputStream(new File(inFilename));
diff --git a/tools/dicttool/src/android/inputmethod/latin/dicttool/Dicttool.java b/tools/dicttool/src/android/inputmethod/latin/dicttool/Dicttool.java
index b78be797563954b25f2249d93aae9ca837047b0c..97a89f8cb4e0cd7b2087be842cbd16a067f4795f 100644
--- a/tools/dicttool/src/android/inputmethod/latin/dicttool/Dicttool.java
+++ b/tools/dicttool/src/android/inputmethod/latin/dicttool/Dicttool.java
@@ -27,7 +27,6 @@ public class Dicttool {
         public void setArgs(String[] args) throws IllegalArgumentException {
             mArgs = args;
         }
-        abstract public int getArity();
         abstract public String getHelp();
         abstract public void run() throws Exception;
     }
@@ -62,47 +61,29 @@ public class Dicttool {
         return sCommands.containsKey(commandName);
     }
 
-    private String mPreviousCommand = null; // local to the getNextCommand function
-    private Command getNextCommand(final ArrayList<String> arguments) {
+    private Command getCommand(final ArrayList<String> arguments) {
         final String firstArgument = arguments.get(0);
         final String commandName;
         if (isCommand(firstArgument)) {
             commandName = firstArgument;
             arguments.remove(0);
-        } else if (isCommand(mPreviousCommand)) {
-            commandName = mPreviousCommand;
         } else {
             throw new RuntimeException("Unknown command : " + firstArgument);
         }
         final Command command = getCommandInstance(commandName);
-        final int arity = command.getArity();
-        if (arguments.size() < arity) {
-            throw new RuntimeException("Not enough arguments to command " + commandName);
-        }
-        final String[] argsArray = new String[arity];
-        arguments.subList(0, arity).toArray(argsArray);
-        for (int i = 0; i < arity; ++i) {
-            // For some reason, ArrayList#removeRange is protected
-            arguments.remove(0);
-        }
+        final String[] argsArray = arguments.toArray(new String[arguments.size()]);
         command.setArgs(argsArray);
-        mPreviousCommand = commandName;
         return command;
     }
 
     private void execute(final ArrayList<String> arguments) {
-        ArrayList<Command> commandsToExecute = new ArrayList<Command>();
-        while (!arguments.isEmpty()) {
-            commandsToExecute.add(getNextCommand(arguments));
-        }
-        for (final Command command : commandsToExecute) {
-            try {
-                command.run();
-            } catch (Exception e) {
-                System.out.println("Exception while processing command "
-                        + command.getClass().getSimpleName() + " : " + e);
-                return;
-            }
+        final Command command = getCommand(arguments);
+        try {
+            command.run();
+        } catch (Exception e) {
+            System.out.println("Exception while processing command "
+                    + command.getClass().getSimpleName() + " : " + e);
+            return;
         }
     }
 
diff --git a/tools/dicttool/src/android/inputmethod/latin/dicttool/Info.java b/tools/dicttool/src/android/inputmethod/latin/dicttool/Info.java
index cb032dd3b32673befbcc43588390279aacefe6a7..e592617066314cbbbee18c19999a2522bff724ca 100644
--- a/tools/dicttool/src/android/inputmethod/latin/dicttool/Info.java
+++ b/tools/dicttool/src/android/inputmethod/latin/dicttool/Info.java
@@ -17,6 +17,8 @@
 package com.android.inputmethod.latin.dicttool;
 
 public class Info extends Dicttool.Command {
+    public static final String COMMAND = "info";
+
     public Info() {
     }
 
@@ -24,12 +26,11 @@ public class Info extends Dicttool.Command {
         return "info <filename>: prints various information about a dictionary file";
     }
 
-    public int getArity() {
-        return 1;
-    }
-
     public void run() {
         // TODO: implement this
+        if (mArgs.length < 1) {
+            throw new RuntimeException("Not enough arguments for command " + COMMAND);
+        }
         System.out.println("Not implemented yet");
     }
 }