Improved code quality according to suggestions from Sonar 2.0