SONAR-5209 Big refactoring