Updated for iOS8 & code-clean