DRY up rendering of data tables