Got rid of 'checkAndDeleteGroup' function