TextWrapper: factor out BasicWrapper