SONAR-3526 Some refactoring