move some tables to tables.c