Changed getCmdInfo to read info into CmdInfo struct. Also tested it.