Improved structure and pylint compliance.