Updated for iOS 6

And other changes