First stage of refactoring the code.
Most of HTMLDriver is complete. Still need to test though