Complete CF checker

This is a rebase and extraction of #9 to isolate the CF checker from other commits muddled in there.