Move db config settings to /config file, improve parse_app_refs matcher