Added retrieveGroups, generateGroups, can push and retrieve users from db.