Refactoring for browser reuse