refactored to remove config require class and put functionality into a new ConfigService