WebDriver API rewrite

A complete rewrite of the WebDriver API.