This should probably be renamed to indicate the particular optimization that it applies. Then there could be another function that combines all the optimizations together, or just have a single `to_table` function that takes an  optional optimization flag.