Fixing PHPMD errors