Remove redundant mappings, clean up other mappings.