Fix a bunch of warnings

Most of them are not very consequential, but it's easier to see that you're not making mistakes when there aren't a bunch of annoying false positives.

-[Unknown]