Refactoring of text