code quality improved according to the lastedt sonar report.

code quality improved according to the lastedt sonar report.