Fixed a bunch of warnings.