Fixed popover

Fixed popover and detects if the device is iphone or ipad. I will sort out the UIImageView if you cannot do it yourself :P