Finished this for now, will need more updates for more tables