Addressed PMD and checkstyle warnings