Refactor crltest.c to separate the test cases into individual functions.