Fixes for pylint issues v2

Updated version of pull request #189. Integrated comments from Dan.