Hefty rewrite of create_tables.sql