Delete contact group code further refined