Added ref_equals, and made improvements to docgen.