Garbage collection

This one is going to need careful review by a few folks.