Refactoring for Browser Compatibility