Added clearList and class destructor
Fixed clearAll infinity loop bug