Fixed a bunch of small things to satisfy findbugs. More to come.