Remove unused import.
Compile regular expressions.
PEP8 whitespace additions.