Changed database connection to external file