Refactored code style problems according to sonar.