Variable refactoring