pylint and general cleanup