crc/test: a few more cleanups and code unifications