Improve how tables with headers are handled

Now column header names are supported if present. Related code was
made more consistent.