refactoring: fix lint and findbugs warnings