changing class to struct in ReferenceCounts related types