Adding generic table creation code