Several iOS optimizations