refactor renaming scope elements.