Fixed the majority of warnings.