Changed !detector to !detector == nil
Removed a CIImage recreation via a UIImage's CGImage. Directly create a CIImage off a UIImage