Some cleanup during iOS port.