Fixed many PMD issues