Pmd code inspection and problems fixed which pmd pointed out
Merge pull request #35 from AADOJ/Freysi21

Pmd code inspection and problems fixed which pmd pointed out