Add database-insertion functionality.
Clean up database schema.