Fixing PMD and checkstyle issues