[mod] add missing endlines
[mod] consistent naming of variables
[mod] consistent pep8 usage