Add cmd_args calculation

Added cmd_args calculation so that strings.Trim(line[1:]," ") won't be used
repeatedly.