Updated groups management to finalise adding/editing.