refactoring firefox