Refactors, Firefox fixes.