Added functions to do the table creation and existence checking