Minor bugfixes. Implemented generateGroups automatically functionality.