Added a method flushCommand() to be used to flush the Subcommands in the List<Subcommand> at the end of each add.