Clean up iOS script somewhat