Refactor the classes for selenium.