Replaced ifs by a table of cr/arg information