Refactor config.rg