Fix some PHPMD errors/warnings