Added some garbage collection
Added clear()