Rename
Unify gen_table