Tidying up and Pylint improvements.