Add utility module for tests
Improve PEP 8 compliance