Optimize import and recheck style

Restore PEP8 style compliance and include only a single method from re
instead of everything
Restore test files to original state