Some refactoring of config class