Separated CNT_* and CMD_* codes in their own files