Fix UIImage Orientation

Code is untidy