remove some dead code

This code isn't needed after referencing counting was implemented
for units.