serious refactoring
remove code duplication in Browser class