code-cleanup and PMD-Check fixes