Remove duplications of custom types