Refactored the text parsing to be more effective. No major changes to
the regression.