Groups and items refactoring