Readibility fixes

These patches make the pynag codebase more readable and more in-line with out style guide and pep8

I don't expect any changes in code behaviour here.