Remove redundant code in Text