Added initialization function for groups.