Made detection of --UA work better, though still not dynamic to save time.