Refactored the webbrowser to pieces, closes #151