Added functionality to have the groups load dynamically.