Clean up table serialization code