[refactoring] refactoring code based on suggestion from SONAR
Merge pull request #67 from davidmoebius/sonar

[refactoring] refactoring code based on suggestion from SONAR