Added table creation structure; revised model.
Changes to SQL table creation code; changes to the model