Re-ordered the table creation