Fixed further warnings.

These ones required a few code changes beyond just removing lines.