improve and perfect config class

improve and perfect config class