Refined remove(), added clear()