Fixed a lot of findbugs issues