Gee, the splits work much better when the substr() is removed. Long lines can be more easily controlled after the split/regex I think.