Fixes some checkstyle and PMD problems.