[#2212] [#2222] CID25830:

Use icmds array instead of argv array to call icmds, refactor for
simplicity