Small refactoring
Refactoring with pychecker