Several fixes regarding renaming

yes, there is a mess in the code. nothing new.