Refactor code to comply to XCode 6.1
Unwrapping image data