Fixed some checkstyle and PMD issues. Configured PMD rulesets.