Add checkstyle, pmd and findbugs checks. Fix findbugs warnings