Delete related profiles when deleting groups
Some improvements