Made the clear operation much more efticient.
Test for asynchronicity in remove and clear