Names refactoring in logic