Merge pull request #168 from csmith/master

Tidy up gradle source sets.
Fix some PMD violations.