Fix PMD warnings
Fix FindBugs warnings
Format code