Refactor BrowserEmulator