Fixing issues noticed by pylint