Cleansed a bunch of clang analyzer warnings.