[PyLint] Addded docstrings, slight refactoring