Clean up duplicate identifiers

This also reorders the identifiers in alphabetic order.