Refactor AppConfig.