Ran pylint, minor refactors