Minor polish

 * Apply 'const' to name tables

 * Reduce scope of private functions

 * typo: beings -> begins

 * Don't check for ignored signal in signal handler
Gracefully terminate on output errors