Small pylint fixes and refactoring
Merge pull request #8 from mdevaev/refactoring

Refactoring