More robust regex.
Refactoring.