Slowly moving all this shit to regexes.