Added better group support and support for deleted activities