SONAR-4898 some refactoring