Minor cleanups and fixes.
Extract common table markup