Modified to use ConfigDef and default values