This rearranges functions based on Identities.