Refactored GenerateLines() and OptimalSize() line break calculations to facilitate debugging.