more firefox refactorings #2043