Upgrade selenium, restore some old dependencies