[refactor] refactoring of the code based on sonar suggestions
Merge pull request #162 from davidmoebius/sonar

[refactor] refactoring of the code based on sonar suggestions