Simplified thread removal and cleaned up potential source of duplicate removal