Changes after a PMD review.
Fixing FindBugs issues.