Fixing parts of TextOptimizer

Defining number of rows, columns and rewriting some typos