refactoring related to types; also allow field list in groups