Replace use of ids with different unique identifiers where possible