Added OS detection.