Fixup tables and create script