Improved config loading and overriding with DB settings