Fixed lots of warnings.