More shared code. Improved detections.