changes to Main and TableGen