ensure that all names are correctly mangled
fix type, . and .s for functions