Added version detection.