Fix pylint errors

And failing unit test. Fixes #79