fix a bunch of PMD warnings