Working out how to render data to DRY up code