FindBugs refactoring - minor cleanups

Nothing major, a few protections against nulls and uninitialized values.