Various updates to iOS code