Move database config into its own class