Various tiny fixes exposed by PMD.