Add support iOS 8 and fix formatting