Add database schema
Minor refinements