Added support for adding items with groups.