revamp for gradle and findbugs