Factors table generators out into named functions for reusability.