Minor improvements

I ran findbugs and checkstyle on this code and solved some warnings