add dynamic column widths

This adds the detection of the proper column widths per column, at the
expense of performance. It needs to be refactored soon to be much
more performant.