Fixed icons set in rename dialog not saving.
Moved rename code to more sensible location.