Refactor config - split read_config into read_config and resolve_config