Fixing typos and issues pointed by pylint.