Recurse less in free and copy functions