Lots of performance optimization. Regex is back!