Reintroduce pylint and clean up code.

Pylint doesn't do well with test files. So just skip them.