Changed the way the db config is handled