Implement final version of PerfectRef