Fix types and constructor for groups