Added improvements to text parser.