Refactored some of the web browser code. [1664]