[Sonar Fixes]

removed SonarQube violations from code
added Design by Contract on some more components