Another big sonar refactoring.