Fixed the pmd and checkstyle problems.