Adds Ref and DelegatingRef.