Set up database configuration
Make trace configurable
Fix production config