Resolved a bunch of findbugs issues