Backup of previous state before refactoring TextRange and TextDocument classes.