Some work on reference counting