Re-checked code with pylint, improved it a bit