Cleaning up object generation