Similar code is in Configuration.java. Are we going to deprecate it? If not, we might want to refactor the code to reuse the same code.