began abstracting out browser-specific stuff