Fixes for pylint issues

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