Added delete by IP option / fixed thread deletion issues