Refactor browser example