small changes in config class to remove code duplication