Significant performance improvement by removing string concatenation

For spec.txt this gives ~25% improvement.