Removed use of replaceWholeText and wholeText