Refactor associations on Certificate.