Fix pylint complaints

Based on #106.

I've fixed most pylint errors and warnings, and have selectively disabled a few of them.

``too-many-lines`` could neither be disabled selectively or fixed without a lot of refactoring, so I've disabled it globally. #127 should ensure that we don't forget about it.