Move N_KEYS check to fcheck.c.
Other tiny cleanups.