Refactoring to make browser build smaller