Simplify the interface to check_fn by pulling some of the madness out to...

Simplify the interface to check_fn by pulling some of the madness out to its callers.

rs=refactor