Fix various code warnings.