cnames makes more sense as a .c than a .h since it cannot be included
more than once. Cleanup keys.h usage while we are at it.