Made the command-line processing more scalable.