Fixed lots of compiler warnings.
Findbugs violations.