Add method to get registered groups.