Added findbugs checks and some fixes