Fixed most warnings.