Refactors table-create and table-delete