Added cobertura and pmd plugins and fixed code according to violations.