Fixed pylint. Cleaned up code.