Added CreateTables function