Changed constructor for TextParser