Solved all findbugs and pmd issues