Tableconvert more generic rework

Make TableConvert a lot more generic.