Improvements based on PMD & FindBugs rules.