Refactoring out creation of web driver